Just learned something CPU Limiter

I have a small arm linux server that runs simplehelp.
SimpleHelp has been spiking the cpu for some odd reason. I havnt found the root cause yet.
But I did find a way to limit the cpu usage. In the systemd simplehep.service file under [Service] add CPUQuota= and then the amount you want to limit it too.

Heres a copy of my service file. Hopefully this helps someone else who also didnt realize you could do this :stuck_out_tongue:

[Unit]
Description=SimpleHelp Server
After=network.target
StartLimitIntervalSec=500
StartLimitBurst=5

[Service]
WorkingDirectory=/opt/SimpleHelp/
Type=forking
ExecStart=/bin/bash /opt/SimpleHelp/serverstart.sh
ExecStop=/bin/bash /opt/SimpleHelp/serverstop.sh
CPUQuota=30%
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target

1 Like