summaryrefslogtreecommitdiff
path: root/man/systemd.resource-control.xml
Commit message (Collapse)AuthorAgeFilesLines
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* man: IPAccounting for slices in now allowedZbigniew Jędrzejewski-Szmek2018-02-221-4/+6
| | | | Also split that description into paragraphs by subject.
* man: clarify that the controllers listed on Delegate= might not be the only onesLennart Poettering2017-11-211-3/+4
|
* Add SPDX license identifiers to man pagesZbigniew Jędrzejewski-Szmek2017-11-191-0/+2
|
* man: remove note about CPU controller being unmergedZbigniew Jędrzejewski-Szmek2017-11-191-5/+1
| | | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0d5936344f30aba0f6ddb92b030cb6a05168efe6 In principle we shouldn't merge this until after 4.15 is released, but the chances of a revert upstream are low, and in that unlikely scenario we can just revert this patch, it's a trivial documentation update after all.
* core/cgroup: assigning empty string to Delegate= resets list of controllers ↵Yu Watanabe2017-11-171-1/+2
| | | | | | | | | | | (#7336) Before this, assigning empty string to Delegate= makes no change to the controller list. This is inconsistent to the other options that take list of strings. After this, when empty string is assigned to Delegate=, the list of controllers is reset. Such behavior is consistent to other options and useful for drop-in configs. Closes #7334.
* man: document the new Delegate= syntaxLennart Poettering2017-11-131-7/+24
|
* man: fix typos (#7029)Jakub Wilk2017-10-101-1/+1
|
* man: document the new ip accounting and filting directivesDaniel Mack2017-09-221-0/+117
|
* man: use "filename" not "file name" by defaultZbigniew Jędrzejewski-Szmek2017-09-151-1/+1
| | | | | | | We settled on "filename" and "file system", so change a couple of places for consistency. The exception is when there's an adjective before "file" that binds more strongly then "name": "password file name", "output file name", etc. Those cases are left intact.
* man: explicitly distinguish "implicit dependencies" and "default dependencies"John Lin2017-09-131-4/+11
| | | | Fixes: #6793
* man: use https:// in URLsAsciiWolf2017-02-211-1/+1
|
* man: avoid abbreviated "cgroups" terminology (#4396)Lennart Poettering2016-10-171-7/+5
| | | | | | | | | Let's avoid the overly abbreviated "cgroups" terminology. Let's instead write: "Linux Control Groups (cgroups)" is the long form wherever the term is introduced in prose. Use "control groups" in the short form wherever the term is used within brief explanations. Follow-up to: #4381
* man: add crosslink between systemd.resource-control(5) and systemd.exec(5)Zbigniew Jędrzejewski-Szmek2016-10-151-0/+6
| | | | Fixes #4379.
* core: make settings for unified cgroup hierarchy supersede the ones for ↵Tejun Heo2016-10-141-159/+166
| | | | | | | | | | | | | | legacy hierarchy (#4269) There are overlapping control group resource settings for the unified and legacy hierarchies. To help transition, the settings are translated back and forth. When both versions of a given setting are present, the one matching the cgroup hierarchy type in use is used. Unfortunately, this is more confusing to use and document than necessary because there is no clear static precedence. Update the translation logic so that the settings for the unified hierarchy are always preferred. systemd.resource-control man page is updated to reflect the change and reorganized so that the deprecated settings are at the end in its own section.
* core: introduce MemorySwapMax=WaLyong Cho2016-08-301-0/+18
| | | | | Similar to MemoryMax=, MemorySwapMax= limits swap usage. This controls controls "memory.swap.max" attribute in unified cgroup.
* core: add cgroup CPU controller support on the unified hierarchyTejun Heo2016-08-071-32/+66
| | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately, due to the disagreements in the kernel development community, CPU controller cgroup v2 support has not been merged and enabling it requires applying two small out-of-tree kernel patches. The situation is explained in the following documentation. https://git.kernel.org/cgit/linux/kernel/git/tj/cgroup.git/tree/Documentation/cgroup-v2-cpu.txt?h=cgroup-v2-cpu While it isn't clear what will happen with CPU controller cgroup v2 support, there are critical features which are possible only on cgroup v2 such as buffered write control making cgroup v2 essential for a lot of workloads. This commit implements systemd CPU controller support on the unified hierarchy so that users who choose to deploy CPU controller cgroup v2 support can easily take advantage of it. On the unified hierarchy, "cpu.weight" knob replaces "cpu.shares" and "cpu.max" replaces "cpu.cfs_period_us" and "cpu.cfs_quota_us". [Startup]CPUWeight config options are added with the usual compat translation. CPU quota settings remain unchanged and apply to both legacy and unified hierarchies. v2: - Error in man page corrected. - CPU config application in cgroup_context_apply() refactored. - CPU accounting now works on unified hierarchy.
* Merge pull request #3843 from maxime1986/minor-systemd.resource-controlZbigniew Jędrzejewski-Szmek2016-07-311-3/+11
|\
| * documentation: cgroup-v1 and systemd user instanceMaxime de Roucy2016-07-311-0/+7
| | | | | | | | | | Explain in the systemd.resource-control man that systemd user instance can't use resource control on cgroup-v1.
| * documentation: add cgroup-v2.txt linkMaxime de Roucy2016-07-311-3/+4
|/ | | | | add cgroup-v2.txt link in section "Unified and Legacy Control Group Hierarchies" of systemd.resource-control man.
* core: support percentage specifications on TasksMax=Lennart Poettering2016-07-221-9/+6
| | | | | | This adds support for a TasksMax=40% syntax for specifying values relative to the system's configured maximum number of processes. This is useful in order to neatly subdivide the available room for tasks within containers.
* man: minor fixesLennart Poettering2016-06-141-7/+5
|
* core: optionally, accept a percentage value for MemoryLimit= and related ↵Lennart Poettering2016-06-141-17/+19
| | | | | | | settings If a percentage is used, it is taken relative to the installed RAM size. This should make it easier to write generic unit files that adapt to the local system.
* core: always use "infinity" for no upper limit instead of "max" (#3417)Tejun Heo2016-06-031-2/+2
| | | | | | | | Recently added cgroup unified hierarchy support uses "max" in configurations for no upper limit. While consistent with what the kernel uses for no upper limit, it is inconsistent with what systemd uses for other controllers such as memory or pids. There's no point in introducing another term. Update cgroup unified hierarchy support so that "infinity" is the only term that systemd uses for no upper limit.
* core: add cgroup memory controller support on the unified hierarchy (#3315)Tejun Heo2016-05-271-0/+71
| | | | | | | | | | | | | | | | | | | | | On the unified hierarchy, memory controller implements three control knobs - low, high and max which enables more useable and versatile control over memory usage. This patch implements support for the three control knobs. * MemoryLow, MemoryHigh and MemoryMax are added for memory.low, memory.high and memory.max, respectively. * As all absolute limits on the unified hierarchy use "max" for no limit, make memory limit parse functions accept "max" in addition to "infinity" and document "max" for the new knobs. * Implement compatibility translation between MemoryMax and MemoryLimit. v2: - Fixed missing else's in config_parse_memory_limit(). - Fixed missing newline when writing out drop-ins. - Coding style updates to use "val > 0" instead of "val". - Minor updates to documentation.
* core: translate between IO and BlockIO settings to ease transitionTejun Heo2016-05-181-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | Due to the substantial interface changes in cgroup unified hierarchy, new IO settings are introduced. Currently, IO settings apply only to unified hierarchy and BlockIO to legacy. While the transition is necessary, it's painful for users to have to provide configs for both. This patch implements translation from one config set to another for configs which make sense. * The translation takes place during application of the configs. Users won't see IO or BlockIO settings appearing without being explicitly created. * The translation takes place only if there is no config for the matching cgroup hierarchy type at all. While this doesn't provide comprehensive compatibility, it should considerably ease transition to the new IO settings which are a superset of BlockIO settings. v2: - Update test-cgroup-mask.c so that it accounts for the fact that CGROUP_MASK_IO and CGROUP_MASK_BLKIO move together. Also, test/parent.slice now sets IOWeight instead of BlockIOWeight.
* core: add support for IOReadIOPSMax and IOWriteIOPSMaxTejun Heo2016-05-181-0/+24
| | | | | | | | | | | cgroup IO controller supports maximum limits for both bandwidth and IOPS but systemd resource control currently only supports bandwidth limits. This patch adds support for IOReadIOPSMax and IOWriteIOPSMax when unified cgroup hierarchy is in use. It isn't difficult to also add BlockIOReadIOPS and BlockIOWriteIOPS for legacy hierarchies but IO control on legacy hierarchies is half-broken anyway, so let's leave it alone for now.
* man: clarify that IOXyz= only applies to the unified hierarchy, and ↵Lennart Poettering2016-05-161-98/+84
| | | | | | | | | | | BlockIOXyz= to the legacy hierarchy With this change for each setting we say which hierarachy it applies to briefly in the first sentence of the description, plus in longer form in an extra pargraph at the end, with a recommendation for the counterpart of the option in the other hierarchy. Also adds markup and the "=" suffix to all mentioned settings.
* core: add io controller support on the unified hierarchyTejun Heo2016-05-051-3/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the unified hierarchy, blkio controller is renamed to io and the interface is changed significantly. * blkio.weight and blkio.weight_device are consolidated into io.weight which uses the standardized weight range [1, 10000] with 100 as the default value. * blkio.throttle.{read|write}_{bps|iops}_device are consolidated into io.max. Expansion of throttling features is being worked on to support work-conserving absolute limits (io.low and io.high). * All stats are consolidated into io.stats. This patchset adds support for the new interface. As the interface has been revamped and new features are expected to be added, it seems best to treat it as a separate controller rather than trying to expand the blkio settings although we might add automatic translation if only blkio settings are specified. * io.weight handling is mostly identical to blkio.weight[_device] handling except that the weight range is different. * Both read and write bandwidth settings are consolidated into CGroupIODeviceLimit which describes all limits applicable to the device. This makes it less painful to add new limits. * "max" can be used to specify the maximum limit which is equivalent to no config for max limits and treated as such. If a given CGroupIODeviceLimit doesn't contain any non-default configs, the config struct is discarded once the no limit config is applied to cgroup. * lookup_blkio_device() is renamed to lookup_block_device(). Signed-off-by: Tejun Heo <htejun@fb.com>
* man: fix cgroup attributes for device throttlingMartin Pitt2016-04-051-2/+2
|
* man: update links to kernel.org cgroup documentationMartin Pitt2016-04-051-10/+10
| | | | | | This recently moved from /cgroups/ to /cgroup-v1/. Fixes #2958
* cgroup: remove support for NetClass= directiveDaniel Mack2016-02-101-17/+0
| | | | | | | | | | | | | | | | | | | Support for net_cls.class_id through the NetClass= configuration directive has been added in v227 in preparation for a per-unit packet filter mechanism. However, it turns out the kernel people have decided to deprecate the net_cls and net_prio controllers in v2. Tejun provides a comprehensive justification for this in his commit, which has landed during the merge window for kernel v4.5: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=bd1060a1d671 As we're aiming for full support for the v2 cgroup hierarchy, we can no longer support this feature. Userspace tool such as nftables are moving over to setting rules that are specific to the full cgroup path of a task, which obsoletes these controllers anyway. This commit removes support for tweaking details in the net_cls controller, but keeps the NetClass= directive around for legacy compatibility reasons.
* man: document special considerations when mixing templated service units and ↵Lennart Poettering2016-01-291-0/+6
| | | | | | DefaultDependencies=no Fixes #2189.
* core: add new DefaultTasksMax= setting for system.confLennart Poettering2015-11-131-1/+4
| | | | | This allows initializing the TasksMax= setting of all units by default to some fixed value, instead of leaving it at infinity as before.
* man: document automatic dependenciesLennart Poettering2015-11-111-0/+9
| | | | | | | | | | | For all units ensure there's an "Automatic Dependencies" section in the man page, and explain which dependencies are automatically added in all cases, and which ones are added on top if DefaultDependencies=yes is set. This is also done for systemd.exec(5), systemd.resource-control(5) and systemd.unit(5) as these pages describe common behaviour of various unit types.
* doc: correct punctuation and improve typography in documentationJan Engelhardt2015-11-061-12/+12
|
* man: move documentation about NetClass from systemd.unit(5) to ↵Lennart Poettering2015-10-191-0/+17
| | | | | | | systemd.resource-control(5) This is after all where we expose all the other cgroup props, especially those that can be adjusted dynamically.
* core: refactor cpu shares/blockio weight cgroup logicLennart Poettering2015-09-111-4/+5
| | | | | | | | | | | | | | | | Let's stop using the "unsigned long" type for weights/shares, and let's just use uint64_t for this, as that's what we expose on the bus. Unify parsers, and always validate the range for these fields. Correct the default blockio weight to 500, since that's what the kernel actually uses. When parsing the weight/shares settings from unit files accept the empty string as a way to reset the weight/shares value. When getting it via the bus, uniformly map (uint64_t) -1 to unset. Open up StartupCPUShares= and StartupBlockIOWeight= to transient units.
* core: add support for the "pids" cgroup controllerLennart Poettering2015-09-101-12/+51
| | | | | | | | | | | | | | | | | | | This adds support for the new "pids" cgroup controller of 4.3 kernels. It allows accounting the number of tasks in a cgroup and enforcing limits on it. This adds two new setting TasksAccounting= and TasksMax= to each unit, as well as a gloabl option DefaultTasksAccounting=. This also updated "cgtop" to optionally make use of the new kernel-provided accounting. systemctl has been updated to show the number of tasks for each service if it is available. This patch also adds correct support for undoing memory limits for units using a MemoryLimit=infinity syntax. We do the same for TasksMax= now and hence keep things in sync here.
* man: revert dynamic paths for split-usr setupsTom Gundersen2015-06-181-4/+1
| | | | | | | | | | | | | | | | | | | | | | | This did not really work out as we had hoped. Trying to do this upstream introduced several problems that probably makes it better suited as a downstream patch after all. At any rate, it is not releaseable in the current state, so we at least need to revert this before the release. * by adjusting the path to binaries, but not do the same thing to the search path we end up with inconsistent man-pages. Adjusting the search path too would be quite messy, and it is not at all obvious that this is worth the effort, but at any rate it would have to be done before we could ship this. * this means that distributed man-pages does not make sense as they depend on config options, and for better or worse we are still distributing man pages, so that is something that definitely needs sorting out before we could ship with this patch. * we have long held that split-usr is only minimally supported in order to boot, and something we hope will eventually go away. So before we start adding even more magic/effort in order to make this work nicely, we should probably question if it makes sense at all.
* man: generate configured paths in manpagesFilipe Brandenburger2015-05-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, use /lib/systemd instead of /usr/lib/systemd in distributions like Debian which still have not adopted a /usr merge setup. Use XML entities from man/custom-entities.ent to replace configured paths while doing XSLT processing of the original XML files. There was precedent of some files (such as systemd.generator.xml) which were already using this approach. This addresses most of the (manual) fixes from this patch: http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/patches/Fix-paths-in-man-pages.patch?h=experimental-220 The idea of using generic XML entities was presented here: http://lists.freedesktop.org/archives/systemd-devel/2015-May/032240.html This patch solves almost all the issues, with the exception of: - Path to /bin/mount and /bin/umount. - Generic statements about preference of /lib over /etc. These will be handled separately by follow up patches. Tested: - With default configure settings, ran "make install" to two separate directories and compared the output to confirm they matched exactly. - Used a set of configure flags including $CONFFLAGS from Debian: http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/rules Installed the tree and confirmed the paths use /lib/systemd instead of /usr/lib/systemd and that no other unexpected differences exist. - Confirmed that `make distcheck` still passes.
* man: boilerplate unificationZbigniew Jędrzejewski-Szmek2015-02-101-13/+12
|
* man: fix typosRonny Chevalier2015-01-221-6/+6
|
* man: add emacs header to get correct indention in nxml-mode for the manpage ↵Lennart Poettering2014-11-211-1/+1
| | | | | | | | XML files that use 2ch indenting In the long run we really should figure out if we want to stick with 8ch or 2ch indenting, and not continue with half-and-half. For now, just make emacs aware of the files that use 2ch indenting.
* core: introduce new Delegate=yes/no property controlling creation of cgroup ↵Lennart Poettering2014-11-051-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | subhierarchies For priviliged units this resource control property ensures that the processes have all controllers systemd manages enabled. For unpriviliged services (those with User= set) this ensures that access rights to the service cgroup is granted to the user in question, to create further subgroups. Note that this only applies to the name=systemd hierarchy though, as access to other controllers is not safe for unpriviliged processes. Delegate=yes should be set for container scopes where a systemd instance inside the container shall manage the hierarchies below its own cgroup and have access to all controllers. Delegate=yes should also be set for user@.service, so that systemd --user can run, controlling its own cgroup tree. This commit changes machined, systemd-nspawn@.service and user@.service to set this boolean, in order to ensure that container management will just work, and the user systemd instance can run fine.
* man: fix copy/paste error in CPUQuota= section of resource-controlDavid Strauss2014-10-151-1/+1
|
* man: reword StartupCPUShares= descriptionZbigniew Jędrzejewski-Szmek2014-05-241-12/+14
| | | | | Now that we have two options described in the same paragraph, we cannot use singular anymore.
* cgroups: simplify CPUQuota= logicLennart Poettering2014-05-221-22/+5
| | | | | | | | | Only accept cpu quota values in percentages, get rid of period definition. It's not clear whether the CFS period controllable per-cgroup even has a future in the kernel, hence let's simplify all this, hardcode the period to 100ms and only accept percentage based quota values.
* cgroup: rework startup logicLennart Poettering2014-05-221-38/+27
| | | | | Introduce a (unsigned long) -1 as "unset" state for cpu shares/block io weights, and keep the startup unit set around all the time.
* core: add startup resource control optionWaLyong Cho2014-05-221-0/+24
| | | | | | | | | | | Similar to CPUShares= and BlockIOWeight= respectively. However only assign the specified weight during startup. Each control group attribute is re-assigned as weight by CPUShares=weight and BlockIOWeight=weight after startup. If not CPUShares= or BlockIOWeight= be specified, then the attribute is re-assigned to each default attribute value. (default cpu.shares=1024, blkio.weight=1000) If only CPUShares=weight or BlockIOWeight=weight be specified, then that implies StartupCPUShares=weight and StartupBlockIOWeight=weight.