lotus同一台机拆分P1、P2绑定CPU

lotus同一台机拆分P1、P2绑定CPU

创建目录
/tmp01
/tmp02
/seal/worker01
/seal/worker02
运行P1,绑定cpu 0-15
env TMPDIR=/tmp01 nohup taskset -c 0-15 lotus-worker --worker-repo=/seal/worker01 run --listen=192.168.1.10:3456  --precommit2=false --commit=false >> /var/log/calibnet/worker01.log 2>&1 &
运行P2,绑定cpu 16-31
  • --no-local-storage 不指定目录
env TMPDIR=/tmp02 nohup taskset -c 16-31 lotus-worker --worker-repo=/seal/worker02 run --no-local-storage --listen=192.168.1.10:3457 --addpiece=false --precommit1=false --commit=false >> /var/log/calibnet/worker02.log 2>&1 &
  • 设置目录指向worker01
lotus-worker --worker-repo=/seal/worker02 storage attach /seal/worker01
# lotus-miner storage list

	Unsealed: 0; Sealed: 0; Caches: 0; Reserved: 0 B
	Weight: 10; Use: Seal
	Groups: k010
	AllowTo: k010
	URL: http://192.168.1.10:3456/remote (latency: 1.9ms)
	URL: http://192.168.1.11:3457/remote