boinc icon indicating copy to clipboard operation
boinc copied to clipboard

Clarification on webpage for rounding of CPU/GPU percentage use

Open hucker75 opened this issue 2 years ago • 2 comments

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.

hucker75 avatar Apr 17 '22 10:04 hucker75

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.

mcagriaksoy avatar Sep 08 '23 19:09 mcagriaksoy

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);

davidpanderson avatar Sep 08 '23 20:09 davidpanderson