mirror of
https://github.com/msfjarvis/server-config
synced 2025-08-14 11:47:01 +05:30
systemd: Cap resource usage for all services
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
parent
4e44394ee6
commit
9a506ec776
7 changed files with 28 additions and 0 deletions
|
@ -24,6 +24,10 @@ ReadWriteDirectories=/etc/ssl/caddy
|
|||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
NoNewPrivileges=true
|
||||
CPUWeight=10
|
||||
CPUQuota=10%
|
||||
IOWeight=20
|
||||
MemorySwapMax=0
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -17,6 +17,10 @@ Restart=always
|
|||
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
|
||||
#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||
#AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
CPUWeight=20
|
||||
CPUQuota=25%
|
||||
IOWeight=20
|
||||
MemorySwapMax=0
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -16,6 +16,10 @@ TimeoutStopSec=5s
|
|||
PrivateTmp=true
|
||||
PrivateDevices=true
|
||||
ProtectSystem=full
|
||||
CPUWeight=10
|
||||
CPUQuota=10%
|
||||
IOWeight=20
|
||||
MemorySwapMax=0
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -16,6 +16,10 @@ TimeoutStopSec=5s
|
|||
PrivateTmp=true
|
||||
PrivateDevices=true
|
||||
ProtectSystem=full
|
||||
CPUWeight=10
|
||||
CPUQuota=10%
|
||||
IOWeight=20
|
||||
MemorySwapMax=0
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -15,6 +15,10 @@ TimeoutStopSec=5s
|
|||
PrivateTmp=true
|
||||
PrivateDevices=false
|
||||
ProtectSystem=full
|
||||
CPUWeight=10
|
||||
CPUQuota=10%
|
||||
IOWeight=20
|
||||
MemorySwapMax=0
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -15,6 +15,10 @@ TimeoutStopSec=5s
|
|||
PrivateTmp=true
|
||||
PrivateDevices=false
|
||||
ProtectSystem=full
|
||||
CPUWeight=10
|
||||
CPUQuota=10%
|
||||
IOWeight=20
|
||||
MemorySwapMax=0
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -15,6 +15,10 @@ TimeoutStopSec=5s
|
|||
PrivateTmp=true
|
||||
PrivateDevices=false
|
||||
ProtectSystem=full
|
||||
CPUWeight=10
|
||||
CPUQuota=10%
|
||||
IOWeight=20
|
||||
MemorySwapMax=0
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue