"Use at most N % CPU time" does not seem to have any effect

Message boards : Questions and problems : "Use at most N % CPU time" does not seem to have any effect
Message board moderation

To post messages, you must log in.

AuthorMessage
[STS]LoB

Send message
Joined: 9 May 23
Posts: 12
Message 111746 - Posted: 9 May 2023, 8:36:16 UTC
Last modified: 9 May 2023, 8:59:40 UTC

Hey,

I was experimenting a bit with the setting "Use at most N % CPU time". It does not seem to have any effect on the usage of the CPU. All indicators (Task Manager, Resource Monitor, etc.) show 100% of active CPUs over all cores all time, even if set to minimum value of 0.01%.

What does work seamlessly is "Use at most N % of the CPUs". Once I limit this, it directly switches off tasks according to that number.


Does anyone have an idea or has made similar experiences?



Edit: Adding information that could help:

  • BOINC version: 7.20.2_x64
  • What you have done so far to try to remedy the problem: Toggle BOINC from "run always" to "do work only when allowed by preferences". Make sure local preferences are used (not web preferences)
  • project(s): yoyo, Einsteing, WCG
  • CPU: Intel Core i5-10400F
  • Operating system: Windows 11

[/quote][/list]

ID: 111746 · Report as offensive
Brian Nixon

Send message
Joined: 19 Apr 23
Posts: 16
United Kingdom
Message 111748 - Posted: 9 May 2023, 8:54:49 UTC - in response to Message 111746.  

The CPU throttling setting was inadvertently broken in 7.22.0. It should be fixed again in 7.22.1, which has just been released for testing.
ID: 111748 · Report as offensive
[STS]LoB

Send message
Joined: 9 May 23
Posts: 12
Message 111749 - Posted: 9 May 2023, 9:01:34 UTC - in response to Message 111748.  

The CPU throttling setting was inadvertently broken in 7.22.0. It should be fixed again in 7.22.1, which has just been released for testing.


Thank you, Brian. But I'm using 7.20.2 on Windows. :/
I've added my system information to the original post.
ID: 111749 · Report as offensive
Profile Dave
Help desk expert

Send message
Joined: 28 Jun 10
Posts: 2516
United Kingdom
Message 111750 - Posted: 9 May 2023, 9:06:08 UTC - in response to Message 111749.  

Personally, I would never use throttling of the CPU but if heat is an issue, limit the number of cores in use.
ID: 111750 · Report as offensive
[STS]LoB

Send message
Joined: 9 May 23
Posts: 12
Message 111751 - Posted: 9 May 2023, 9:10:56 UTC - in response to Message 111749.  

The CPU throttling setting was inadvertently broken in 7.22.0. It should be fixed again in 7.22.1, which has just been released for testing.


Thank you, Brian. But I'm using 7.20.2 on Windows. :/
I've added my system information to the original post.


I've updated to 7.22.1 anyway, and it has fixed the problem. Thanks a lot Brian, that was a very quick fix :)
ID: 111751 · Report as offensive
[STS]LoB

Send message
Joined: 9 May 23
Posts: 12
Message 111752 - Posted: 9 May 2023, 9:12:25 UTC - in response to Message 111750.  

Personally, I would never use throttling of the CPU but if heat is an issue, limit the number of cores in use.


Thanks Dave. I was thinking about this as well. But since I switch it automated every 10 seconds, I worry about losing work. Could you have a look at my second thread and answer there:

https://boinc.berkeley.edu/forum_thread.php?id=14982

Thanks!
ID: 111752 · Report as offensive
[STS]LoB

Send message
Joined: 9 May 23
Posts: 12
Message 111757 - Posted: 9 May 2023, 11:35:01 UTC
Last modified: 9 May 2023, 11:37:12 UTC


I've updated to 7.22.1 anyway, and it has fixed the problem. Thanks a lot Brian, that was a very quick fix :)



Hrm, no, I have to revert that.
"Use at most N % of the CPUs" still doesn't seem to have any effect. All CPUs are constantly at 100%, even when limiting to 0.01%

I don't know what I've seen prior to my earlier post. I probably mixed up the field with the other one, since the UI has changed in this version upgrade.

Any other ideas?
ID: 111757 · Report as offensive
Brian Nixon

Send message
Joined: 19 Apr 23
Posts: 16
United Kingdom
Message 111758 - Posted: 9 May 2023, 12:15:56 UTC - in response to Message 111757.  

Ah, yes – 7.22 introduced the ‘not in use’ settings, so there are now two pairs of CPU % preferences to take into account. Could it be that you’re seeing the ‘in use’ values getting applied rather than the ‘not in use’ ones (or vice versa)?
ID: 111758 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5077
United Kingdom
Message 111759 - Posted: 9 May 2023, 12:20:46 UTC - in response to Message 111758.  

I'll install and check 7.22.1 later today or tomorrow - compare the behaviour with the underlying data files modified by the GUI. We need to check this thoroughly.
ID: 111759 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15477
Netherlands
Message 111760 - Posted: 9 May 2023, 12:40:25 UTC - in response to Message 111757.  

"Use at most N % of the CPUs" still doesn't seem to have any effect. All CPUs are constantly at 100%, even when limiting to 0.01%
You mean N% of CPU time? Make sure that BOINC->Activity is set to "Run based on preferences", as the "Run always" options ignore preferences.
ID: 111760 · Report as offensive
[STS]LoB

