Summary: | sci-misc/boinc should use cgroups instead of nice -19 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Sven Eden <sven.eden> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | arthur, bircoph, jstein, redwolfe, sci |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Toralf Förster
2014-12-29 14:29:07 UTC
Basically I agree, but there are two things to consider: 1) Does the cgroup setting cascade down to the applications started by the boinc daemon? 2) What about the (many?) users who either use a kernel with BFS scheduler (no cgroups) or have cgroups disabled themselves? 1) definitely yes IMO, due to the autogroup feature of the kernel 2) no idea Sorry for the long delay. I am currently working on other bugs. Hopefully I have my next pull request ready this afternoon. If it gets accepted, I'll add the cgroups support. For something like BOINC it looks really promising. Any news? (In reply to Jonas Stein from comment #4) > Any news? The problem is to have an idea how to do this correctly. - What if a user does not have cgroups support? Make cgroups support mandatory? - Wouldn't it be sufficient to add something like "boinc cpu,memory background" to /etc/cgroup/cgrules.conf? /etc/init.d/cgred would have to run anyway, right? However, even if the usage of cgexec is not needed, the init script must at least create and configure the cgroup. Actually I think it is sufficient to add -------- group background { cpu { cpu.shares="8"; } memory { memory.limit_in_bytes="16G"; memory.memsw.limit_in_bytes="24G"; } } -------- to /etc/cgroup/cgconfig.conf, this is my config on an 8 core notebook with 32GB RAM, and to add -------- @boinc cpu,memory background -------- to /etc/cgroup/cgrules.conf. All processes started by someone in the boinc group are then handled by cpu/background and cpu/background. (In reply to Sven Eden from comment #6) > Actually I think it is sufficient to add > > -------- > group background { > cpu { > cpu.shares="8"; > } > memory { > memory.limit_in_bytes="16G"; > memory.memsw.limit_in_bytes="24G"; > } > } > -------- > > to /etc/cgroup/cgconfig.conf, this is my config on an 8 core notebook with > 32GB RAM, and to add > > -------- > @boinc cpu,memory background > -------- > > to /etc/cgroup/cgrules.conf. All processes started by someone in the boinc > group are then handled by cpu/background and cpu/background. This is not portable. How about users with different CPU/RAM amounts? Anyway, there are people not using cgroups (including myself), so nice should be available as fallback. BTW, if one wants to save battery, why to run BOINC in the first place? I always thought it is for desktops/servers with resources wasted otherwise. (In reply to Andrew Savchenko from comment #7) > > to /etc/cgroup/cgconfig.conf, this is my config on an 8 core notebook with > > 32GB RAM, and to add > > > > -------- > > @boinc cpu,memory background > > -------- > > > > to /etc/cgroup/cgrules.conf. All processes started by someone in the boinc > > This is not portable. How about users with different CPU/RAM amounts? Of course not. Every user who wants cgroups can set this up for themselves without any change needed on the boinc init script. It really can not decide for you how to set it up. I could add this stuff to the init script, setting everything up manually, and steered through /etc/conf.d/boinc, but I couldn't even come up with sane defaults. > Anyway, there are people not using cgroups (including myself), so nice > should be available as fallback. Yes. That's why I thought about this manual DIY-approach. > BTW, if one wants to save battery, why to run BOINC in the first place? I > always thought it is for desktops/servers with resources wasted otherwise. BOINC goes into suspend mode when running on battery. At least that's the default. Users can change that on their own discretion of course... (In reply to Sven Eden from comment #8) > Of course not. Every user who wants cgroups can set this up for themselves > without any change needed on the boinc init script. It really can not decide > for you how to set it up. Ah, OK. Sorry I misunderstood you, I though you're suggesting these values as defaults for everyone. I am closing this, because I can not find a simple solution that does not result in a no-fit for most users. The setup of cgroups to control cpu and memory shares are highly dependent on the target machines layout, both hardware and other cgroups configurations, that it is best to let users configure this themselves (this is actually quite easy) if they care. Please feel free to re-open this bug if a simple solution crosses your path. |