BOINC, systemd and Linux process priority, next

In my previous post I believed to have my problem solved, the BOINC daemon was leaving system resources free if needed.

To do so I had configured systemd to allocate the lowest priority to the cgroup containing BOINC compute processes: sudo systemctl set-property boinc.service CPUWeight=1

This attribute is not available in systemd versions before 231, when it replaced the CPUShares attributes.

The equivalent setting for those versions is: systemctl set-property boinc.service CPUShares=2

This change reflects a change in the kernel configuration for cgroups. The cpu.shares attributes was replaced by cpu.weight. This change was not merged into the main Linux branch, as such systemd has to convert the CPUWeight value to its cpu.shares equivalent on my system.

However I noticed that playing videos on my system was having some slow downs. By doing the experiment previously described again, I got different results showing that BOINC was still not releasing all CPU resources when needed.

After reading some documentation as the systemd manual page about resource management and the kernel documentation about cgroups, I was able to understand better the problem.

Cgroups are hierarchically organized. CPU resources defined by a cgroup are shared by cgroups …

more ...

BOINC, systemd and Linux process priority

I've recently started to run BOINC in my computer again. It is a nice way to donate computing capacity to research projects.

BOINC principle is to only use unused ressources of my computer. It does so be giving the lowest priority to computing processes. On Linux this is done by setting the highest nice value to processes launched by BOINC, which is 19. The highest the nice value is, the least the process has priority.

19 is the idle priority, which means it allows using only CPU time which is not used by any process with higher priority. It is equivalent to use only unused resources of the system.

This setup was working fine for long on Linux. But I recently noticed that BOINC seemed to use more resources that what it should, as some applications were slower to run than usual. I tried to verify that. A simple way to do so is try using all computer ressources, and ensure they are available.

To so I launched 8 times (as my computer has 8 logical processing units) a command which uses all available CPU time.

for i in `seq 8`; do sha512sum /dev/zero&;done

By observing CPU using …

more ...