From 5297140958b0897441b5d25add141dab15797fa8 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Sun, 1 Oct 2023 10:47:06 +0300 Subject: [PATCH] systemd/limnoria.service: place limit on memory, commented cpuquote --- etc/systemd/system/limnoria.service | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/etc/systemd/system/limnoria.service b/etc/systemd/system/limnoria.service index 558c56bd..170d507d 100644 --- a/etc/systemd/system/limnoria.service +++ b/etc/systemd/system/limnoria.service @@ -19,6 +19,11 @@ ExecReload=/bin/kill -HUP $MAINPID Restart=always RestartSec=5s User=BOTUSER +# Limit memory to 300 Mb after which throthhle use. Useful with pypy. +# https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html +MemoryHigh=300M +# Also attempt to restrict CPU use to 9 % +#CPUQuota=9% [Install] WantedBy=multi-user.target