BOINC Manager Energy Consumption

Message boards : Questions and problems : BOINC Manager Energy Consumption
Message board moderation

To post messages, you must log in.

AuthorMessage
Andrew

Send message
Joined: 1 Jan 17
Posts: 3
Germany
Message 75052 - Posted: 1 Jan 2017, 16:48:36 UTC

Hi,

I am running BOINC Manager 7.6.33 under OSX 10.12 on a MacBook Pro. I have BOINC set to only compute when connected to a power supply.

When I am running on batteries all science tasks suspend but BOINC Manager itself still takes up a small amount of CPU - between 1% and 4% based on watching it in Activity Monitor. As it is running at all times this small amount of CPU keeps it in the top 5 apps draining my battery. Using dtrace I see it seemingly in a loop, exchanging data with the boinc process every second along with lots of mmap and munmap activity.

For now I just try to remember to switch BOINC on and off manually. Under OSX exiting BOINC Manager stops boinc as well.

Are there any configuration changes I can make to reduce the CPU (and so energy) consumption? I assume its checking with boinc every second to see if boinc is still running and if the tasks are still suspended. Maybe when nothing is running this could switch from polling to an interrupt? I notice BONC Manager never seems to go into "App Nap". Not sure what prevents it - maybe the polling?

Thanks,

Andrew
ID: 75052 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15480
Netherlands
Message 75055 - Posted: 1 Jan 2017, 20:40:44 UTC - in response to Message 75052.  

Under OSX exiting BOINC Manager stops boinc as well.

Don't you have the option to keep the client running upon exit of the manager?
In the least you ought to have the option available to run the client, without the manager. That's a given on all the other OSes as well (bar Android).
ID: 75055 · Report as offensive
Andrew

Send message
Joined: 1 Jan 17
Posts: 3
Germany
Message 75066 - Posted: 2 Jan 2017, 23:00:45 UTC - in response to Message 75055.  

Don't you have the option to keep the client running upon exit of the manager?

No I don't think so - at least I can't see how. I know the option you mean from other platforms but I don't see it offered under OSX (or I'm blind).
No doubt I can hack something up to start up boinc without the GUI but I'd rather not spend the time if I could help it - an option or just a more efficient GUI would be great.
ID: 75066 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15480
Netherlands
Message 75095 - Posted: 4 Jan 2017, 12:26:49 UTC - in response to Message 75066.  

Hi Andrew,

I asked the BOINC developer for the Mac for a bit of insight, here's what he has to say:
Charlie Fenton wrote:
The Mac version of BOINC handles this a bit differently from MSW. If the manager launched the client, it always shuts it down when it exits. So one way to do what he wants is to launch the client before the manager. If the manager finds the client already running when the manager starts, it won't shut the client down when the manager exits.
This means that you ought to be able to start the BOINC client (just called boinc or boinc-client) from the BOINC Programs directory (/Applications/BOINC/ ) and then the manager (called boincmgr or boinc-manager).

Charlie wrote:
One method he can use is to set up BOINC to run the client as a service / daemon as described in http://boinc.berkeley.edu/wiki/Tools_for_Mac_OS_X. This requires a bit of technical knowledge, but based on the sophistication of his posts I think he should have no trouble doing it.

I am surprised, though, that he is seeing such high CPU usage from the manager. On my computer (which is a desktop Mac Pro, not a laptop like his), I see about 1.1% CPU when the manager windows are open and only 0.3% when the windows are closed.

He should make sure that he closes the manager's windows when he doesn't need to read their contents, by clicking on the close box in the main manager window. This also "hides" the manager, though it continues to run in the background. In this state, it does not perform any unnecessary work so as to reduce its CPU load. He can then reopen the windows and "unhide" the manager by using the "Open BOINC Manager" menu item from either BOINC manager's menubar icon or from its Dock icon.

Hope this helps you.
ID: 75095 · Report as offensive
Charlie Fenton
Project developer

Send message
Joined: 17 Jul 06
Posts: 287
United States
Message 75108 - Posted: 5 Jan 2017, 0:27:38 UTC - in response to Message 75095.  

This means that you ought to be able to start the BOINC client (just called boinc or boinc-client) from the BOINC Programs directory (/Applications/BOINC/ ) and then the manager (called boincmgr or boinc-manager).
Actually, on the Mac the client is embedded inside the manager's bundle, so it is at /Applications/BOINCManager.app/Contents/Resources/boinc, but you need to pass it certain arguments as follows:
/Applications/BOINCManager.app/Contents/Resources/boinc --redirectio --dir "/Library/Application Support/BOINC Data"
But the BOINC installer sets the manager as a login item, so the manager will be launched automatically on log in, before you have a chance to do this. You can remove the login item via the Users & Groups System Preferences, or you can quit the manager each time you log in and then launch the client. But if you set up BOINC to run the client as a service / daemon, the client will be run automatically whenever you boot the system, before login, and you won't have to worry about all of this.
Charlie Fenton
BOINC / SETI@home Macintosh & Windows Programmer
ID: 75108 · Report as offensive
Andrew

Send message
Joined: 1 Jan 17
Posts: 3
Germany
Message 75133 - Posted: 6 Jan 2017, 23:29:06 UTC - in response to Message 75095.  

Thanks for that! I followed the instructions in the link and it seems to have worked great. I can open and close the manager without affecting the actual science processes so any worry about CPU consumption is gone.

Just for the record, running the manager now, window open but hidden behind other windows and it takes 2.1% of CPU according to Activity Monitor. Watching it for a while it goes down to about 1.8% but also up to 5% but mostly around 2.1%. With the window closed its down to around 0.7%.

Some feedback on the script if its wanted - the instructions assume you are using a Bourne style shell. I guess most people are now days but it works fine running it as `sh path/to/script` except that the `return`s would need to be `exit` - and that way it should work for people regardless of shell choice.

There is a comment “For some reason, we can't create the file directly in the final destination directory”. Without seeing the original code I can only guess but from the rest of the script I expect it was something like:

`sudo cat >>/Library/LaunchDaemons/edu.berkeley.boinc.plist`

That won’t work because the opening of the file is done by the shell before executing sudo, not by the sudo process. Therefore with the permissions of the running user and not root. Still there is nothing wrong with creating a tmp file and mv'ing it but it’s probably better to make a temporary directory with `mktemp -d` rather than hardcoded.

Thanks for everyone's help though. I really appreciate it!
ID: 75133 · Report as offensive

Message boards : Questions and problems : BOINC Manager Energy Consumption

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.