-
-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add plot process cpu affinity (psutil) #134
Add plot process cpu affinity (psutil) #134
Conversation
Onother way of acomplish the same goal is to define the process priority. If the plotter process is launched with LOW priority, the system behaviour will be much better, while potentially still using all the available resources for plotting. |
@trekb , there is already renice to priority 10 on linux machines and some "normal" priority on windows machines. |
would be nice if it was a per job setting instead of global |
@stubmirror contributions are welcome ;) |
I want to add this to the development branch but with the amount of questions I have been getting lately, I need to find a way to make it so people don't start complaining why their plots are going slow and then realizing they used this functionality wrong. Will keep this open. I made a branch to merge my current changes with it as well. |
okay moved it to job level instead of global. should be good to go esp since its default set to false |
enable_cpu_affinity: false is also useless, the software will only call CPU0, not CPU1. |
This implementation of
psutil.Process().cpu_affinity()
lets the user parameterize a selection of cores/threads specific to their plotting system and bind configured CPU affinity for newly created plotting processes. As specified in the readme andconfig.yaml
documentation, this functionality gives the user greater control over their plotting machine's resources.Some users run full node, wallet, and harvester in addition to plotting processes - I have personally experienced and have seen others run into issues when CPU resource allocation is fully consumed by plotting processes. Even on high-end multi-core CPU's, this may lead to node de-sync and delayed plot scanning (to name a few).
Enabling CPU core/thread restrictions will objectively decrease plotting speed, making this feature optional and disabled by default.
Let me know if there are better formatting conventions and logic simplification.
Any suggestions are welcome.