Feature Request: Phase1 Renice
See original GitHub issueFeature Request
Support configurable Phase1 and Phase2/3/4 NICE levels in the config Ex:
plotting:
k: 32
e: False # Use -e plotting option
n_threads: 6 # Threads per job
n_buckets: 128 # Number of buckets to split data into
job_buffer: 4096 # Per job memory
phase_1_nice: -19 #Launch Nice of Plotting Process
phase_234_nice: 15 #Renice on completion of Phase1
On launch of plotting processes set NICE of -19, as per example At Phase 1 completion, renice PID of respective job to 15, as per example
Background:
much of my plotting load testing has lead me to the conclusion that over-subscription of machine cores (threads) at a near 2:1 ratio nets optimal parallel plotting, while sacrificing a bit of phase1 speed. The objective is to minimize the peak/valley behavior and fully utilize the compute resources available, within the limits of the storage. Phase1 is multi-threaded and compared to the other phases, extremely CPU bound. In the example configuration 32 threads would be allocated to Phase1 with an additional 11 threads for the jobs in phase2/3/4. , 43 threads allocated on 32 threads, roughly a 34% over subscription.
Example Hardware Config:
Ryzen 5950x (16c / 32t) 64GB DDR4-3600 4 x 1TB NVME TMP (mdadm raid-0, xfs, zram logdev, noatime mounts, etc) 1 x 500GB SSD Destination
Example Plotman config:
4 max before stage 2:0, 10 second scan, 10 minute stagger, 15 max plots, memory 4096, threads 8
Data:
Testing has shown that for all PIDs of jobs in Phase1, setting a nice of -19 and all other jobs at a default 15 ensures that adequate (all the things…) CPU resources are allocated to quickly progress the P1 jobs to a state where everyone gets their own single physical core in 2+. In ~24 hours of testing this has resulted in about an 8% gain in reduction of total plot time.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:9
Top GitHub Comments
Random tidbit, I’m not aware of any good reason to be running any Chia or plotman stuff as root.
for anyone that cares to do the same, here is some bash that you can use, loop it, cron it, whatever