Struct systemd_unit::resource_control::ResourceControl[][src]

pub struct ResourceControl { /* fields omitted */ }

systemd.resource-control — Resource control unit settings

Synopsis

slice.slice, scope.scope, service.service, socket.socket, mount.mount, swap.swap Description

Unit configuration files for services, slices, scopes, sockets, mount points, and swap devices share a subset of configuration options for resource control of spawned processes. Internally, this relies on the Linux Control Groups (cgroups) kernel concept for organizing processes in a hierarchical tree of named groups for the purpose of resource management.

This man page lists the configuration options shared by those six unit types. See systemd.unit(5) for the common options of all unit configuration files, and systemd.slice(5), systemd.scope(5), systemd.service(5), systemd.socket(5), systemd.mount(5), and systemd.swap(5) for more information on the specific unit configuration files. The resource control configuration options are configured in the [Slice], [Scope], [Service], [Socket], [Mount], or [Swap] sections, depending on the unit type.

In addition, options which control resources available to programs executed by systemd are listed in systemd.exec(5). Those options complement options listed here.

See the New Control Group Interfaces for an introduction on how to make use of resource control APIs from programs. Implicit Dependencies

The following dependencies are implicitly added:

  • Units with the Slice= setting set automatically acquire Requires= and After= dependencies on the specified slice unit.

Unified and Legacy Control Group Hierarchies

The unified control group hierarchy is the new version of kernel control group interface, see Control Groups v2. Depending on the resource type, there are differences in resource control capabilities. Also, because of interface changes, some resource types have separate set of options on the unified hierarchy.

CPU CPUWeight= and StartupCPUWeight= replace CPUShares= and StartupCPUShares=, respectively.

The “cpuacct” controller does not exist separately on the unified hierarchy.

Memory MemoryMax= replaces MemoryLimit=. MemoryLow= and MemoryHigh= are effective only on unified hierarchy.

IO “IO”-prefixed settings are a superset of and replace “BlockIO”-prefixed ones. On unified hierarchy, IO resource control also applies to buffered writes.

To ease the transition, there is best-effort translation between the two versions of settings. For each controller, if any of the settings for the unified hierarchy are present, all settings for the legacy hierarchy are ignored. If the resulting settings are for the other type of hierarchy, the configurations are translated before application.

Legacy control group hierarchy (see Control Groups version 1), also called cgroup-v1, doesn’t allow safe delegation of controllers to unprivileged processes. If the system uses the legacy control group hierarchy, resource control is disabled for the systemd user instance, see systemd(1).

Trait Implementations

impl Debug for ResourceControl[src]

impl Default for ResourceControl[src]

impl Serialize for ResourceControl[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.