CPU usage limits in projects using virtualization

Message boards : Questions and problems : CPU usage limits in projects using virtualization
Message board moderation

To post messages, you must log in.

AuthorMessage
Migelo

Send message
Joined: 13 Feb 16
Posts: 3
Message 67697 - Posted: 13 Feb 2016, 3:06:30 UTC

Boinc version: 7.6.22
OS: OS X El Capitan x64

I like to limit the CPU usage of boinc projects so fans aren't going crazy on my laptop during the night. It all works fine for non-virtualized projects (Milkyway, Asteroids...) but when I'm doing Cosmology and ATLAS the CPU usage limit is not observed by virtualbox.

Please advise.
ID: 67697 · Report as offensive
Profile Gary Charpentier
Avatar

Send message
Joined: 23 Feb 08
Posts: 2465
United States
Message 67699 - Posted: 13 Feb 2016, 5:25:05 UTC - in response to Message 67697.  

Boinc version: 7.6.22
OS: OS X El Capitan x64

I like to limit the CPU usage of boinc projects so fans aren't going crazy on my laptop during the night. It all works fine for non-virtualized projects (Milkyway, Asteroids...) but when I'm doing Cosmology and ATLAS the CPU usage limit is not observed by virtualbox.

Please advise.

Correct, not observed. AFIK it also is not possible to command vitrualbox to do so, because it is an operating system itself.

You might want to use app_config.xml to restrict BOINC to creating only 1 VM per project. See https://boinc.berkeley.edu/wiki/Client_configuration
ID: 67699 · Report as offensive
Migelo

Send message
Joined: 13 Feb 16
Posts: 3
Message 67707 - Posted: 13 Feb 2016, 10:14:36 UTC

Thank you, will do that!
ID: 67707 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15483
Netherlands
Message 67714 - Posted: 13 Feb 2016, 17:16:36 UTC - in response to Message 67697.  
Last modified: 13 Feb 2016, 17:16:52 UTC

I laid this in front of the developer, he assures me that the vboxwrapper does observe CPU limitations set in BOINC. BOINC uses a wrapper to communicate between itself and VBox.

Checking e.g. http://boincai05.cern.ch/CMS-dev/result.php?resultid=114200 it does say:
2016-02-12 19:41:07 (5464): Preference change detected
2016-02-12 19:41:07 (5464): Setting CPU throttle for VM. (75%)

So, if in your case it doesn't work:
1. First check that you have BOINC Activity set to "run based on preferences".
2. That the projects don't override, or have their own project preferences setting overriding. In mind come multi-threaded applications that may ignore CPU usage limiting preferences.

In both these cases you best take it up with the project, post in their forums. For if this is a bug in their vboxwrapper, they'll have to update, or post to the BOINC Projects email list, or BOINC Development email list.
ID: 67714 · Report as offensive
Profile Gary Charpentier
Avatar

Send message
Joined: 23 Feb 08
Posts: 2465
United States
Message 67745 - Posted: 14 Feb 2016, 15:57:22 UTC - in response to Message 67714.  

I laid this in front of the developer, he assures me that the vboxwrapper does observe CPU limitations set in BOINC. BOINC uses a wrapper to communicate between itself and VBox.

Checking e.g. http://boincai05.cern.ch/CMS-dev/result.php?resultid=114200 it does say:
2016-02-12 19:41:07 (5464): Preference change detected
2016-02-12 19:41:07 (5464): Setting CPU throttle for VM. (75%)

So, if in your case it doesn't work:
1. First check that you have BOINC Activity set to "run based on preferences".
2. That the projects don't override, or have their own project preferences setting overriding. In mind come multi-threaded applications that may ignore CPU usage limiting preferences.

In both these cases you best take it up with the project, post in their forums. For if this is a bug in their vboxwrapper, they'll have to update, or post to the BOINC Projects email list, or BOINC Development email list.

