madMAx43v3r / chia-plotter

Apache License 2.0
2.27k stars 664 forks source link

Setting CPU affinity during plot creation (Windows) #319

Open NikXO6 opened 3 years ago

NikXO6 commented 3 years ago

I have done parallel testing and seems to scale linearly with both processes using all thread. However, I did get some better result by locking each process threads. This is a manual process, in swar this option was available, is there any possibility.

SebMoore commented 3 years ago

I answered this in #318 - this plotter will not include this option because it is a barebones plotter, but you can use the Windows "start" command to set affinity.

carlfarrington commented 3 years ago

Along similar lines if anyone is interested, I have my final-dir as an NFS share (using Windows NFS client on the Windows plotters - i.e. my spare Windows PCs). Due to the next plot (-n >1) hitting the CPU hard during the file-copy phase, I was only seeing 300mbps on the NFS upload. renicing chia_plot.exe to 'below normal' brought this up to >700mbps.

lordzamura commented 3 years ago

Begin Script

############Plotters for First Temp Drive############### invoke-expression 'cmd /c start /high /affinity 0x000000000000FFFF powershell -NoExit -Command {cd C:\chia_plotter_cpu\;$host.ui.RawUI.WindowTitle = "test1"; start-sleep 0 ; .\chia_plot.exe -n 1 -r 16 -u 128 -t E:\ -d E:\ -p POOL_KEY -f FARMER_KEY}'

you can use affinity! and you can calculate affinity https://bitsum.com/tools/cpu-affinity-calculator/ from here. after this only specified cpus will be use. for my configuration. 16 core with chia_plot.exe and 24 core reserved for this. it has good performance. but in every situation parallel makes it slower.