[systemd-devel] Setting Environment Configuration (Affinity) for Slices

Chris Bell cwbell at narmos.org
Mon Oct 19 10:19:42 PDT 2015


On 2015-10-19 17:16, Chris Bell wrote:
> Basically, I have a number of services that may or may not be running
> at any given time, based on the whims of the users. All of these
> services are hosted services of some type, and occasionally they have
> been known to eat all CPU cores, lagging everything else. I'm working
> on setting up CPU shares and other resource controls to try and keep
> resources available for immediate execution of system processes,
> services, etc. I'd prefer to do this with affinity; assign critical
> processes to CPUs 0-1, and the rest limited to subsets of the
> available remaining CPUs. I was hoping I could do this in one run by
> saying "everything in this slice can must run with this affinity." I
> can do it on a per-service basis, but with a large number of services
> it gets tedious.
> 
> I also think it would be convenient in some cases to be able to use
> the 'Nice' and 'Private{Network,Devices,etc}' directives apply to an
> entire slice. That way I can use slices to control, manage, and group
> related services. (Example: I'd like to manage postfix and dovecot
> together in system-mail.slice. I'd like to be able to use the slice to
> set exec options for both services. Then if I add another service to
> system-mail.slice, it would also automatically be constrained by the
> limits set in system-mail.slice.)
> 
> Basically, I think this would be a useful hierarchy level for more
> coarse-grained service group management and configuration.

Wait...... Is what I'm looking for here a container?


More information about the systemd-devel mailing list