{
    "mode": "man",
    "parameter": "systemd.resource-control",
    "section": "5",
    "url": "https://www.chedong.com/phpMan.php/man/systemd.resource-control/5/json",
    "generated": "2026-10-13T01:30:43Z",
    "synopsis": "slice.slice, scope.scope, service.service, socket.socket, mount.mount, swap.swap",
    "sections": {
        "NAME": {
            "content": "systemd.resource-control - Resource control unit settings\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "slice.slice, scope.scope, service.service, socket.socket, mount.mount, swap.swap\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Unit configuration files for services, slices, scopes, sockets, mount points, and swap\ndevices share a subset of configuration options for resource control of spawned processes.\nInternally, this relies on the Linux Control Groups (cgroups) kernel concept for organizing\nprocesses in a hierarchical tree of named groups for the purpose of resource management.\n\nThis man page lists the configuration options shared by those six unit types. See\nsystemd.unit(5) for the common options of all unit configuration files, and systemd.slice(5),\nsystemd.scope(5), systemd.service(5), systemd.socket(5), systemd.mount(5), and\nsystemd.swap(5) for more information on the specific unit configuration files. The resource\ncontrol configuration options are configured in the [Slice], [Scope], [Service], [Socket],\n[Mount], or [Swap] sections, depending on the unit type.\n\nIn addition, options which control resources available to programs executed by systemd are\nlisted in systemd.exec(5). Those options complement options listed here.\n",
            "subsections": [
                {
                    "name": "Enabling and disabling controllers",
                    "content": "Controllers in the cgroup hierarchy are hierarchical, and resource control is realized by\ndistributing resource assignments between siblings in branches of the cgroup hierarchy. There\nis no need to explicitly enable a cgroup controller for a unit.  systemd will instruct the\nkernel to enable a controller for a given unit when this unit has configuration for a given\ncontroller. For example, when CPUWeight= is set, the cpu controller will be enabled, and when\nTasksMax= are set, the pids controller will be enabled. In addition, various controllers may\nbe also be enabled explicitly via the MemoryAccounting=/TasksAccounting=/IOAccounting=\nsettings. Because of how the cgroup hierarchy works, controllers will be automatically\nenabled for all parent units and for any sibling units starting with the lowest level at\nwhich a controller is enabled. Units for which a controller is enabled may be subject to\nresource control even if they don't have any explicit configuration.\n\nSetting Delegate= enables any delegated controllers for that unit (see below). The delegatee\nmay then enable controllers for its children as appropriate. In particular, if the delegatee\nis systemd (in the user@.service unit), it will repeat the same logic as the system instance\nand enable controllers for user units which have resource limits configured, and their\nsiblings and parents and parents' siblings.\n\nControllers may be disabled for parts of the cgroup hierarchy with DisableControllers= (see\nbelow).\n"
                },
                {
                    "name": "Example 1. Enabling and disabling controllers",
                    "content": "-.slice\n/       \\\n/-----/         \\--------------\\\n/                                \\\nsystem.slice                       user.slice\n/       \\                          /      \\\n/         \\                        /        \\\n/           \\              user@42.service  user@1000.service\n/             \\             Delegate=        Delegate=yes\na.service       b.slice                             /        \\\nCPUWeight=20   DisableControllers=cpu              /          \\\n/  \\                      app.slice      session.slice\n/    \\                     CPUWeight=100  CPUWeight=100\n/      \\\nb1.service   b2.service\nCPUWeight=1000\n\n\nIn this hierarchy, the cpu controller is enabled for all units shown except b1.service and\nb2.service. Because there is no explicit configuration for system.slice and user.slice, CPU\nresources will be split equally between them. Similarly, resources are allocated equally\nbetween children of user.slice and between the child slices beneath user@1000.service.\nAssuming that there is no further configuration of resources or delegation below slices\napp.slice or session.slice, the cpu controller would not be enabled for units in those slices\nand CPU resources would be further allocated using other mechanisms, e.g. based on nice\nlevels. The manager for user 42 has delegation enabled without any controllers, i.e. it can\nmanipulate its subtree of the cgroup hierarchy, but without resource control.\n\nIn the slice system.slice, CPU resources are split 1:6 for service a.service, and 5:6 for\nslice b.slice, because slice b.slice gets the default value of 100 for cpu.weight when\nCPUWeight= is not set.\n\nCPUWeight= setting in service b2.service is neutralized by DisableControllers= in slice\nb.slice, so the cpu controller would not be enabled for services b1.service and b2.service,\nand CPU resources would be further allocated using other mechanisms, e.g. based on nice\nlevels.\n"
                },
                {
                    "name": "Setting resource controls for a group of related units",
                    "content": "As described in systemd.unit(5), the settings listed here may be set through the main file of\na unit and drop-in snippets in *.d/ directories. The list of directories searched for\ndrop-ins includes names formed by repeatedly truncating the unit name after all dashes. This\nis particularly convenient to set resource limits for a group of units with similar names.\n\nFor example, every user gets their own slice user-nnn.slice. Drop-ins with local\nconfiguration that affect user 1000 may be placed in /etc/systemd/system/user-1000.slice,\n/etc/systemd/system/user-1000.slice.d/*.conf, but also\n/etc/systemd/system/user-.slice.d/*.conf. This last directory applies to all user slices.\n\nSee the New Control Group Interfaces[1] for an introduction on how to make use of resource\ncontrol APIs from programs.\n"
                }
            ]
        },
        "IMPLICIT DEPENDENCIES": {
            "content": "The following dependencies are implicitly added:\n\n•   Units with the Slice= setting set automatically acquire Requires= and After= dependencies\non the specified slice unit.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "Units of the types listed above can have settings for resource control configuration:\n",
            "subsections": [
                {
                    "name": "CPU Accounting and Control",
                    "content": "CPUAccounting=\nTurn on CPU usage accounting for this unit. Takes a boolean argument. Note that turning\non CPU accounting for one unit will also implicitly turn it on for all units contained in\nthe same slice and for all its parent slices and the units contained therein. The system\ndefault for this setting may be controlled with DefaultCPUAccounting= in systemd-\nsystem.conf(5).\n\nUnder the unified cgroup hierarchy, CPU accounting is available for all units and this\nsetting has no effect.\n\nAdded in version 208.\n\nCPUWeight=weight, StartupCPUWeight=weight\nThese settings control the cpu controller in the unified hierarchy.\n\nThese options accept an integer value or a the special string \"idle\":\n\n•   If set to an integer value, assign the specified CPU time weight to the processes\nexecuted, if the unified control group hierarchy is used on the system. These options\ncontrol the \"cpu.weight\" control group attribute. The allowed range is 1 to 10000.\nDefaults to unset, but the kernel default is 100. For details about this control\ngroup attribute, see Control Groups v2[2] and CFS Scheduler[3]. The available CPU\ntime is split up among all units within one slice relative to their CPU time weight.\nA higher weight means more CPU time, a lower weight means less.\n\n•   If set to the special string \"idle\", mark the cgroup for \"idle scheduling\", which\nmeans that it will get CPU resources only when there are no processes not marked in\nthis way to execute in this cgroup or its siblings. This setting corresponds to the\n\"cpu.idle\" cgroup attribute.\n\nNote that this value only has an effect on cgroup-v2, for cgroup-v1 it is equivalent\nto the minimum weight.\n\nWhile StartupCPUWeight= applies to the startup and shutdown phases of the system,\nCPUWeight= applies to normal runtime of the system, and if the former is not set also to\nthe startup and shutdown phases. Using StartupCPUWeight= allows prioritizing specific\nservices at boot-up and shutdown differently than during normal runtime.\n\nIn addition to the resource allocation performed by the cpu controller, the kernel may\nautomatically divide resources based on session-id grouping, see \"The autogroup feature\"\nin sched(7). The effect of this feature is similar to the cpu controller with no explicit\nconfiguration, so users should be careful to not mistake one for the other.\n\nAdded in version 232.\n\nCPUQuota=\nThis setting controls the cpu controller in the unified hierarchy.\n\nAssign the specified CPU time quota to the processes executed. Takes a percentage value,\nsuffixed with \"%\". The percentage specifies how much CPU time the unit shall get at\nmaximum, relative to the total CPU time available on one CPU. Use values > 100% for\nallotting CPU time on more than one CPU. This controls the \"cpu.max\" attribute on the\nunified control group hierarchy and \"cpu.cfsquotaus\" on legacy. For details about these\ncontrol group attributes, see Control Groups v2[2] and CFS Bandwidth Control[4]. Setting\nCPUQuota= to an empty value unsets the quota.\n\nExample: CPUQuota=20% ensures that the executed processes will never get more than 20%\nCPU time on one CPU.\n\nAdded in version 213.\n\nCPUQuotaPeriodSec=\nThis setting controls the cpu controller in the unified hierarchy.\n\nAssign the duration over which the CPU time quota specified by CPUQuota= is measured.\nTakes a time duration value in seconds, with an optional suffix such as \"ms\" for\nmilliseconds (or \"s\" for seconds.) The default setting is 100ms. The period is clamped to\nthe range supported by the kernel, which is [1ms, 1000ms]. Additionally, the period is\nadjusted up so that the quota interval is also at least 1ms. Setting CPUQuotaPeriodSec=\nto an empty value resets it to the default.\n\nThis controls the second field of \"cpu.max\" attribute on the unified control group\nhierarchy and \"cpu.cfsperiodus\" on legacy. For details about these control group\nattributes, see Control Groups v2[2] and CFS Scheduler[3].\n\nExample: CPUQuotaPeriodSec=10ms to request that the CPU quota is measured in periods of\n10ms.\n\nAdded in version 242.\n\nAllowedCPUs=, StartupAllowedCPUs=\nThis setting controls the cpuset controller in the unified hierarchy.\n\nRestrict processes to be executed on specific CPUs. Takes a list of CPU indices or ranges\nseparated by either whitespace or commas. CPU ranges are specified by the lower and upper\nCPU indices separated by a dash.\n\nSetting AllowedCPUs= or StartupAllowedCPUs= doesn't guarantee that all of the CPUs will\nbe used by the processes as it may be limited by parent units. The effective\nconfiguration is reported as EffectiveCPUs=.\n\nWhile StartupAllowedCPUs= applies to the startup and shutdown phases of the system,\nAllowedCPUs= applies to normal runtime of the system, and if the former is not set also\nto the startup and shutdown phases. Using StartupAllowedCPUs= allows prioritizing\nspecific services at boot-up and shutdown differently than during normal runtime.\n\nThis setting is supported only with the unified control group hierarchy.\n\nAdded in version 244.\n"
                },
                {
                    "name": "Memory Accounting and Control",
                    "content": "MemoryAccounting=\nThis setting controls the memory controller in the unified hierarchy.\n\nTurn on process and kernel memory accounting for this unit. Takes a boolean argument.\nNote that turning on memory accounting for one unit will also implicitly turn it on for\nall units contained in the same slice and for all its parent slices and the units\ncontained therein. The system default for this setting may be controlled with\nDefaultMemoryAccounting= in systemd-system.conf(5).\n\nAdded in version 208.\n\nMemoryMin=bytes, MemoryLow=bytes, StartupMemoryLow=bytes, DefaultStartupMemoryLow=bytes\nThese settings control the memory controller in the unified hierarchy.\n\nSpecify the memory usage protection of the executed processes in this unit. When\nreclaiming memory, the unit is treated as if it was using less memory resulting in memory\nto be preferentially reclaimed from unprotected units. Using MemoryLow= results in a\nweaker protection where memory may still be reclaimed to avoid invoking the OOM killer in\ncase there is no other reclaimable memory.\n\nFor a protection to be effective, it is generally required to set a corresponding\nallocation on all ancestors, which is then distributed between children (with the\nexception of the root slice). Any MemoryMin= or MemoryLow= allocation that is not\nexplicitly distributed to specific children is used to create a shared protection for all\nchildren. As this is a shared protection, the children will freely compete for the\nmemory.\n\nTakes a memory size in bytes. If the value is suffixed with K, M, G or T, the specified\nmemory size is parsed as Kilobytes, Megabytes, Gigabytes, or Terabytes (with the base\n1024), respectively. Alternatively, a percentage value may be specified, which is taken\nrelative to the installed physical memory on the system. If assigned the special value\n\"infinity\", all available memory is protected, which may be useful in order to always\ninherit all of the protection afforded by ancestors. This controls the \"memory.min\" or\n\"memory.low\" control group attribute. For details about this control group attribute, see\nMemory Interface Files[5].\n\nUnits may have their children use a default \"memory.min\" or \"memory.low\" value by\nspecifying DefaultMemoryMin= or DefaultMemoryLow=, which has the same semantics as\nMemoryMin= and MemoryLow=, or DefaultStartupMemoryLow= which has the same semantics as\nStartupMemoryLow=. This setting does not affect \"memory.min\" or \"memory.low\" in the unit\nitself. Using it to set a default child allocation is only useful on kernels older than\n5.7, which do not support the \"memoryrecursiveprot\" cgroup2 mount option.\n\nWhile StartupMemoryLow= applies to the startup and shutdown phases of the system,\nMemoryMin= applies to normal runtime of the system, and if the former is not set also to\nthe startup and shutdown phases. Using StartupMemoryLow= allows prioritizing specific\nservices at boot-up and shutdown differently than during normal runtime.\n\nAdded in version 240.\n\nMemoryHigh=bytes, StartupMemoryHigh=bytes\nThese settings control the memory controller in the unified hierarchy.\n\nSpecify the throttling limit on memory usage of the executed processes in this unit.\nMemory usage may go above the limit if unavoidable, but the processes are heavily slowed\ndown and memory is taken away aggressively in such cases. This is the main mechanism to\ncontrol memory usage of a unit.\n\nTakes a memory size in bytes. If the value is suffixed with K, M, G or T, the specified\nmemory size is parsed as Kilobytes, Megabytes, Gigabytes, or Terabytes (with the base\n1024), respectively. Alternatively, a percentage value may be specified, which is taken\nrelative to the installed physical memory on the system. If assigned the special value\n\"infinity\", no memory throttling is applied. This controls the \"memory.high\" control\ngroup attribute. For details about this control group attribute, see Memory Interface\nFiles[5].\n\nWhile StartupMemoryHigh= applies to the startup and shutdown phases of the system,\nMemoryHigh= applies to normal runtime of the system, and if the former is not set also to\nthe startup and shutdown phases. Using StartupMemoryHigh= allows prioritizing specific\nservices at boot-up and shutdown differently than during normal runtime.\n\nAdded in version 231.\n\nMemoryMax=bytes, StartupMemoryMax=bytes\nThese settings control the memory controller in the unified hierarchy.\n\nSpecify the absolute limit on memory usage of the executed processes in this unit. If\nmemory usage cannot be contained under the limit, out-of-memory killer is invoked inside\nthe unit. It is recommended to use MemoryHigh= as the main control mechanism and use\nMemoryMax= as the last line of defense.\n\nTakes a memory size in bytes. If the value is suffixed with K, M, G or T, the specified\nmemory size is parsed as Kilobytes, Megabytes, Gigabytes, or Terabytes (with the base\n1024), respectively. Alternatively, a percentage value may be specified, which is taken\nrelative to the installed physical memory on the system. If assigned the special value\n\"infinity\", no memory limit is applied. This controls the \"memory.max\" control group\nattribute. For details about this control group attribute, see Memory Interface Files[5].\n\nWhile StartupMemoryMax= applies to the startup and shutdown phases of the system,\nMemoryMax= applies to normal runtime of the system, and if the former is not set also to\nthe startup and shutdown phases. Using StartupMemoryMax= allows prioritizing specific\nservices at boot-up and shutdown differently than during normal runtime.\n\nAdded in version 231.\n\nMemorySwapMax=bytes, StartupMemorySwapMax=bytes\nThese settings control the memory controller in the unified hierarchy.\n\nSpecify the absolute limit on swap usage of the executed processes in this unit.\n\nTakes a swap size in bytes. If the value is suffixed with K, M, G or T, the specified\nswap size is parsed as Kilobytes, Megabytes, Gigabytes, or Terabytes (with the base\n1024), respectively. If assigned the special value \"infinity\", no swap limit is applied.\nThese settings control the \"memory.swap.max\" control group attribute. For details about\nthis control group attribute, see Memory Interface Files[5].\n\nWhile StartupMemorySwapMax= applies to the startup and shutdown phases of the system,\nMemorySwapMax= applies to normal runtime of the system, and if the former is not set also\nto the startup and shutdown phases. Using StartupMemorySwapMax= allows prioritizing\nspecific services at boot-up and shutdown differently than during normal runtime.\n\nAdded in version 232.\n\nMemoryZSwapMax=bytes, StartupMemoryZSwapMax=bytes\nThese settings control the memory controller in the unified hierarchy.\n\nSpecify the absolute limit on zswap usage of the processes in this unit. Zswap is a\nlightweight compressed cache for swap pages. It takes pages that are in the process of\nbeing swapped out and attempts to compress them into a dynamically allocated RAM-based\nmemory pool. If the limit specified is hit, no entries from this unit will be stored in\nthe pool until existing entries are faulted back or written out to disk. See the kernel's\nZswap[6] documentation for more details.\n\nTakes a size in bytes. If the value is suffixed with K, M, G or T, the specified size is\nparsed as Kilobytes, Megabytes, Gigabytes, or Terabytes (with the base 1024),\nrespectively. If assigned the special value \"infinity\", no limit is applied. These\nsettings control the \"memory.zswap.max\" control group attribute. For details about this\ncontrol group attribute, see Memory Interface Files[5].\n\nWhile StartupMemoryZSwapMax= applies to the startup and shutdown phases of the system,\nMemoryZSwapMax= applies to normal runtime of the system, and if the former is not set\nalso to the startup and shutdown phases. Using StartupMemoryZSwapMax= allows prioritizing\nspecific services at boot-up and shutdown differently than during normal runtime.\n\nAdded in version 253.\n\nAllowedMemoryNodes=, StartupAllowedMemoryNodes=\nThese settings control the cpuset controller in the unified hierarchy.\n\nRestrict processes to be executed on specific memory NUMA nodes. Takes a list of memory\nNUMA nodes indices or ranges separated by either whitespace or commas. Memory NUMA nodes\nranges are specified by the lower and upper NUMA nodes indices separated by a dash.\n\nSetting AllowedMemoryNodes= or StartupAllowedMemoryNodes= doesn't guarantee that all of\nthe memory NUMA nodes will be used by the processes as it may be limited by parent units.\nThe effective configuration is reported as EffectiveMemoryNodes=.\n\nWhile StartupAllowedMemoryNodes= applies to the startup and shutdown phases of the\nsystem, AllowedMemoryNodes= applies to normal runtime of the system, and if the former is\nnot set also to the startup and shutdown phases. Using StartupAllowedMemoryNodes= allows\nprioritizing specific services at boot-up and shutdown differently than during normal\nruntime.\n\nThis setting is supported only with the unified control group hierarchy.\n\nAdded in version 244.\n"
                },
                {
                    "name": "Process Accounting and Control",
                    "content": "TasksAccounting=\nThis setting controls the pids controller in the unified hierarchy.\n\nTurn on task accounting for this unit. Takes a boolean argument. If enabled, the kernel\nwill keep track of the total number of tasks in the unit and its children. This number\nincludes both kernel threads and userspace processes, with each thread counted\nindividually. Note that turning on tasks accounting for one unit will also implicitly\nturn it on for all units contained in the same slice and for all its parent slices and\nthe units contained therein. The system default for this setting may be controlled with\nDefaultTasksAccounting= in systemd-system.conf(5).\n\nAdded in version 227.\n\nTasksMax=N\nThis setting controls the pids controller in the unified hierarchy.\n\nSpecify the maximum number of tasks that may be created in the unit. This ensures that\nthe number of tasks accounted for the unit (see above) stays below a specific limit. This\neither takes an absolute number of tasks or a percentage value that is taken relative to\nthe configured maximum number of tasks on the system. If assigned the special value\n\"infinity\", no tasks limit is applied. This controls the \"pids.max\" control group\nattribute. For details about this control group attribute, the pids controller[7].\n\nThe system default for this setting may be controlled with DefaultTasksMax= in systemd-\nsystem.conf(5).\n\nAdded in version 227.\n"
                },
                {
                    "name": "IO Accounting and Control",
                    "content": "IOAccounting=\nThis setting controls the io controller in the unified hierarchy.\n\nTurn on Block I/O accounting for this unit, if the unified control group hierarchy is\nused on the system. Takes a boolean argument. Note that turning on block I/O accounting\nfor one unit will also implicitly turn it on for all units contained in the same slice\nand all for its parent slices and the units contained therein. The system default for\nthis setting may be controlled with DefaultIOAccounting= in systemd-system.conf(5).\n\nAdded in version 230.\n\nIOWeight=weight, StartupIOWeight=weight\nThese settings control the io controller in the unified hierarchy.\n\nSet the default overall block I/O weight for the executed processes, if the unified\ncontrol group hierarchy is used on the system. Takes a single weight value (between 1 and\n10000) to set the default block I/O weight. This controls the \"io.weight\" control group\nattribute, which defaults to 100. For details about this control group attribute, see IO\nInterface Files[8]. The available I/O bandwidth is split up among all units within one\nslice relative to their block I/O weight. A higher weight means more I/O bandwidth, a\nlower weight means less.\n\nWhile StartupIOWeight= applies to the startup and shutdown phases of the system,\nIOWeight= applies to the later runtime of the system, and if the former is not set also\nto the startup and shutdown phases. This allows prioritizing specific services at boot-up\nand shutdown differently than during runtime.\n\nAdded in version 230.\n\nIODeviceWeight=device weight\nThis setting controls the io controller in the unified hierarchy.\n\nSet the per-device overall block I/O weight for the executed processes, if the unified\ncontrol group hierarchy is used on the system. Takes a space-separated pair of a file\npath and a weight value to specify the device specific weight value, between 1 and 10000.\n(Example: \"/dev/sda 1000\"). The file path may be specified as path to a block device node\nor as any other file, in which case the backing block device of the file system of the\nfile is determined. This controls the \"io.weight\" control group attribute, which defaults\nto 100. Use this option multiple times to set weights for multiple devices. For details\nabout this control group attribute, see IO Interface Files[8].\n\nThe specified device node should reference a block device that has an I/O scheduler\nassociated, i.e. should not refer to partition or loopback block devices, but to the\noriginating, physical device. When a path to a regular file or directory is specified it\nis attempted to discover the correct originating device backing the file system of the\nspecified path. This works correctly only for simpler cases, where the file system is\ndirectly placed on a partition or physical block device, or where simple 1:1 encryption\nusing dm-crypt/LUKS is used. This discovery does not cover complex storage and in\nparticular RAID and volume management storage devices.\n\nAdded in version 230.\n\nIOReadBandwidthMax=device bytes, IOWriteBandwidthMax=device bytes\nThese settings control the io controller in the unified hierarchy.\n\nSet the per-device overall block I/O bandwidth maximum limit for the executed processes,\nif the unified control group hierarchy is used on the system. This limit is not\nwork-conserving and the executed processes are not allowed to use more even if the device\nhas idle capacity. Takes a space-separated pair of a file path and a bandwidth value (in\nbytes per second) to specify the device specific bandwidth. The file path may be a path\nto a block device node, or as any other file in which case the backing block device of\nthe file system of the file is used. If the bandwidth is suffixed with K, M, G, or T, the\nspecified bandwidth is parsed as Kilobytes, Megabytes, Gigabytes, or Terabytes,\nrespectively, to the base of 1000. (Example:\n\"/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0 5M\"). This controls the \"io.max\" control\ngroup attributes. Use this option multiple times to set bandwidth limits for multiple\ndevices. For details about this control group attribute, see IO Interface Files[8].\n\nSimilar restrictions on block device discovery as for IODeviceWeight= apply, see above.\n\nAdded in version 230.\n\nIOReadIOPSMax=device IOPS, IOWriteIOPSMax=device IOPS\nThese settings control the io controller in the unified hierarchy.\n\nSet the per-device overall block I/O IOs-Per-Second maximum limit for the executed\nprocesses, if the unified control group hierarchy is used on the system. This limit is\nnot work-conserving and the executed processes are not allowed to use more even if the\ndevice has idle capacity. Takes a space-separated pair of a file path and an IOPS value\nto specify the device specific IOPS. The file path may be a path to a block device node,\nor as any other file in which case the backing block device of the file system of the\nfile is used. If the IOPS is suffixed with K, M, G, or T, the specified IOPS is parsed as\nKiloIOPS, MegaIOPS, GigaIOPS, or TeraIOPS, respectively, to the base of 1000. (Example:\n\"/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0 1K\"). This controls the \"io.max\" control\ngroup attributes. Use this option multiple times to set IOPS limits for multiple devices.\nFor details about this control group attribute, see IO Interface Files[8].\n\nSimilar restrictions on block device discovery as for IODeviceWeight= apply, see above.\n\nAdded in version 230.\n\nIODeviceLatencyTargetSec=device target\nThis setting controls the io controller in the unified hierarchy.\n\nSet the per-device average target I/O latency for the executed processes, if the unified\ncontrol group hierarchy is used on the system. Takes a file path and a timespan separated\nby a space to specify the device specific latency target. (Example: \"/dev/sda 25ms\"). The\nfile path may be specified as path to a block device node or as any other file, in which\ncase the backing block device of the file system of the file is determined. This controls\nthe \"io.latency\" control group attribute. Use this option multiple times to set latency\ntarget for multiple devices. For details about this control group attribute, see IO\nInterface Files[8].\n\nImplies \"IOAccounting=yes\".\n\nThese settings are supported only if the unified control group hierarchy is used.\n\nSimilar restrictions on block device discovery as for IODeviceWeight= apply, see above.\n\nAdded in version 240.\n"
                },
                {
                    "name": "Network Accounting and Control",
                    "content": "IPAccounting=\nTakes a boolean argument. If true, turns on IPv4 and IPv6 network traffic accounting for\npackets sent or received by the unit. When this option is turned on, all IPv4 and IPv6\nsockets created by any process of the unit are accounted for.\n\nWhen this option is used in socket units, it applies to all IPv4 and IPv6 sockets\nassociated with it (including both listening and connection sockets where this applies).\nNote that for socket-activated services, this configuration setting and the accounting\ndata of the service unit and the socket unit are kept separate, and displayed separately.\nNo propagation of the setting and the collected statistics is done, in either direction.\nMoreover, any traffic sent or received on any of the socket unit's sockets is accounted\nto the socket unit — and never to the service unit it might have activated, even if the\nsocket is used by it.\n\nThe system default for this setting may be controlled with DefaultIPAccounting= in\nsystemd-system.conf(5).\n\nAdded in version 235.\n\nIPAddressAllow=ADDRESS[/PREFIXLENGTH]..., IPAddressDeny=ADDRESS[/PREFIXLENGTH]...\nTurn on network traffic filtering for IP packets sent and received over AFINET and\nAFINET6 sockets. Both directives take a space separated list of IPv4 or IPv6 addresses,\neach optionally suffixed with an address prefix length in bits after a \"/\" character. If\nthe suffix is omitted, the address is considered a host address, i.e. the filter covers\nthe whole address (32 bits for IPv4, 128 bits for IPv6).\n\nThe access lists configured with this option are applied to all sockets created by\nprocesses of this unit (or in the case of socket units, associated with it). The lists\nare implicitly combined with any lists configured for any of the parent slice units this\nunit might be a member of. By default both access lists are empty. Both ingress and\negress traffic is filtered by these settings. In case of ingress traffic the source IP\naddress is checked against these access lists, in case of egress traffic the destination\nIP address is checked. The following rules are applied in turn:\n\n•   Access is granted when the checked IP address matches an entry in the IPAddressAllow=\nlist.\n\n•   Otherwise, access is denied when the checked IP address matches an entry in the\nIPAddressDeny= list.\n\n•   Otherwise, access is granted.\n\nIn order to implement an allow-listing IP firewall, it is recommended to use a\nIPAddressDeny=any setting on an upper-level slice unit (such as the root slice -.slice or\nthe slice containing all system services system.slice – see systemd.special(7) for\ndetails on these slice units), plus individual per-service IPAddressAllow= lines\npermitting network access to relevant services, and only them.\n\nNote that for socket-activated services, the IP access list configured on the socket unit\napplies to all sockets associated with it directly, but not to any sockets created by the\nultimately activated services for it. Conversely, the IP access list configured for the\nservice is not applied to any sockets passed into the service via socket activation.\nThus, it is usually a good idea to replicate the IP access lists on both the socket and\nthe service unit. Nevertheless, it may make sense to maintain one list more open and the\nother one more restricted, depending on the use case.\n\nIf these settings are used multiple times in the same unit the specified lists are\ncombined. If an empty string is assigned to these settings the specific access list is\nreset and all previous settings undone.\n\nIn place of explicit IPv4 or IPv6 address and prefix length specifications a small set of\nsymbolic names may be used. The following names are defined:\n\nTable 1. Special address/network names\n┌───────────────┬──────────────────────────┬──────────────────────┐\n│ Symbolic Name │ Definition               │ Meaning              │\n├───────────────┼──────────────────────────┼──────────────────────┤\n│ any           │ 0.0.0.0/0 ::/0           │ Any host             │\n├───────────────┼──────────────────────────┼──────────────────────┤\n│ localhost     │ 127.0.0.0/8 ::1/128      │ All addresses on the │\n│               │                          │ local loopback       │\n├───────────────┼──────────────────────────┼──────────────────────┤\n│ link-local    │ 169.254.0.0/16 fe80::/64 │ All link-local IP    │\n│               │                          │ addresses            │\n├───────────────┼──────────────────────────┼──────────────────────┤\n│ multicast     │ 224.0.0.0/4 ff00::/8     │ All IP multicasting  │\n│               │                          │ addresses            │\n└───────────────┴──────────────────────────┴──────────────────────┘\n\nNote that these settings might not be supported on some systems (for example if eBPF\ncontrol group support is not enabled in the underlying kernel or container manager).\nThese settings will have no effect in that case. If compatibility with such systems is\ndesired it is hence recommended to not exclusively rely on them for IP security.\n\nThis option cannot be bypassed by prefixing \"+\" to the executable path in the service\nunit, as it applies to the whole control group.\n\nAdded in version 235.\n\nSocketBindAllow=bind-rule, SocketBindDeny=bind-rule\nAllow or deny binding a socket address to a socket by matching it with the bind-rule and\napplying a corresponding action if there is a match.\n\nbind-rule describes socket properties such as address-family, transport-protocol and\nip-ports.\n\nbind-rule := { [address-family:][transport-protocol:][ip-ports] | any }\n\naddress-family := { ipv4 | ipv6 }\n\ntransport-protocol := { tcp | udp }\n\nip-ports := { ip-port | ip-port-range }\n\nAn optional address-family expects ipv4 or ipv6 values. If not specified, a rule will be\nmatched for both IPv4 and IPv6 addresses and applied depending on other socket fields,\ne.g.  transport-protocol, ip-port.\n\nAn optional transport-protocol expects tcp or udp transport protocol names. If not\nspecified, a rule will be matched for any transport protocol.\n\nAn optional ip-port value must lie within 1...65535 interval inclusively, i.e. dynamic\nport 0 is not allowed. A range of sequential ports is described by ip-port-range :=\nip-port-low-ip-port-high, where ip-port-low is smaller than or equal to ip-port-high and\nboth are within 1...65535 inclusively.\n\nA special value any can be used to apply a rule to any address family, transport protocol\nand any port with a positive value.\n\nTo allow multiple rules assign SocketBindAllow= or SocketBindDeny= multiple times. To\nclear the existing assignments pass an empty SocketBindAllow= or SocketBindDeny=\nassignment.\n\nFor each of SocketBindAllow= and SocketBindDeny=, maximum allowed number of assignments\nis 128.\n\n•   Binding to a socket is allowed when a socket address matches an entry in the\nSocketBindAllow= list.\n\n•   Otherwise, binding is denied when the socket address matches an entry in the\nSocketBindDeny= list.\n\n•   Otherwise, binding is allowed.\n\nThe feature is implemented with cgroup/bind4 and cgroup/bind6 cgroup-bpf hooks.\n\nExamples:\n\n...\n# Allow binding IPv6 socket addresses with a port greater than or equal to 10000.\n[Service]\nSocketBindAllow=ipv6:10000-65535\nSocketBindDeny=any\n...\n# Allow binding IPv4 and IPv6 socket addresses with 1234 and 4321 ports.\n[Service]\nSocketBindAllow=1234\nSocketBindAllow=4321\nSocketBindDeny=any\n...\n# Deny binding IPv6 socket addresses.\n[Service]\nSocketBindDeny=ipv6\n...\n# Deny binding IPv4 and IPv6 socket addresses.\n[Service]\nSocketBindDeny=any\n...\n# Allow binding only over TCP\n[Service]\nSocketBindAllow=tcp\nSocketBindDeny=any\n...\n# Allow binding only over IPv6/TCP\n[Service]\nSocketBindAllow=ipv6:tcp\nSocketBindDeny=any\n...\n# Allow binding ports within 10000-65535 range over IPv4/UDP.\n[Service]\nSocketBindAllow=ipv4:udp:10000-65535\nSocketBindDeny=any\n...\n\nThis option cannot be bypassed by prefixing \"+\" to the executable path in the service\nunit, as it applies to the whole control group.\n\nAdded in version 249.\n\nRestrictNetworkInterfaces=\nTakes a list of space-separated network interface names. This option restricts the\nnetwork interfaces that processes of this unit can use. By default processes can only use\nthe network interfaces listed (allow-list). If the first character of the rule is \"~\",\nthe effect is inverted: the processes can only use network interfaces not listed\n(deny-list).\n\nThis option can appear multiple times, in which case the network interface names are\nmerged. If the empty string is assigned the set is reset, all prior assignments will have\nnot effect.\n\nIf you specify both types of this option (i.e. allow-listing and deny-listing), the first\nencountered will take precedence and will dictate the default action (allow vs deny).\nThen the next occurrences of this option will add or delete the listed network interface\nnames from the set, depending of its type and the default action.\n\nThe loopback interface (\"lo\") is not treated in any special way, you have to configure it\nexplicitly in the unit file.\n\nExample 1: allow-list\n\nRestrictNetworkInterfaces=eth1\nRestrictNetworkInterfaces=eth2\n\nPrograms in the unit will be only able to use the eth1 and eth2 network interfaces.\n\nExample 2: deny-list\n\nRestrictNetworkInterfaces=~eth1 eth2\n\nPrograms in the unit will be able to use any network interface but eth1 and eth2.\n\nExample 3: mixed\n\nRestrictNetworkInterfaces=eth1 eth2\nRestrictNetworkInterfaces=~eth1\n\nPrograms in the unit will be only able to use the eth2 network interface.\n\nThis option cannot be bypassed by prefixing \"+\" to the executable path in the service\nunit, as it applies to the whole control group.\n\nAdded in version 250.\n\nNFTSet=family:table:set\nThis setting provides a method for integrating dynamic cgroup, user and group IDs into\nfirewall rules with NFT[9] sets. The benefit of using this setting is to be able to use\nthe IDs as selectors in firewall rules easily and this in turn allows more fine grained\nfiltering. NFT rules for cgroup matching use numeric cgroup IDs, which change every time\na service is restarted, making them hard to use in systemd environment otherwise. Dynamic\nand random IDs used by DynamicUser= can be also integrated with this setting.\n\nThis option expects a whitespace separated list of NFT set definitions. Each definition\nconsists of a colon-separated tuple of source type (one of \"cgroup\", \"user\" or \"group\"),\nNFT address family (one of \"arp\", \"bridge\", \"inet\", \"ip\", \"ip6\", or \"netdev\"), table name\nand set name. The names of tables and sets must conform to lexical restrictions of NFT\ntable names. The type of the element used in the NFT filter must match the type implied\nby the directive (\"cgroup\", \"user\" or \"group\") as shown in the table below. When a\ncontrol group or a unit is realized, the corresponding ID will be appended to the NFT\nsets and it will be be removed when the control group or unit is removed.  systemd only\ninserts elements to (or removes from) the sets, so the related NFT rules, tables and sets\nmust be prepared elsewhere in advance. Failures to manage the sets will be ignored.\n\nTable 2. Defined source type values\n┌─────────────┬──────────────────┬────────────────────────┐\n│ Source type │ Description      │ Corresponding NFT type │\n│             │                  │ name                   │\n├─────────────┼──────────────────┼────────────────────────┤\n│ \"cgroup\"    │ control group ID │ \"cgroupsv2\"            │\n├─────────────┼──────────────────┼────────────────────────┤\n│ \"user\"      │ user ID          │ \"meta skuid\"           │\n├─────────────┼──────────────────┼────────────────────────┤\n│ \"group\"     │ group ID         │ \"meta skgid\"           │\n└─────────────┴──────────────────┴────────────────────────┘\n\nIf the firewall rules are reinstalled so that the contents of NFT sets are destroyed,\ncommand systemctl daemon-reload can be used to refill the sets.\n\nExample:\n\n[Unit]\nNFTSet=cgroup:inet:filter:myservice user:inet:filter:serviceuser\n\nCorresponding NFT rules:\n\ntable inet filter {\nset myservice {\ntype cgroupsv2\n}\nset serviceuser {\ntypeof meta skuid\n}\nchain x {\nsocket cgroupv2 level 2 @myservice accept\ndrop\n}\nchain y {\nmeta skuid @serviceuser accept\ndrop\n}\n}\n\nAdded in version 255.\n"
                },
                {
                    "name": "BPF Programs",
                    "content": "IPIngressFilterPath=BPFFSPROGRAMPATH, IPEgressFilterPath=BPFFSPROGRAMPATH\nAdd custom network traffic filters implemented as BPF programs, applying to all IP\npackets sent and received over AFINET and AFINET6 sockets. Takes an absolute path to a\npinned BPF program in the BPF virtual filesystem (/sys/fs/bpf/).\n\nThe filters configured with this option are applied to all sockets created by processes\nof this unit (or in the case of socket units, associated with it). The filters are loaded\nin addition to filters any of the parent slice units this unit might be a member of as\nwell as any IPAddressAllow= and IPAddressDeny= filters in any of these units. By default\nthere are no filters specified.\n\nIf these settings are used multiple times in the same unit all the specified programs are\nattached. If an empty string is assigned to these settings the program list is reset and\nall previous specified programs ignored.\n\nIf the path BPFFSPROGRAMPATH in IPIngressFilterPath= assignment is already being\nhandled by BPFProgram= ingress hook, e.g.  BPFProgram=ingress:BPFFSPROGRAMPATH, the\nassignment will be still considered valid and the program will be attached to a cgroup.\nSame for IPEgressFilterPath= path and egress hook.\n\nNote that for socket-activated services, the IP filter programs configured on the socket\nunit apply to all sockets associated with it directly, but not to any sockets created by\nthe ultimately activated services for it. Conversely, the IP filter programs configured\nfor the service are not applied to any sockets passed into the service via socket\nactivation. Thus, it is usually a good idea, to replicate the IP filter programs on both\nthe socket and the service unit, however it often makes sense to maintain one\nconfiguration more open and the other one more restricted, depending on the use case.\n\nNote that these settings might not be supported on some systems (for example if eBPF\ncontrol group support is not enabled in the underlying kernel or container manager).\nThese settings will fail the service in that case. If compatibility with such systems is\ndesired it is hence recommended to attach your filter manually (requires Delegate=yes)\ninstead of using this setting.\n\nAdded in version 243.\n\nBPFProgram=type:program-path\nBPFProgram= allows attaching custom BPF programs to the cgroup of a unit. (This\ngeneralizes the functionality exposed via IPEgressFilterPath= and IPIngressFilterPath=\nfor other hooks.) Cgroup-bpf hooks in the form of BPF programs loaded to the BPF\nfilesystem are attached with cgroup-bpf attach flags determined by the unit. For details\nabout attachment types and flags see bpf.h[10]. Also refer to the general BPF\ndocumentation[11].\n\nThe specification of BPF program consists of a pair of BPF program type and program path\nin the file system, with \":\" as the separator: type:program-path.\n\nThe BPF program type is equivalent to the BPF attach type used in bpftool(8) It may be\none of egress, ingress, sockcreate, sockops, device, bind4, bind6, connect4, connect6,\npostbind4, postbind6, sendmsg4, sendmsg6, sysctl, recvmsg4, recvmsg6, getsockopt, or\nsetsockopt.\n\nThe specified program path must be an absolute path referencing a BPF program inode in\nthe bpffs file system (which generally means it must begin with /sys/fs/bpf/). If a\nspecified program does not exist (i.e. has not been uploaded to the BPF subsystem of the\nkernel yet), it will not be installed but unit activation will continue (a warning will\nbe printed to the logs).\n\nSetting BPFProgram= to an empty value makes previous assignments ineffective.\n\nMultiple assignments of the same program type/path pair have the same effect as a single\nassignment: the program will be attached just once.\n\nIf BPF egress pinned to program-path path is already being handled by\nIPEgressFilterPath=, BPFProgram= assignment will be considered valid and BPFProgram= will\nbe attached to a cgroup. Similarly for ingress hook and IPIngressFilterPath= assignment.\n\nBPF programs passed with BPFProgram= are attached to the cgroup of a unit with BPF attach\nflag multi, that allows further attachments of the same type within cgroup hierarchy\ntopped by the unit cgroup.\n\nExamples:\n\nBPFProgram=egress:/sys/fs/bpf/egress-hook\nBPFProgram=bind6:/sys/fs/bpf/sock-addr-hook\n\nAdded in version 249.\n"
                },
                {
                    "name": "Device Access",
                    "content": "DeviceAllow=\nControl access to specific device nodes by the executed processes. Takes two\nspace-separated strings: a device node specifier followed by a combination of r, w, m to\ncontrol reading, writing, or creation of the specific device nodes by the unit (mknod),\nrespectively. This functionality is implemented using eBPF filtering.\n\nWhen access to all physical devices should be disallowed, PrivateDevices= may be used\ninstead. See systemd.exec(5).\n\nThe device node specifier is either a path to a device node in the file system, starting\nwith /dev/, or a string starting with either \"char-\" or \"block-\" followed by a device\ngroup name, as listed in /proc/devices. The latter is useful to allow-list all current\nand future devices belonging to a specific device group at once. The device group is\nmatched according to filename globbing rules, you may hence use the \"*\" and \"?\"\nwildcards. (Note that such globbing wildcards are not available for device node path\nspecifications!) In order to match device nodes by numeric major/minor, use device node\npaths in the /dev/char/ and /dev/block/ directories. However, matching devices by\nmajor/minor is generally not recommended as assignments are neither stable nor portable\nbetween systems or different kernel versions.\n\nExamples: /dev/sda5 is a path to a device node, referring to an ATA or SCSI block device.\n\"char-pts\" and \"char-alsa\" are specifiers for all pseudo TTYs and all ALSA sound devices,\nrespectively.  \"char-cpu/*\" is a specifier matching all CPU related device groups.\n\nNote that allow lists defined this way should only reference device groups which are\nresolvable at the time the unit is started. Any device groups not resolvable then are not\nadded to the device allow list. In order to work around this limitation, consider\nextending service units with a pair of After=modprobe@xyz.service and\nWants=modprobe@xyz.service lines that load the necessary kernel module implementing the\ndevice group if missing. Example:\n\n...\n[Unit]\nWants=modprobe@loop.service\nAfter=modprobe@loop.service\n\n[Service]\nDeviceAllow=block-loop\nDeviceAllow=/dev/loop-control\n...\n\nThis option cannot be bypassed by prefixing \"+\" to the executable path in the service\nunit, as it applies to the whole control group.\n\nAdded in version 208.\n\nDevicePolicy=auto|closed|strict\nControl the policy for allowing device access:\n\nstrict\nmeans to only allow types of access that are explicitly specified.\n\nAdded in version 208.\n\nclosed\nin addition, allows access to standard pseudo devices including /dev/null, /dev/zero,\n/dev/full, /dev/random, and /dev/urandom.\n\nAdded in version 208.\n\nauto\nin addition, allows access to all devices if no explicit DeviceAllow= is present.\nThis is the default.\n\nAdded in version 208.\n\nThis option cannot be bypassed by prefixing \"+\" to the executable path in the service\nunit, as it applies to the whole control group.\n\nAdded in version 208.\n"
                },
                {
                    "name": "Control Group Management",
                    "content": "Slice=\nThe name of the slice unit to place the unit in. Defaults to system.slice for all\nnon-instantiated units of all unit types (except for slice units themselves see below).\nInstance units are by default placed in a subslice of system.slice that is named after\nthe template name.\n\nThis option may be used to arrange systemd units in a hierarchy of slices each of which\nmight have resource settings applied.\n\nFor units of type slice, the only accepted value for this setting is the parent slice.\nSince the name of a slice unit implies the parent slice, it is hence redundant to ever\nset this parameter directly for slice units.\n\nSpecial care should be taken when relying on the default slice assignment in templated\nservice units that have DefaultDependencies=no set, see systemd.service(5), section\n\"Default Dependencies\" for details.\n\nAdded in version 208.\n\nDelegate=\nTurns on delegation of further resource control partitioning to processes of the unit.\nUnits where this is enabled may create and manage their own private subhierarchy of\ncontrol groups below the control group of the unit itself. For unprivileged services\n(i.e. those using the User= setting) the unit's control group will be made accessible to\nthe relevant user.\n\nWhen enabled the service manager will refrain from manipulating control groups or moving\nprocesses below the unit's control group, so that a clear concept of ownership is\nestablished: the control group tree at the level of the unit's control group and above\n(i.e. towards the root control group) is owned and managed by the service manager of the\nhost, while the control group tree below the unit's control group is owned and managed by\nthe unit itself.\n\nTakes either a boolean argument or a (possibly empty) list of control group controller\nnames. If true, delegation is turned on, and all supported controllers are enabled for\nthe unit, making them available to the unit's processes for management. If false,\ndelegation is turned off entirely (and no additional controllers are enabled). If set to\na list of controllers, delegation is turned on, and the specified controllers are enabled\nfor the unit. Assigning the empty string will enable delegation, but reset the list of\ncontrollers, and all assignments prior to this will have no effect. Note that additional\ncontrollers other than the ones specified might be made available as well, depending on\nconfiguration of the containing slice unit or other units contained in it. Defaults to\nfalse.\n\nNote that controller delegation to less privileged code is only safe on the unified\ncontrol group hierarchy. Accordingly, access to the specified controllers will not be\ngranted to unprivileged services on the legacy hierarchy, even when requested.\n\nThe following controller names may be specified: cpu, cpuacct, cpuset, io, blkio, memory,\ndevices, pids, bpf-firewall, and bpf-devices.\n\nNot all of these controllers are available on all kernels however, and some are specific\nto the unified hierarchy while others are specific to the legacy hierarchy. Also note\nthat the kernel might support further controllers, which aren't covered here yet as\ndelegation is either not supported at all for them or not defined cleanly.\n\nNote that because of the hierarchical nature of cgroup hierarchy, any controllers that\nare delegated will be enabled for the parent and sibling units of the unit with\ndelegation.\n\nFor further details on the delegation model consult Control Group APIs and\nDelegation[12].\n\nAdded in version 218.\n\nDelegateSubgroup=\nPlace unit processes in the specified subgroup of the unit's control group. Takes a valid\ncontrol group name (not a path!) as parameter, or an empty string to turn this feature\noff. Defaults to off. The control group name must be usable as filename and avoid\nconflicts with the kernel's control group attribute files (i.e.  cgroup.procs is not an\nacceptable name, since the kernel exposes a native control group attribute file by that\nname). This option has no effect unless control group delegation is turned on via\nDelegate=, see above. Note that this setting only applies to \"main\" processes of a unit,\ni.e. for services to ExecStart=, but not for ExecReload= and similar. If delegation is\nenabled, the latter are always placed inside a subgroup named .control. The specified\nsubgroup is automatically created (and potentially ownership is passed to the unit's\nconfigured user/group) when a process is started in it.\n\nThis option is useful to avoid manually moving the invoked process into a subgroup after\nit has been started. Since no processes should live in inner nodes of the control group\ntree it's almost always necessary to run the main (\"supervising\") process of a unit that\nhas delegation turned on in a subgroup.\n\nAdded in version 254.\n\nDisableControllers=\nDisables controllers from being enabled for a unit's children. If a controller listed is\nalready in use in its subtree, the controller will be removed from the subtree. This can\nbe used to avoid configuration in child units from being able to implicitly or explicitly\nenable a controller. Defaults to empty.\n\nMultiple controllers may be specified, separated by spaces. You may also pass\nDisableControllers= multiple times, in which case each new instance adds another\ncontroller to disable. Passing DisableControllers= by itself with no controller name\npresent resets the disabled controller list.\n\nIt may not be possible to disable a controller after units have been started, if the unit\nor any child of the unit in question delegates controllers to its children, as any\ndelegated subtree of the cgroup hierarchy is unmanaged by systemd.\n\nThe following controller names may be specified: cpu, cpuacct, cpuset, io, blkio, memory,\ndevices, pids, bpf-firewall, and bpf-devices.\n\nAdded in version 240.\n"
                },
                {
                    "name": "Memory Pressure Control",
                    "content": "ManagedOOMSwap=auto|kill, ManagedOOMMemoryPressure=auto|kill\nSpecifies how systemd-oomd.service(8) will act on this unit's cgroups. Defaults to auto.\n\nWhen set to kill, the unit becomes a candidate for monitoring by systemd-oomd. If the\ncgroup passes the limits set by oomd.conf(5) or the unit configuration, systemd-oomd will\nselect a descendant cgroup and send SIGKILL to all of the processes under it. You can\nfind more details on candidates and kill behavior at systemd-oomd.service(8) and\noomd.conf(5).\n\nSetting either of these properties to kill will also result in After= and Wants=\ndependencies on systemd-oomd.service unless DefaultDependencies=no.\n\nWhen set to auto, systemd-oomd will not actively use this cgroup's data for monitoring\nand detection. However, if an ancestor cgroup has one of these properties set to kill, a\nunit with auto can still be a candidate for systemd-oomd to terminate.\n\nAdded in version 247.\n\nManagedOOMMemoryPressureLimit=\nOverrides the default memory pressure limit set by oomd.conf(5) for this unit (cgroup).\nTakes a percentage value between 0% and 100%, inclusive. This property is ignored unless\nManagedOOMMemoryPressure=kill. Defaults to 0%, which means to use the default set by\noomd.conf(5).\n\nAdded in version 247.\n\nManagedOOMPreference=none|avoid|omit\nAllows deprioritizing or omitting this unit's cgroup as a candidate when systemd-oomd\nneeds to act. Requires support for extended attributes (see xattr(7)) in order to use\navoid or omit.\n\nWhen calculating candidates to relieve swap usage, systemd-oomd will only respect these\nextended attributes if the unit's cgroup is owned by root.\n\nWhen calculating candidates to relieve memory pressure, systemd-oomd will only respect\nthese extended attributes if the unit's cgroup is owned by root, or if the unit's cgroup\nowner, and the owner of the monitored ancestor cgroup are the same. For example, if\nsystemd-oomd is calculating candidates for -.slice, then extended attributes set on\ndescendants of /user.slice/user-1000.slice/user@1000.service/ will be ignored because the\ndescendants are owned by UID 1000, and -.slice is owned by UID 0. But, if calculating\ncandidates for /user.slice/user-1000.slice/user@1000.service/, then extended attributes\nset on the descendants would be respected.\n\nIf this property is set to avoid, the service manager will convey this to systemd-oomd,\nwhich will only select this cgroup if there are no other viable candidates.\n\nIf this property is set to omit, the service manager will convey this to systemd-oomd,\nwhich will ignore this cgroup as a candidate and will not perform any actions on it.\n\nIt is recommended to use avoid and omit sparingly, as it can adversely affect\nsystemd-oomd's kill behavior. Also note that these extended attributes are not applied\nrecursively to cgroups under this unit's cgroup.\n\nDefaults to none which means systemd-oomd will rank this unit's cgroup as defined in\nsystemd-oomd.service(8) and oomd.conf(5).\n\nAdded in version 248.\n\nMemoryPressureWatch=\nControls memory pressure monitoring for invoked processes. Takes one of \"off\", \"on\",\n\"auto\" or \"skip\". If \"off\" tells the service not to watch for memory pressure events, by\nsetting the $MEMORYPRESSUREWATCH environment variable to the literal string /dev/null.\nIf \"on\" tells the service to watch for memory pressure events. This enables memory\naccounting for the service, and ensures the memory.pressure cgroup attribute file is\naccessible for reading and writing by the service's user. It then sets the\n$MEMORYPRESSUREWATCH environment variable for processes invoked by the unit to the file\nsystem path to this file. The threshold information configured with\nMemoryPressureThresholdSec= is encoded in the $MEMORYPRESSUREWRITE environment\nvariable. If the \"auto\" value is set the protocol is enabled if memory accounting is\nanyway enabled for the unit, and disabled otherwise. If set to \"skip\" the logic is\nneither enabled, nor disabled and the two environment variables are not set.\n\nNote that services are free to use the two environment variables, but it's unproblematic\nif they ignore them. Memory pressure handling must be implemented individually in each\nservice, and usually means different things for different software. For further details\non memory pressure handling see Memory Pressure Handling in systemd[13].\n\nServices implemented using sd-event(3) may use sdeventaddmemorypressure(3) to watch\nfor and handle memory pressure events.\n\nIf not explicit set, defaults to the DefaultMemoryPressureWatch= setting in systemd-\nsystem.conf(5).\n\nAdded in version 254.\n\nMemoryPressureThresholdSec=\nSets the memory pressure threshold time for memory pressure monitor as configured via\nMemoryPressureWatch=. Specifies the maximum allocation latency before a memory pressure\nevent is signalled to the service, per 2s window. If not specified defaults to the\nDefaultMemoryPressureThresholdSec= setting in systemd-system.conf(5) (which in turn\ndefaults to 200ms). The specified value expects a time unit such as \"ms\" or \"μs\", see\nsystemd.time(7) for details on the permitted syntax.\n\nAdded in version 254.\n"
                },
                {
                    "name": "Coredump Control",
                    "content": "CoredumpReceive=\nTakes a boolean argument. This setting is used to enable coredump forwarding for\ncontainers that belong to this unit's cgroup. Units with CoredumpReceive=yes must also be\nconfigured with Delegate=yes. Defaults to false.\n\nWhen systemd-coredump is handling a coredump for a process from a container, if the\ncontainer's leader process is a descendant of a cgroup with CoredumpReceive=yes and\nDelegate=yes, then systemd-coredump will attempt to forward the coredump to\nsystemd-coredump within the container.\n\nAdded in version 255.\n"
                }
            ]
        },
        "HISTORY": {
            "content": "systemd 252\nOptions for controlling the Legacy Control Group Hierarchy (Control Groups version 1[14])\nare now fully deprecated: CPUShares=weight, StartupCPUShares=weight, MemoryLimit=bytes,\nBlockIOAccounting=, BlockIOWeight=weight, StartupBlockIOWeight=weight,\nBlockIODeviceWeight=device weight, BlockIOReadBandwidth=device bytes,\nBlockIOWriteBandwidth=device bytes. Please switch to the unified cgroup hierarchy.\n\nAdded in version 252.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "systemd(1), systemd-system.conf(5), systemd.unit(5), systemd.service(5), systemd.slice(5),\nsystemd.scope(5), systemd.socket(5), systemd.mount(5), systemd.swap(5), systemd.exec(5),\nsystemd.directives(7), systemd.special(7), systemd-oomd.service(8), The documentation for\ncontrol groups and specific controllers in the Linux kernel: Control Groups v2[2].\n",
            "subsections": []
        },
        "NOTES": {
            "content": "1. New Control Group Interfaces\nhttps://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface\n\n2. Control Groups v2\nhttps://docs.kernel.org/admin-guide/cgroup-v2.html\n\n3. CFS Scheduler\nhttps://docs.kernel.org/scheduler/sched-design-CFS.html\n\n4. CFS Bandwidth Control\nhttps://docs.kernel.org/scheduler/sched-bwc.html\n\n5. Memory Interface Files\nhttps://docs.kernel.org/admin-guide/cgroup-v2.html#memory-interface-files\n\n6. Zswap\nhttps://www.kernel.org/doc/html/latest/admin-guide/mm/zswap.html\n\n7. pids controller\nhttps://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#pid\n\n8. IO Interface Files\nhttps://docs.kernel.org/admin-guide/cgroup-v2.html#io-interface-files\n\n9. NFT\nhttps://netfilter.org/projects/nftables/index.html\n\n10. bpf.h\nhttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/include/uapi/linux/bpf.h\n\n11. BPF documentation\nhttps://docs.kernel.org/bpf/\n\n12. Control Group APIs and Delegation\nhttps://systemd.io/CGROUPDELEGATION\n\n13. Memory Pressure Handling in systemd\nhttps://systemd.io/MEMORYPRESSURE\n\n14. Control Groups version 1\nhttps://docs.kernel.org/admin-guide/cgroup-v1/index.html\n\nsystemd 255                                                              SYSTEMD.RESOURCE-CONTROL(5)",
            "subsections": []
        }
    },
    "summary": "systemd.resource-control - Resource control unit settings",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "systemd",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
        },
        {
            "name": "systemd-system.conf",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd-system.conf/5/json"
        },
        {
            "name": "systemd.unit",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.unit/5/json"
        },
        {
            "name": "systemd.service",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.service/5/json"
        },
        {
            "name": "systemd.slice",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.slice/5/json"
        },
        {
            "name": "systemd.scope",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.scope/5/json"
        },
        {
            "name": "systemd.socket",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.socket/5/json"
        },
        {
            "name": "systemd.mount",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.mount/5/json"
        },
        {
            "name": "systemd.swap",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.swap/5/json"
        },
        {
            "name": "systemd.exec",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.exec/5/json"
        },
        {
            "name": "systemd.directives",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.directives/7/json"
        },
        {
            "name": "systemd.special",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.special/7/json"
        },
        {
            "name": "systemd-oomd.service",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/systemd-oomd.service/8/json"
        }
    ]
}