Send message
Joined: 9 May 23
Posts: 12
Message 111761 - Posted: 9 May 2023, 14:00:57 UTC - in response to Message 111758.  

Ah, yes – 7.22 introduced the ‘not in use’ settings, so there are now two pairs of CPU % preferences to take into account. Could it be that you’re seeing the ‘in use’ values getting applied rather than the ‘not in use’ ones (or vice versa)?


I have both set to 0.01 - no effect visible in task manager, resource monitor etc.
ID: 111761 · Report as offensive
[STS]LoB

Send message
Joined: 9 May 23
Posts: 12
Message 111762 - Posted: 9 May 2023, 14:03:08 UTC - in response to Message 111760.  

You mean N% of CPU time?

Yes, sorry for the confusion.


Make sure that BOINC->Activity is set to "Run based on preferences", as the "Run always" options ignore preferences.

"Run based on preferences" is set. And I think it's not true that "Run always" ignores preferences. E.g. "Use N% of CPUs" still has an effect, even with "Run always".
ID: 111762 · Report as offensive
[STS]LoB

Send message
Joined: 9 May 23
Posts: 12
Message 111763 - Posted: 9 May 2023, 14:22:24 UTC

So I've looked into this some more: The setting is being written correctly to the file global_preferences_override.xml. But it doesn't seem to activate reliably while on the run. When restarting BOINC afterwards, it seems to work.
Is there anything that can be done so that it comes into effect right away?
ID: 111763 · Report as offensive
robsmith
Volunteer tester
Help desk expert

Send message
Joined: 25 May 09
Posts: 1283
United Kingdom
Message 111764 - Posted: 9 May 2023, 15:12:57 UTC - in response to Message 111762.  

"Run always" affects duration of running, as set by your time preferences. It is possible to set a daily schedule say (09:00 to 12:00), but if you set "run always" this schedule will not operate.

It does not affect the "use X% of the CPUs" or "run for X% of the time" options - these say HOW BOINC should use your computer, not WHEN BOINC should use it.
ID: 111764 · Report as offensive
Brian Nixon

Send message
Joined: 19 Apr 23
Posts: 16
United Kingdom
Message 111765 - Posted: 9 May 2023, 15:23:12 UTC - in response to Message 111763.  

it doesn't seem to activate reliably while on the run
This is a side-effect of the way the throttling is implemented. Setting the preference to 0.01% is the same as asking BOINC to do nothing for 2¾ hours (1 second running to 9999 seconds suspended). It will wait that long before it applies the changed value. You might want to raise that as a bug
ID: 111765 · Report as offensive
Profile Dave
Help desk expert

Send message
Joined: 28 Jun 10
Posts: 2516
United Kingdom
Message 111766 - Posted: 9 May 2023, 16:37:20 UTC

Is there anything that can be done so that it comes into effect right away?


<options> <Read local preferences file>?
ID: 111766 · Report as offensive
Brian Nixon

Send message
Joined: 19 Apr 23
Posts: 16
United Kingdom
Message 111767 - Posted: 9 May 2023, 17:02:07 UTC - in response to Message 111766.  

<options> <Read local preferences file>?
It won’t help, because the client’s throttler thread has already decided to sleep for as long as it needs to fulfil the earlier preference (which in the extreme case is 9999 seconds), and there’s no way to wake it from its slumber.
ID: 111767 · Report as offensive
[STS]LoB

Send message
Joined: 9 May 23
Posts: 12
Message 111774 - Posted: 9 May 2023, 18:14:38 UTC - in response to Message 111765.  

it doesn't seem to activate reliably while on the run
This is a side-effect of the way the throttling is implemented. Setting the preference to 0.01% is the same as asking BOINC to do nothing for 2¾ hours (1 second running to 9999 seconds suspended). It will wait that long before it applies the changed value. You might want to raise that as a bug

Hm, that sounded plausible to me - but my further experiments don't really back:

When I start BOINC with a setting of 0.01, and then switch it to 100% during operation, it picks up speed right away. But after that, it doesn't react any more to changes.
Well, I guess I'll raise a bug then :-/
ID: 111774 · Report as offensive
[STS]LoB

Send message
Joined: 9 May 23
Posts: 12
Message 111775 - Posted: 9 May 2023, 18:40:37 UTC

Bug is filed here: https://github.com/BOINC/boinc/issues/5231
ID: 111775 · Report as offensive
Brian Nixon

Send message
Joined: 19 Apr 23
Posts: 16
United Kingdom
Message 111776 - Posted: 9 May 2023, 19:25:02 UTC - in response to Message 111774.  

further experiments don't really back
By now I should have learned to test before inventing answers…

The act of changing the preferences triggers the client to reschedule, which will resume tasks that were suspended by the previous throttling. This is why CPU usage goes back up to 100% immediately. However, it does not change the fact that the thottler thread is asleep for a duration based on the previous setting, so the desired CPU usage will still not happen until that thread wakes up. This is why further changes appear to have no effect. (Though given enough time, it will start to work again.)
ID: 111776 · Report as offensive

Message boards : Questions and problems : "Use at most N % CPU time" does not seem to have any effect

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.