After a brief stint at distributed computing early in the pandemic, I came back first to Folding@Home, then BOINC, with the following goals:

  • Use some spare computing power to help with worthwhile research.
  • Not drastically increase my power usage.
  • Mainly run projects when my computer would be on anyway, not start running a full desktop power supply full blast 24/7.
  • Avoid damaging my primary system, and especially not have to replace a fried CPU or GPU in a hurry during the ongoing chip shortage! (I’ve had heating problems with graphics-intensive games on this box.)

Folding@Home only seemed worth doing with the GPU, and the tasks took long enough that it only seemed worth doing if I was going to keep the computer on, which tripped up on my targets for power usage, uptime, and overheating risk. And their ARM version had dropped 64-bit support, so I couldn’t put it on the Raspberry Pi either. Well, not without installing a new OS and setting everything up again.

I tossed BOINC on an old Android phone (via F-Droid) to start with, using Science United as a manager to automatically choose projects based on areas of research instead of having to dig into each project one at a time. After a week or so, that seemed to be working out pretty well, so I looked into expanding.

Device Strategies

Phones

BOINC’s default settings on Android are designed to minimize battery wear. It only runs tasks when the phone’s plugged in, the battery is above 90%, and the battery temperature is below 40c. So I could leave the old phone plugged in, and toss it on my new phone to get some extra tasks done while charging.

Raspberry Pi

Debian’s apt repository includes BOINC, and it still supports 32-bit ARM, so I just installed it on the Pi and let it run all the time. It can only run a handful of projects that support the architecture, and it’s not particularly fast, but it’s already running 24/7, uses a lot less power than a desktop, doesn’t overheat and can finish tasks before deadline. And the projects it can run include things like medical research on World Community Grid, including the OpenPandemics Covid-19 project.

Desktop

Fedora also includes BOINC in its dnf repository, so again I installed it through the OS.

But this is where things get tricky.

I don’t want to leave the machine up to run BOINC when it’s idle, I want to suspend it. I don’t want to run the GPU full blast for hours on end, because I have real concerns that it might fry the CPU. (I did eventually add an intake fan, which helps a bit since the GPU fans don’t need to work as hard, but they’re aimed straight at the CPU, and running the GPU at full can still push the CPU above its recommended operating temperature.)

The automatic settings for when to crunch numbers and how intensely are mostly built around the assumption that you’re going to let it run when you’re away from the computer, like a screen saver. (IIRC, the original SETI@Home project actually was a screen saver.) I limited it to half the CPU cores at a time, and set it to pause whenever the the CPU is busy running other programs, but there wasn’t much I could do with the GPU settings except manually turn it on when I started using the machine for things that didn’t need much graphics processing, then turn it off when the CPU got too hot, or the fan sounded like it was struggling.

Which brings us back to anxiety about the machine overheating.

Low-Impact BOINCing on the Desktop

I finally dug into the command-line options for managing it, and discovered that boinccmd will let you turn either computing mode on or off for a specific amount of time (in seconds), and then go back to whatever it was before!

Command-line options to run BOINC CPU or GPU for 1 minute, then go back:

boinccmd --set_run_mode auto 60
boinccmd --set_gpu_mode auto 60

I’ve set up some shell scripts to turn on BOINC computing for a few minutes, then pause so the system can cool down. Sometimes I’ll turn on CPU processing manually and let it run the GPU for a few minutes at a time. And sometimes I’ll run a script to schedule BOINC intermittently while I’m doing other things. All designed so that if I forget to deal with it, it’ll go back to its base setting and let the processor cool off.

boinc10m:

#!/bin/sh
echo Starting 10 minutes of BOINC CPU at `date`
cd /var/lib/boinc && boinccmd --set_run_mode auto 600

boincgpu10m:

#!/bin/sh
echo Starting 10 minutes of BOINC CPU+GPU at `date`
cd /var/lib/boinc && boinccmd --set_run_mode auto 600 && boinccmd --set_gpu_mode auto 600

Note: for whatever reason, boinccmd only seems to see one of these options at a time, which is why I have to call it twice.

boinc-intermittent:

#!/bin/bash
while true
do
	boinc10m
	sleep 10m
	boincgpu10m
	sleep 10m
	echo Letting the processors and fans rest for 10m at `date`
	sleep 10m
done

I think I’ve found a good balance between contributing to research, not melting the processor, and not overdoing the uptime. Whether I’m keeping the extra power usage down? I guess I’ll just have to wait for my next electrical bill to find out. 😬

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.