Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 453772

Summary: systemwide use of taskset for pinning daemons to cpus on multicore systems
Product: Gentoo Hosted Projects Reporter: Lorinc Czegledi <lorinc.czegledi>
Component: OpenRCAssignee: OpenRC Team <openrc>
Status: UNCONFIRMED ---    
Severity: enhancement CC: bug, polynomial-c
Priority: Low    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Lorinc Czegledi 2013-01-24 08:14:37 UTC
nowadays with multicore systems widely available it would be very nice to have a system-wide configuration option somewhere - like rc.conf, or security/limits.conf -, which is taken into account by the start-stop-daemon within each initscript, that allows pinning of the started process to a given cpu using the taskset command
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-01-24 13:54:12 UTC
(In reply to comment #0)
> nowadays with multicore systems widely available

SMP systems with similar locality constraints have been available since many years before Gentoo was born. :)

> it would be very nice to
> have a system-wide configuration option somewhere - like rc.conf, or
> security/limits.conf -, which is taken into account by the start-stop-daemon
> within each initscript, that allows pinning of the started process to a
> given cpu using the taskset command

This is what cgroups was developed for. taskset is rather primitive by comparison. There is a kernel part and a userland part. Try out the tools installed with dev-libs/libcgroup, perhaps? Newer sys-apps/openrc has support for cgroups already. Is there anything special you are looking for here?
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2013-02-01 14:24:44 UTC
*** Bug 455024 has been marked as a duplicate of this bug. ***
Comment 3 Marcin Mirosław 2013-02-02 14:39:49 UTC
(Continuing my bug). I didn't use cgroups, I quickly read documentation so it's high chance I'm wrong. Meseems it's a little problematic to put a few very similar tasks (like two redis instances or qemu VM running as the same user 'nobody') to diffrent cgroups. It's possible to put task usnig pid (what about threading apps?) but it looks openrc doesn't have such funcionality (yet?).