by Bradley Knockel (last modified March 2020)
Let me tell you about volunteer computing. I had some old (and newer) laptops and mobile devices lying around, and I now use them to cure diseases, find black holes, and solve difficult math problems. But I don't do a thing! I just install Folding@home (or BOINC), which takes care of most everything for me! Your computer has both a CPU and GPU, and this software uses them to do calculations, then it uses an Internet connection to send back the results. By default, calculations will only run when plugged in (not on battery power) and will not use mobile data (only WiFi or Ethernet). Processes are run with low priority to cause minimal interference with computer performance, and several settings exist to optionally restrict the software further.
In 2019, the Summit supercomputer was built (using RISC CPUs and Nvidia-Tesla GPUs) becoming the world's most powerful supercomputer. Folding@home was approaching the power of Summit and has far surpassed it due to influx of new users due to the coronavirus outbreak! BOINC was always less popular. Combining the efforts of many computers is called distributed computing, and, now that there are vast numbers of devices sitting around, let's put them to use! Getting access to supercomputers is difficult due to high demand, especially now that CPUs are no longer obeying Moore's law, so let's meet the demand!
If you have any iOS device (iPhone or iPad), you cannot use Folding@home or BOINC. Same for a Chromebook, though there are rumors of tricky ways to get BOINC to work on a Chromebook (good luck).
Folding@home software is very easy to use, it goes to a very important cause (curing, preventing, and treating diseases), and good scientific progress is being made. I highly recommend you do this before trying BOINC. Here is some basic info on what it does.
Folding@home is perfect for any desktop or laptop. In your computer's power settings, have it never go to sleep when plugged in (depending on your operating system, you might need to keep your laptop lid open when it charges). By default, Folding@home will not run on battery power, which is great. Even though RISC (ARM) processors are the future, x86 (Intel and AMD) processors are the present, so Folding@home should run on any x86 Windows, macOS, or Linux computer.
I found the documentation to be lacking and rarely updated. Below are some technical notes I have found to be quite useful. Just read the first half if you aren't a technical person.
Don't let work units reach timeout date. On timeout date, the work unit will be sent to someone else while it continues to run on your computer until its expiration date, causing a large waste of work and a delay for the entire project. Returning work units in a timely manner is crucial because the next batch of work units depends on the results of the previous batch. For this reason, you get more points if you finish earlier. If you see that many of your work units are timing out, please uninstall the software. If you plan on shutting down your computer for a long time, a few days before you will shut it down, set the work unit to "Finish".
The default installation requires you to login to your computer for Folding@home to run. Don't worry, switching users or the "lock screen" are not problems after you have logged in. What this means is, if your computer restarts without automatically logging in (or if there is a long-enough power outage), your computer will pause doing calculations until you login again.
After hitting the "Finish" button then having the work unit finish, I was annoyed to discover that, upon restarting my computer, a new work unit was downloaded. It turns out that, regardless of any "Pause" settings, when Folding@home starts up, it starts folding. It turns out that there is an "Expert" pause-on-start setting that can stop this behavior, but then it always starts on pause regardless of your settings! However, this setting is useful if you want to pause folding for a few weeks without having to uninstall the software.
Folding@home recommends to use the default "medium" power setting, which uses 75% of your logical CPU cores and allows for GPU processing. I recommend this too unless you find for some reason that your computer is throttling due to running too hot. On my primary computer that I actually care about, I set it to "light" (between 25% and 50% of logical cores) to prevent the fan from running too loud and possibly breaking the fan many years from now. On a computer with just 2 logical cores or ones that are never used for anything else, I use "full" setting to be sure that I use 100% of the cores.
None of my GPUs are powerful enough to be on the GPU whitelist. If your GPU is on this list, I highly recommend you keep allowing the software to use it! For certain types of calculations such as what Folding does, a GPU can do far faster calculations than using just a CPU. A GPU still requires the computer's brain, the CPU, to work. All Folding calculations can be done using a GPU, but that doesn't mean that all work units are designed for GPUs because: CPU-only programming is much easier, CPUs without GPUs still make a difference, and powerful GPUs can use a lot of electricity. To get a GPU to always run, use "full" setting, and, to get a GPU to run on idle, you need "medium". If "full" setting noticeably affects computer performance, reduce it! Great software is FAHBench to benchmark the CPU and GPU of your computer!
I recommend the default "While I'm working" setting (not "Only when idle"). The software runs at low priority causing it to basically only use the leftover CPU power, so I've never seen a drop in computer performance at "medium" setting. If you do "Only when idle", you will lose work as it reverts to the most recent checkpoint: every 1% or, for slow machines, every 15 minutes. The 15 minutes can be set to as low as 3 minutes, but saving checkpoints wastes resources, so I don't recommend it.
For some reason, it seems that the first CPU work unit sent to your computer will run with just 1 logical core regardless of your settings. Also, if a power setting allows for only 1 CPU core to run, you may get a work unit that does not allow parallel computing between multiple cores, so increasing the power setting will make no difference for just that work unit.
I much prefer the "Advanced Control" (aka "FAHControl") instead of the "web control". You can see much more information and access more settings beyond the basic power slider.
From what I can tell, TPF is the time between 1% checkpoints?
To combine points of many computers, make sure to set your identity (name and team) to the exact same thing on each computer.
Speaking of earning points, Folding@home is so successful partly because of their clever marketing campaign. For example, you can select a cause/disease to work on (though your choice does not guarantee that all your resources will go towards the cause). Of course it doesn't matter what you choose because people who don't choose will get more work for the causes that were least chosen. I recommend that you do not choose a cause in case not choosing allows the experts more freedom in choosing what to work on. But it makes people feel good to choose, and it doesn't hurt anything for them to "choose". This just goes to show that successfully communicating science requires the use of emotional tricks. Makes me wonder if all logical actions result from emotional tricks perhaps from our own brains.
By far, the things that get damaged the most on a computer are the mechanical parts (touchpads, mice, hinges, fans, etc.) and are usually the results of mechanical damage (dropping, spilling, etc.). The electrical circuits are typically just fine when a computer reaches its end of life, especially if you use them safely, so why not put them to use?
The real cost can be electricity, which, for an x86 CPU running 24-7 over decades, is less than cost of the computer, so why not get your money's worth by actually using your computer! This energy is actually helpful over the winter when the heat warms your home! And, for ARM CPUs in smaller devices, electricity is so tiny it doesn't matter.
You may notice slight performance loss, but the software is designed to work in the background to reduce this (especially with the right settings!).
High processor temperature might slightly affect life of CPU/GPU, but lack of temperature fluctuations might actually help! To be safe, look up the safe temperatures for your processors then figure out how to monitor the core temperature of your processor: download Speccy on Windows, use Intel Power Gadget on macOS, or, to see battery temperature on Android, get the CPU-Z app. Make sure that any fans are not blocked and that any charger (or any processor that doesn't have a fan) is exposed to the open air.
For some phones, there might be a slight effect on battery life due to "mini cycles". I cannot find reliable information on this. Laptops certainly do not have this issue.
For computers, the fans can wear out!
If you draw a lot of power by simultaneously charging external devices via USB, the PSU/charger can wear out over time, especially if fans or airflow are not sufficient.
Folding@home currently only runs on x86, so my ARM Android phone and Raspberry Pi cannot be used! Since ARM CPUs are extremely efficient, I very much want to use them! Also, Folding@home will not run on my Intel GPUs. GPUs are very fast, so I very much want to use them! This is where BOINC comes in.
Folding@home is designed to get the most from the fastest computers. BOINC on the other hand has a million different projects, options, and possibilities. BOINC is the Wild West of volunteer computing! There are many BOINC projects because BOINC is software that anyone can use to create a project. Do to the freedom of BOINC, I always do research to make sure that a projects is not a waste of time.
Currently, there are only 3 projects that can use Gen7 or newer Intel GPUs: Collatz Conjecture, Einstein@home, and SETI@home. SETI@home is hibernating since 2020-03-31. I don't want to contribute to Collatz Conjecture due to concerns with the project. I like and use Einstein@home, but it currently only has "opencl-intel_gpu" application versions for Windows. Projects that use GPUs usually have settings that you change to take full advantage of your particular GPU, but I haven't played around with these yet.
There are more options for my ARM devices. I am only interested in projects that are CPU-only. I would rather my CPU power go to projects that cannot use GPUs. Even so, there are still plenty of projects to choose from. In general, I prefer Rosetta@home and World Community Grid (WCG) because they are well administered and help treat and cure diseases. I must warn that Rosetta@home can use a lot of RAM. Some WCG sub-projects once used GPUs, but none currently do. Even if some do in the future, you can choose to not run any sub-project(s) you wish.
To use my Android phone while it charges overnight, I prefer WCG. Rosetta@home does not often have Android tasks (search here for "Rosetta for Android"). For WCG, upon suspending when I unplug my phone, only a small amount of work is lost due to tasks making frequent checkpoints (you want multiple checkpoints and short runtime). Sometimes, I run other projects when there are no available WCG Android tasks: Yoyo@home runs on an old Kindle but doesn't work on my phone for some reason, and Universe@Home works nicely.
To use my Raspberry Pi, I prefer Universe@Home or Yoyo@home. For Universe@Home, I had to disable the ULX application, though maybe upgrading Raspbian would allow the ULX application to run (if my SD card is large enough). For Yoyo@home, the ecm application may use too much RAM!
If you want to track your earned credits across projects, use the same email address for each project.
On your BOINC Manager, use the Advanced View (not the Simple View) for much more useful information!
BOINC projects offer many settings. Some are universal (all projects have them), and others are not.
• For each project, I must uncheck the "Suspend when non-BOINC CPU usage is above ___" option since BOINC runs at low priority and I sometimes run Folding@home alongside.
• For projects that I use my GPUs, I must turn off CPU-only tasks to allow Folding@home full access to my CPUs.
• On computers with nicer GPUs, I do not need the "Suspend GPU computing when computer is in use" setting.
• I want GPU tasks to have slightly higher CPU priority than CPU-only tasks so that the CPU is not limiting the GPU! For me, the default settings are perfect: GPU tasks on Einstein@home run at "below normal" priority, and WCG, Rosetta@home, and Folding@home run at "low" priority on Windows. I have not tested other projects, but they probably follow the same pattern.
• For any project that will let me, I allow beta (test) tasks because I trust the projects to know what's best more than me.
• For projects that I do CPU-only tasks, set "Leave non-GPU tasks in memory while suspended" to prevent wasted work. Sadly, this setting does not exist on Android.
• For some projects, I change various settings to allow them to publicly export data, publicly display data, link devices, etc. This allows me to track my progress across projects and to let other people see basic info about my computers.
On Android, there are more considerations in addition to there being no "Leave non-GPU tasks in memory while suspended" option...
• First of all, you need to install the app called "BOINC" made by U.C. Berkeley.
• The app doesn't list all projects that support Android, but, once you add your first project, there's an "add project by URL" option.
• ARM CPUs are very energy efficient, but a phone has no fans and a thick case without airflow can cause your phone to overheat. BOINC will suspend before your phone turns off, but let's avoid this situation! By using the CPU-Z app, I have found that my phone's battery temperature is increased a degree when using a thin case and another degree when I don't prop it up a bit to allow air get to its back (and I have never believed in using inductive charging). Also, I have found that it will be another degree cooler if you prop in up with the back facing up.
• A complication is that Android won't let a process use all CPU cores. I tested an old Kindle by comparing "run time" and "CPU time" on completed tasks, and I found that it used 2 of the 4 cores when run as background or as foreground (if I set BOINC to use more than 2 cores, the "run time" became significantly longer than "CPU time"). I tested my 4+4 core phone by using adb shell, and I found that, as a background process, only 4 little cores can be used. As a foreground process, 3 little cores and 4 big cores could be used (little cores are preferred when running less than 7 tasks, but an 8th task would hop between little and big cores). I recommend to set your device to use the number of cores that will actually be working else (1) you will lose more work each time you unplug the device and (2) you will slow the project's processing of individual workunits. Interestingly, if set to 7 tasks as foreground (using 4 big cores), it seems to run at about the same battery temperature as just using 1 big core. From what I can tell, Android will throttle the big cores for various complicated reasons.
• A related complication is that BOINC can run as a foreground process if you open the app too quickly after the phone restarts. To easily get a sense for how long BOINC takes to start, have your phone in a "BOINC friendly" state (plugged in, over 90% charged, etc.), then restart your phone and wait for the little "Computing" notification to appear! On my phone set to run 4 of 8 cores, running in foreground causes 3 little cores and 1 big core to run instead of 4 little cores. Using a big core causes my battery temperature to go too high for my comfort.
• In 2020, the "no new tasks" setting is initially somewhat hidden. Don't go to the "Projects" tab, but go to the tab of the actual project then start tapping around. After you use it once, the setting appears in all the expected places.
• Using the GPU is not an option for any known projects. Projects may never use GPUs due to heat.
• So that I can check my phone without all my tasks going back to their most recent checkpoint, I set "Don't require screen off" and I change my "max other-CPU" from 50% to 100%. These settings could be an issue if battery temperature goes over 40 degrees, so I install the CPU-Z app to verify that battery temperature is safe.
• On my Samsung phone, something called "Device care" keeps complaining. I just ignore it because it doesn't understand that BOINC will suspend if things get too hot, suspend if I unplug the device, and only run when battery is more than 90% charged.
On Raspberry Pi with Raspbian, there are more considerations...
• Pis are great for using CPUs on BOINC! Pis are cheap, have very energy efficient ARM CPUs, automatically restart after any power outage, and runs BOINC immediately after a restart. For some projects, RAM can be a limitation, but the Pi 4 allows you to get 4 GB of RAM!
• Try not to touch exposed parts of the Pi, especially when it's on! Electrostatic discharge once caused almost all my tasks from any project to say "Error while computing" for days until shutting down and unplugging the Pi (though maybe a simple restart could have fixed it).
• I recommend putting a heat sink on the Pi's processor, and orient the heatsink in a way to allow for vertical airflow when the Pi is placed on its side (you should place the Pi on its side!). Even like this, running all cores will cause my Pi 3B to very slightly throttle the CPU depending on room temperature. To fix this, an area with a slight breeze reduces the temperature by about 10 degrees (the same temperature drop as using 1 fewer core). Here is what the official Pi people have to say about temperatures. To measure CPU frequency for measuring throttling, use the `vcgencmd measure_clock arm` command.
• To install BOINC, run the command `sudo apt-get install boinc` (perhaps via SSH!). You can then run boinccmd or the usual GUI (perhaps via VNC!).
• Unlike on my Windows and macOS computers, you can set it to use only entire CPU cores to be run by BOINC, so 0%, 25%, 50%, 75%, and 100% are your options if you have 4 cores. Each task might use less than 25% if it is competing with other processes, but you cannot set it to use less.
• Using the GPU will not likely be an option any time soon. The main GPGPU interfaces are OpenCL (works on most GPUs), CUDA (only Nvidia GPUs), and now Apple's silly we-want-to-be-unique-and-not-work-with-anyone-else Metal. Anyway, OpenCL support for Pi certainly needs more work and may not bring much benefit.
The world is a big place with many projects!