"Suspend when non-BOINC CPU usage is above" -> Allow a grace period before triggering
Describe the problem
BOINC tasks are already low-prio by default, which means the processor can schedule around them on milisecond timescales.
If running the tasks has a noticeable effect on the computer, constantly starting and stopping tasks due to transient spikes in CPU usage can be very jarring. And is likely detrimental for the tasks themselves, as saved progress probably isn't perfectly continuous.
Fans spinning up and down, perfomance impacts (in my case performance improves while boinc is running, don't ask).
Describe the solution you'd like
Allow a setting to control how long the CPU must remain above the treshold before tasks are suspended.
Having some sort of hysteresis is the basics of control mechanisms.
Additional context
No response
A lot of work for little benefit IMHO. If people feel the need to suspend when non-BOINC CPU usage exceeds a certain level, they'd be better served by choosing a reasonable value- eg 85% (or higher). Ideally the default value should be 85% or even 90%.
Single core/dual threaded systems are very much in the past.
See, the trouble is, even with 80-90% I often get undetectable transient spikes which trigger BOINC to suspend.
You know how task manager has a graph of CPU usage. It doesn't reflect the spike that triggers BOINC.
It delays resume after suspending, even if we're at 0% CPU. All I'm asking for is equal treatment. 😁
And why would it be a lot of work? It already has a mechanism to delay on one end, just put the same on the other end!
I agree this feature does not work week.
I also see frequent temporary "suspended CPU is busy" when the CPU is not particularly busy (on my Mac.)
I wonder if it might work better if we take several samples of non_BOINC CPU usage over a short period of time and suspend only if it stays above the specified threshold throughout that time period. I don't remember how often we sample it, but I suspect once per second, so perhaps suspend only if it stays high every sample for 5 seconds.
A major goal of the BOINC client is to not affect user-visible system performance. Hence the asymmetry: if it looks like the user is doing something CPU-intensive, we want to stop computing immediately, and we don't want to resume until we're sure that it's over.
If the way we calculate non-BOINC CPU usage is incorrect, that's a bug and we should fix it.
BTW we sample CPU usage every 10 seconds; we can't wait for a 2nd sample
The sample rate could be increased to every 5 seconds. Of course this would make it more likely to detect higher CPU usage and therefore more likely to stop BOINC processing. However, it would also mean BOINC processing would resume much sooner.
As far as fans ramping up and down is concerned, that can be sorted (depending on how basic your motherboard is), by the appropriate BIOS settings (on my older mid-range Gigabyte boards, it's labelled "Temperature interval." The larger the value, the longer the delay between a change in CPU temperature and the corresponding change in fan speed. Mine is set to 3). The other option is using Fan Control or similar software to control the fans.
OH! Discussion!
A major goal of the BOINC client is to not affect user-visible system performance. Hence the asymmetry: if it looks like the user is doing something CPU-intensive, we want to stop computing immediately, and we don't want to resume until we're sure that it's over.
If the way we calculate non-BOINC CPU usage is incorrect, that's a bug and we should fix it.
This places me in an incredibly ironic situation.
I am that user now.
System responsiveness drops precipitously on my current setup when BOINC is NOT running. (More generally when computer has been running for a while and CPU usage is below a certain threshold. It's some kind of dumb windows bug that I have no explanation for.)
Also, is "user-visible system performance" the only permissible / valid criteria? It is currently summer where I am. Fan noise varies very audibly with changes in CPU usage. It can be quite annoying. (Although now that I think about it, there is the option to add hysteresis to the fan response, rather than the CPU usage. And then I also read Grant's comment, which suggested the same...)
Additionally, if made configurable, I believe a large part of effect on system performance would be absorbed by the OS's process scheduling - since computing tasks run at a lower priority.
At least on Windows, according to this answer:
If two threads want to use a CPU, and they're of the same priority, then they are scheduled via what is called "time-slicing" and over time, each gets about 50% of the CPU's time. Whereas if they're of different priorities then the higher-priority thread gets 100% and the lower- gets nothing.
I know BOINC is multiplatform, but I don't know how linux scheduling works.
BTW we sample CPU usage every 10 seconds; we can't wait for a 2nd sample
Like Grant said, we could increase the sample rate to 5 seconds. Then simply if sample 1 is above threshold, wait for sample 2, and only if it is also above the threshold, stop computing.
For the UI, that would mean a simple checkbox (since sample rate seems hardcoded).
I'm curious how the sampling works.
It's definitely not an AVERAGE over the sample period, since that would mitigate the effects of a transient spike, which contradicts the observed behavior. Is it "if any 1-second average" in the last 10 seconds exceeds threshold, computing is stopped? Or does the stop event not use the 10-second sample? (You said "we want to stop computing immediately".)
I'd also like to confirm something: How are computing tasks made pausable/resumable? (Is it implementation specific? Or does BOINC offer some special mechanism, like saving the exact memory state/processor context - like how OS stand-by works.)
I am developer myself (a web developer, but still not averse to the ways of the code). Spoken from ignorance, it seems like an easy feature to implement for someone with no knowledge of the codebase - apart from the UI. I have no idea how desktop app UI works.
Feel free to educate me and offer advice/insight.
How are computing tasks made pausable/resumable?
It is an mechanism every OS has. I will not point you to the exact implementation for Linux or Windows in BOINC, but it's very similar to this: https://stackoverflow.com/questions/27844970/how-to-pause-resume-a-process-in-linux
System responsiveness drops precipitously on my current setup when BOINC is NOT running. (More generally when computer has been running for a while and CPU usage is below a certain threshold. It's some kind of dumb windows bug that I have no explanation for.)
Long story short- if you are running an Intel system with a CPU that employs P/E (Power/Efficiency) cores on Windows you need a clean WIn11 installation with current chipset drivers & all current microcode updates to have the best chance for process scheduling & CPU power states to work properly (Win10 has had scheduling updates to support P/E cores, but apparently there are times where it requires a clean installation of Win11 for things to actually work as they should).
Long story short- if you are running an Intel system with a CPU that employs P/E (Power/Efficiency) cores on Windows you need a clean WIn11 installation with current chipset drivers & all current microcode updates to have the best chance for process scheduling & CPU power states to work properly (Win10 has had scheduling updates to support P/E cores, but apparently there are times where it requires a clean installation of Win11 for things to actually work as they should).
Oh, no. This predates hetero cores by a long time. My computer is very old now. Old enough to not support Win11 (officially).
I think this feature does need some rework.. I have a base load of ~8% on my CPU (5950X) and a suspend above is set to 30%. Each time, BOINC uploads a finished work-unit, other calculations are suspended because of it.
I think this feature does need some rework.. I have a base load of ~8% on my CPU (5950X) and a suspend above is set to 30%. Each time, BOINC uploads a finished work-unit, other calculations are suspended because of it.
In the BOINC Manager log, does it say it is suspending due to CPU activity? And i'm curious as to why you have it set so low (both for available cores/threads, and CPU usage)?
the 8% are non BOINC processes.. and I don't see 30% as low. that's more than 4 cores/8 threads under full load. and yes, it does suspend on "CPU is busy" after every upload for me.
26-Oct-2025 11:31:44 [Milkyway@home] Computation for task de_nbody_10_01_2025_v193_OCS_north__data__06_1 finished 26-Oct-2025 11:31:44 [Milkyway@home] Starting task de_nbody_orbit_fitting_10_01_2025_v193_OCS_lmc_pm__data__021 26-Oct-2025 11:31:45 [---] Suspending computation - CPU is busy 26-Oct-2025 11:32:05 [---] Resuming computation 26-Oct-2025 11:34:59 [Milkyway@home] Computation for task de_nbody_orbit_fitting_10_01_2025_v193_OCS_lmc_pm__data__021 finished 26-Oct-2025 11:34:59 [Milkyway@home] Starting task de_nbody_orbit_fitting_10_01_2025_v193_OCS_lmc_pm__data__021 26-Oct-2025 11:35:07 [---] Suspending computation - CPU is busy 26-Oct-2025 11:35:27 [---] Resuming computation 26-Oct-2025 11:38:13 [Milkyway@home] Computation for task de_nbody_orbit_fitting_10_01_2025_v193_OCS_lmc_pm__data__021 finished 26-Oct-2025 11:38:13 [Milkyway@home] Starting task de_nbody_orbit_fitting_10_01_2025_v193_OCS_lmc_pm__data__02_2 26-Oct-2025 11:38:19 [---] Suspending computation - CPU is busy
some of my log, removed precise names of the work-unit
the 8% are non BOINC processes.. and I don't see 30% as low. that's more than 4 cores/8 threads under full load.
Considering 90% of your cores/threads are available, setting non BOINC usage to suspend at 30% is extremely low.
I suspect BOINC is working as it should- i don't know what the size of the returned results are, but i suspect that when they are being uploaded, that's causing a big spike in non-BOINC CPU usage as the OS deals with the upload traffic, and BOINC suspends due to Non-BOINC CPU usage exceeding the limit you have set.
I'd suggest checking the CPU usage with process Explorer (or similar if using LINUX, although the spike may be too short to register due to it's sampling rate).
Non-BOINC usage above 75% would be a more reasonable setting IMHO if you feel the need to use it. Personally- i set it to 95% when in use, 98% when not in use and would use the "Use at most xxx % of the CPUs" setting to leave a thread or threads free for non-BOINC usage. That way they won't cause any impact on BOINC processing, and it doesn't have any impact on them.
that's causing a big spike in non-BOINC CPU usage as the OS deals with the upload traffic
Consider the implications of what you just said. In no way should that amount of network traffic be sufficient to exceed 30% on a 5950X (16 zen3 cores, 32T). That's 9 (logical) cores fully pegged for that amount of work (7 if we discount the 8% base load Marius mentioned). If that amount of traffic is enough to exceed 30%, what should we expect to see when a user does something as simple as downloading a large file?
If I saw that kind of load, I would certainly consider my computer broken! (Perhaps some malware monitoring things in the middle, or a cryptolocker or something.)
It's good to offer workarounds, but it'd be much better to address the root cause.
Honestly, a 5 second window for transient spikes sounds ideal to me.
Consider the implications of what you just said. In no way should that amount of network traffic be sufficient to exceed 30% on a 5950X (16 zen3 cores, 32T).
I agree, that's why i suggested checking to see if such a spike is occurring (if possible). If it is, then BOINC is working as it should. If not, then there is a problem with it (if you are running Windows, some AV programmes are very resource heavy at the best of times, and their real time monitoring of everything can cause massive spikes in CPU usage, along with their already excessive load). And changing the values you have selected to see what effect they have may help to see just what is going on, as well as mitigate the issue.
No spikes observed in the win integrated Taskmanager, and Ressourcemanager. On that note.. after sleeping over it, I realize, that I started observing this behaviour only after updating to 8.2.4 (was running 8.0.2 before).