Green Boinc?

Is it possible to contribute idle CPU time, to projects such as the World Community Grid, and practice green computing? While I wouldn't be considered too green, as you can have my high-end CRT when its pried from my cold dead fingers, I have been exploring such things by leaving KPowersave running on my new computer.

First thing to running Boinc, the client software, is getting it installed. As it is now available in the Fedora repositories, this is easily done with:
yum install boinc-client boinc-manager
With `boinc-manager` really only necessary one computer if you are going to be running it from multiple others.

For setup, this wiki page has some good instructions - The key thing to note is you must set the '/var/lib/boinc/gui_rpc_auth.cfg' file so that users in the 'boinc' group can access it. Then you add your, or whomever's account(s), to the 'boinc' group (re-login required to take affect) for the management software run rights. Finally create a softlink to the 'gui_rpc_auth.cfg' file in the home directory of those that will run the management software. Those three little steps will prevent the "open in the same directory as the client" error message.

Out of the box Boinc pretty much grabs all idle CPU time. While not necessarily a bad thing, if you are allowing the CPU to adjust its speed based on workload it will now stay at full speed. That in turn causes it to run hotter, which causes the fan(s) to run or run faster. In short, more power and more noise. There are adjustments that can be made.

If you've signed up to do projects with the World Community Grid (WCG), you can configure "Device Profiles" that the client will use for its how to run settings. This is done by signing into your WCG account and then going to:
My Grid -> Device Manager -> Device Profiles
Initially there will be only the "Default" profile. If you have multiple installations and different settings needs, then other profiles can be created and assigned. There are five options available in a profile:

  • Standard
  • Minimum
  • Maximum
  • Power Saving
  • Custom

The first four have unadjustable presets, while the fifth can be configured as desired. Notably the "Use no more than X% of processor time". Unfortunately the first four options do not tell you what their settings are, so all you can do is try them out. Do note that you will need to either wait for the client to contact the site on its schedule, or use the Boinc Manager interface to update the project (advanced view), for the new settings to take effect.

Alternatively, you can make these settings in the Boinc Manager. In "Simple View" the "Preferences", at the bottom, will allow you to adjust a few things. If you switch to "Advanced View" the "Preferences", in the "Advanced" menu at the top, will give additional settings. Making settings in the client overrides those set at the WCG site.

In the past the Boinc client did not have a way to set how much CPU percentage was used. Back then I used an additional program, cpulimit, to help. The newer Boinc client does support this kind of setting. In tinkering with the custom options I found that setting the CPU option to 30% ran the work item process at a constant just slightly over 30%. When setting it to 10% the work item process CPU usage is about 30% in brief intervals. If you have multiple CPUs, or one with multiple cores, you can have a work item process per CPU and each obeys the limit. There is a setting which allows you to adjust the number of CPUs available to the client, so you could have four CPUs but only allow the client to assign work item processes to two.

Now, here's the problem with programs like KPowersave, which can be set to adjust the CPU speed based on usage among other things... When there is a work item being processed the CPU will run at full speed. So even when I set the Boinc client to only use 10% of the CPU the CPU would dynamically adjust up to full speed each interval (see above paragraph). The work item process is "niced", so why is this occurring?

Or rather, since I understand how 'nice' works, why is a process with such a low priority being considered as something that would raise the CPU speed? A bit of research led me to the 'cpuspeed' program and its settings. On Fedora, other distro locations may differ, you'll find '/etc/sysconfig/cpuspeed' has an item 'IGNORE_NICE=0'. When 'IGNORE_NICE' is set to '0' (zero) it tells cpuspeed to also account for processes that have been "niced" to a low priority. I set this to '1' (one) so that it will ignore such processes. After restarting the 'cpuspeed' service, or you can reboot, my CPU speed stays at its lowest when the Boinc client is processing a work item and nothing else is occurring.

If you are interested, a nice writeup on CPU speed reporting can be found here -