5 ms·
Systemd has a mechanism[0] for configuring those limits. I believe you can limit a unit to 1 vCPU and 256MB of memory by using something like the following: [
by predakanga 3y ago
Systemd has a mechanism[0] for configuring those limits.
I believe you can limit a unit to 1 vCPU and 256MB of memory by using something like the following:
[Service]
CPUQuota=100% # 100% of a core
MemoryLimit=256MB
Red Hat has some documentation[1] as well if the systemd stuff is too oblique.
[0]: https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html https://www.freedesktop.org/software/systemd/man/systemd.res...
[1]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/resource_management_guide/sec-modifying_control_groups#sec-Modifying_Unit_Files https://access.redhat.com/documentation/en-us/red_hat_enterp...