boinc
boinc copied to clipboard
Clarification on webpage for rounding of CPU/GPU percentage use
https://boinc.berkeley.edu/wiki/Preferences contains:
Computing Usage limits Use at most N % of the CPUs: Keeps some CPUs free for other applications. Example: 75% means use 6 cores on an 8-core CPU.
But what about a 6 core CPU? How do I set 83.33333 recurring % for 5 cores? Will it round up or down?
The GPU in app_config, <gpu_usage> rounds the other way. Best if these were the same, and stated on the above page.
The CPU usage percentage is rounded down to the nearest integer. So if you set it to 83.33333%, it will use 4 cores on a 6-core CPU. To use 5 cores, you need to set it to 84% or higher.
The parameter itself (max_ncpus_pct) is stored and parsed as a double. The rounding down happens when it's used to calculat the # of CPUs fo use: n = (int)((host_info.p_ncpus * max_ncpus_pct)/100);