I got a bit annoyed that boinc still got quite a lot of CPU on a busy system even when run at nice level 19. I had a look at the various knobs the scheduler provides and found out that I'd like to be able to change its scheduling policy from SCHED_OTHER to SCHED_BATCH and also to change the CPU share allocated to the boinc user under the CFS scheduler. The former can be achieved using the chrt command line tool, while the latter is done by writing to /sys/kernel/${BOINCS_UID}/cpu_share file after at least one process has its uid set to that of the boinc user. I've written a patch to the config file and init script to implement these features. I also changed "setsid start-stop-daemon ... &" to "start-stop-daemon --background", mainly because this should print error messages in the case of bad arguments to start-stop-daemon, instead of redirecting them as well.
Created attachment 169386 [details, diff] Use chrt and cpu_share
Ping? Issue is two months old, please let me know if you are willing to include this kind of patch in general, and if there are any issues with the one I provided in particular.
# ChangeLog for sci-misc/boinc # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 # $Header: /var/cvsroot/gentoo-x86/sci-misc/boinc/ChangeLog,v 1.45 2009/01/02 20:40:21 cryos Exp $ 02 Jan 2009; Marcus D. Hanwell <cryos@gentoo.org> metadata.xml: Removed myself as maintainer.
hi, could you test against boinc-6.4.5 or 6.5.0 You can find them in sci overlay as boinc-bin for now (it is work in progress so i am willing to accept any patches now :P)
(In reply to comment #4) > hi, could you test against boinc-6.4.5 or 6.5.0 Confirmed to be still an issue for current state of the 6.5.0 ebuild. http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=tree;f=sci-misc/boinc-bin;h=6d68ba5aeb2337187e0e2bde7167e9a587a21844;hb=HEAD The patch from comment #1 still applies to the corresponding files.
Thanks for the patch and that you bare for such long time unnoticed. In the tree so enjoy :]