Before we go nuts, which version of vbox? which version of BOINC? which version of Mac OS/X?
ID: 67745 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15483
Netherlands
Message 67746 - Posted: 14 Feb 2016, 16:09:23 UTC - in response to Message 67745.  

Is there a reason you need to quote my whole post, Gary?
ID: 67746 · Report as offensive
Profile Gary Charpentier
Avatar

Send message
Joined: 23 Feb 08
Posts: 2465
United States
Message 67754 - Posted: 15 Feb 2016, 4:42:44 UTC - in response to Message 67746.  
Last modified: 15 Feb 2016, 4:44:57 UTC

Is there a reason you need to quote my whole post, Gary?

because it is your pet peeve or someone or spammed my e-mail inbox with mod notices the other day.
ID: 67754 · Report as offensive
Migelo

Send message
Joined: 13 Feb 16
Posts: 3
Message 67843 - Posted: 17 Feb 2016, 10:51:38 UTC

I apologize, it seems I was only paying attention to the fan speed and noise my pc produced. When I checked the actual processor time, it checked out. Turns out the virtual box powered projects put a constant load on the CPU of 40% (if I set it to 40%). On the other hand, doing some other projects with CPU limited to 40%, I get this:


Turns out it does not put a constant load, just some peaks up to 40%. This does not heat up the CPU as much and I'm happy in my quiet room. I know it works less but it's still something.
ID: 67843 · Report as offensive
Bob Knippel

Send message
Joined: 6 Jan 15
Posts: 4
United States
Message 67947 - Posted: 22 Feb 2016, 4:27:38 UTC - in response to Message 67697.  

You will have to create an apt_config.xml file specific to each project.

In Linux, put it into /BOINC/projects/www.cosmologyathome.org (or Atlas).
In Windows, C/Program Data/BOINC/projects/atlasathome.cern.ch (or Cosmology).

In Windows, you may have to select whatever it takes to show hidden files to find the Program Data file. I can't remember where I found that, as I'm a Linux guy, but it wasn't difficult to find.

I use Notepad in Windows to create the file. Save the file to a convenient temporary location as apt_config.xml You can copy and paste it later. Make sure to select ANSI as the encoding format, and also select "All Files" as the type, not .txt

For Atlas, use this:

<app_config>
<app>
<name>ATLAS</name>
<max_concurrent>3</max_concurrent>
</app>
</app_config>

Replace the concurrent>3< with whatever number of Atlas tasks you want to run at the same time.

For Cosmology, use this:

<app_config>
<app>
<name>camb_boinc2docker</name>
<max_concurrent>4</max_concurrent>
</app>
<app_version>
<app_name>camb_boinc2docker</app_name>
<plan_class>vbox64_mt</plan_class>
<avg_ncpus>2</avg_ncpus>
</app_version>

<app>
<name>lsplitsims</name>
<max_concurrent>4</max_concurrent>
</app>
<app_version>
<app_name>lsplitsims</app_name>
<plan_class>vbox64_mt</plan_class>
<avg_ncpus>2</avg_ncpus>
</app_version>

</app_config>

Replace the concurrent>4< with whatever number of tasks you want to run at the same time. To limit CPU's, change ncpus>2< to whatever you want. In my case, I am crunching both camb_boinc2docker and lsplitsims. The lsplitsims is BETA testing, so if you don't run that, simply eliminate that whole section.

Once you have the file installed, use the BOINC manager to read the files. You do that by selecting "advanced" options, then "Read config files". The tasks currently running will not be affected, but the next ones to start should work.
ID: 67947 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15483
Netherlands
Message 67953 - Posted: 22 Feb 2016, 9:16:04 UTC - in response to Message 67947.  

You will have to create an apt_config.xml file

Please people, when giving help, check what you are writing.

It's an app_config.xml, with explanation thereof here: http://boinc.berkeley.edu/wiki/Client_configuration#Application_configuration.
ID: 67953 · Report as offensive

Message boards : Questions and problems : CPU usage limits in projects using virtualization

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.