diff options
author | Florian Klink <flokli@flokli.de> | 2019-08-27 11:38:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-27 11:38:28 +0200 |
commit | 9a02d9c75e94aa63983a085df774ea9b7a728b29 (patch) | |
tree | bb6d696702528cdbae02c82887c73b61f0ec8ee3 /nixos | |
parent | 4b09f9995d47e8bb0cf04d3d8ba873e35d20c751 (diff) | |
parent | 6b075ddc8fc02358e5bd4b41cb3c36a691a1f424 (diff) | |
download | nixlib-9a02d9c75e94aa63983a085df774ea9b7a728b29.tar nixlib-9a02d9c75e94aa63983a085df774ea9b7a728b29.tar.gz nixlib-9a02d9c75e94aa63983a085df774ea9b7a728b29.tar.bz2 nixlib-9a02d9c75e94aa63983a085df774ea9b7a728b29.tar.lz nixlib-9a02d9c75e94aa63983a085df774ea9b7a728b29.tar.xz nixlib-9a02d9c75e94aa63983a085df774ea9b7a728b29.tar.zst nixlib-9a02d9c75e94aa63983a085df774ea9b7a728b29.zip |
Merge pull request #66984 from flokli/systemd-cgroup-accounting
nixos/systemd: enable systemd cgroup accounting by default
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/doc/manual/release-notes/rl-1909.xml | 20 | ||||
-rw-r--r-- | nixos/modules/system/boot/systemd.nix | 6 | ||||
-rw-r--r-- | nixos/tests/systemd.nix | 7 |
3 files changed, 24 insertions, 9 deletions
diff --git a/nixos/doc/manual/release-notes/rl-1909.xml b/nixos/doc/manual/release-notes/rl-1909.xml index b02d99438de0..85ad34f6a66e 100644 --- a/nixos/doc/manual/release-notes/rl-1909.xml +++ b/nixos/doc/manual/release-notes/rl-1909.xml @@ -506,12 +506,20 @@ been removed. </para> </listitem> - <listitem> - <para> - The <literal>rmilter</literal> package was removed with associated module and options due deprecation by upstream developer. - Use <literal>rspamd</literal> in proxy mode instead. - </para> - </listitem> + <listitem> + <para> + The <literal>rmilter</literal> package was removed with associated module and options due deprecation by upstream developer. + Use <literal>rspamd</literal> in proxy mode instead. + </para> + </listitem> + <listitem> + <para> + systemd cgroup accounting via the + <link linkend="opt-systemd.enableCgroupAccounting">systemd.enableCgroupAccounting</link> + option is now enabled by default. It now also enables the more recent Block IO and IP accounting + features. + </para> + </listitem> </itemizedlist> </section> </section> diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 23a2dd45d492..2a0360b12cbc 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -537,7 +537,7 @@ in }; systemd.enableCgroupAccounting = mkOption { - default = false; + default = true; type = types.bool; description = '' Whether to enable cgroup accounting. @@ -804,10 +804,10 @@ in [Manager] ${optionalString config.systemd.enableCgroupAccounting '' DefaultCPUAccounting=yes + DefaultBlockIOAccounting=yes DefaultIOAccounting=yes DefaultBlockIOAccounting=yes - DefaultMemoryAccounting=yes - DefaultTasksAccounting=yes + DefaultIPAccounting=yes ''} DefaultLimitCORE=infinity ${config.systemd.extraConfig} diff --git a/nixos/tests/systemd.nix b/nixos/tests/systemd.nix index 3168c026d514..1c201e3b5dcc 100644 --- a/nixos/tests/systemd.nix +++ b/nixos/tests/systemd.nix @@ -89,5 +89,12 @@ import ./make-test.nix ({ pkgs, ... }: { $machine->waitForUnit('multi-user.target'); $machine->succeed('sysctl net.core.default_qdisc | grep -q "fq_codel"'); }; + + # Test cgroup accounting is enabled + subtest "systemd cgroup accounting is enabled", sub { + $machine->waitForUnit('multi-user.target'); + $machine->succeed('systemctl show testservice1.service -p IOAccounting | grep -q "yes"'); + $machine->succeed('systemctl status testservice1.service | grep -q "CPU:"'); + }; ''; }) |