From 09a2e7cd192d09adef0b239b5a4ef7740d4cdd74 Mon Sep 17 00:00:00 2001 From: surtur Date: Mon, 3 Oct 2022 13:44:42 +0200 Subject: [PATCH] add coredns.slice --- .gitattributes | 1 + etc/systemd/system/coredns.slice | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 etc/systemd/system/coredns.slice diff --git a/.gitattributes b/.gitattributes index 86b8c43..9849507 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ *.service linguist-language=systemd +*.slice linguist-language=systemd *.timer linguist-language=systemd *.path linguist-language=systemd diff --git a/etc/systemd/system/coredns.slice b/etc/systemd/system/coredns.slice new file mode 100644 index 0000000..d69faf0 --- /dev/null +++ b/etc/systemd/system/coredns.slice @@ -0,0 +1,16 @@ +[Unit] +Description=Slice that limits coredns.service +Before=slices.target +; Wants=network.target + +[Slice] +; CPUAccounting=yes +; CPUQuota=5% + +MemoryAccounting=yes +MemoryHigh=120M +MemoryMax=128M +MemorySwapMax=64M + +[Install] +WantedBy=multi-user.target