Problems limiting CPU usage on headless linux box

Message boards : Questions and problems : Problems limiting CPU usage on headless linux box
Message board moderation

To post messages, you must log in.

AuthorMessage
KevinC

Send message
Joined: 23 Apr 20
Posts: 3
United States
Message 98013 - Posted: 23 Apr 2020, 17:27:06 UTC

Hi all. I'm trying to limit cpu usage to half of the available CPUs on a couple of larger hyperthreaded Linux boxes.

In the BOINC directory, I've created a global_prefs_override.xml:

<global_preferences>
<cpu_usage_limit>50.0</cpu_usage_limit>
<max_ncpus_pct>50.0</max_ncpus.pct>
</global_preferences>


But on a 32-thread box, BOINC is still spawning 32 processes. Likewise on a 56-thread server (spawning 56 processes).

Any suggestions?
ID: 98013 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5078
United Kingdom
Message 98014 - Posted: 23 Apr 2020, 17:44:59 UTC - in response to Message 98013.  

Do you have GUI control (BOINC Manager) available on that machine? If not, you may need to have access to the Boinccmd tool manual.

Two possible problems:

You need to read in the override file you've created - options --> Read local prefs file from the Manager, --read_global_prefs_override from boinccmd

You (may) have to set Activity to 'run based on preferences' - 'Activity' menu in Manager, --set_run_mode auto from boinccmd. [That may not be needed for this change, but it's worth remembering it for some of the other options]
ID: 98014 · Report as offensive
KevinC

Send message
Joined: 23 Apr 20
Posts: 3
United States
Message 98015 - Posted: 23 Apr 2020, 17:46:20 UTC - in response to Message 98014.  
Last modified: 23 Apr 2020, 18:05:59 UTC

Sorry... as the title indicated, this is a headless box - no GUI.

I presumed restarting BOINC would cause the global override file to be read. Is that not the case?

That said, I ran "boinccmd --read_global_prefs_override" - and not seeing any difference.
ID: 98015 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5078
United Kingdom
Message 98017 - Posted: 23 Apr 2020, 18:09:44 UTC - in response to Message 98015.  

That's why I added boinccmd :-)

But yes, if you've restarted the machine, that should have done it.

You obviously have a second machine, with GUI, to post here. If they're on the same LAN, it's quick and easy to set up Controlling BOINC remotely - that would be worth doing, because then you could see the Event Log messages using the normal Manager across the LAN. That would make it much easier to see what was happening.
ID: 98017 · Report as offensive
Nick Name

Send message
Joined: 14 Aug 19
Posts: 55
United States
Message 98019 - Posted: 23 Apr 2020, 18:18:23 UTC - in response to Message 98013.  

Hi all. I'm trying to limit cpu usage to half of the available CPUs on a couple of larger hyperthreaded Linux boxes.

In the BOINC directory, I've created a global_prefs_override.xml:

<global_preferences>
<cpu_usage_limit>50.0</cpu_usage_limit>
<max_ncpus_pct>50.0</max_ncpus.pct>
</global_preferences>


But on a 32-thread box, BOINC is still spawning 32 processes. Likewise on a 56-thread server (spawning 56 processes).

Any suggestions?

If this is the actual text, there's a typo.

<max_ncpus_pct>50.0</max_ncpus.pct>
should be
<max_ncpus_pct>50.0</max_ncpus_pct>
Team USA forum
Follow us on Twitter
Help us #crunchforcures!
ID: 98019 · Report as offensive
KevinC

Send message
Joined: 23 Apr 20
Posts: 3
United States
Message 98021 - Posted: 23 Apr 2020, 20:39:55 UTC - in response to Message 98019.  


If this is the actual text, there's a typo.

<max_ncpus_pct>50.0</max_ncpus.pct>
should be
<max_ncpus_pct>50.0</max_ncpus_pct>


Ah... sanity is restored. Thank you!
ID: 98021 · Report as offensive
Nick Name

Send message
Joined: 14 Aug 19
Posts: 55
United States
Message 98063 - Posted: 25 Apr 2020, 6:20:20 UTC - in response to Message 98021.  

Great, glad I could help and it was an easy fix.
Team USA forum
Follow us on Twitter
Help us #crunchforcures!
ID: 98063 · Report as offensive

Message boards : Questions and problems : Problems limiting CPU usage on headless linux box

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.