]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Document that MemorySwapMax supports % configuration
authorSteve Traylen <steve.traylen@cern.ch>
Wed, 3 Jul 2024 12:19:08 +0000 (14:19 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 22 Jul 2024 10:39:33 +0000 (11:39 +0100)
Certainly on systemd 252 at least a configuration of
```
MemorySwapMax=40%
```
is supported but this was missing from the man page.
Only MemoryMax was documented as supporting a %.

man/systemd.resource-control.xml

index 3773a38d6280ad55a438dd68108f80159b973fa2..2ffc279a35f4eb6d34205efcb5f2f9d0f3e3176e 100644 (file)
@@ -462,7 +462,8 @@ CPUWeight=20   DisableControllers=cpu              /          \
           <para>Specify the absolute limit on swap usage of the executed processes in this unit.</para>
 
           <para>Takes a swap size in bytes. If the value is suffixed with K, M, G or T, the specified swap size is
-          parsed as Kilobytes, Megabytes, Gigabytes, or Terabytes (with the base 1024), respectively. If assigned the
+          parsed as Kilobytes, Megabytes, Gigabytes, or Terabytes (with the base 1024), respectively. Alternatively, a
+          percentage value may be specified, which is taken relative to the specified swap size on the system. If assigned the
           special value <literal>infinity</literal>, no swap limit is applied. These settings control the
           <literal>memory.swap.max</literal> control group attribute. For details about this control group attribute,
           see <ulink url="https://docs.kernel.org/admin-guide/cgroup-v2.html#memory-interface-files">Memory Interface Files</ulink>.</para>