This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
технология_cgroup [2024/04/30 11:15] val [cgroup v2] |
технология_cgroup [2024/12/11 10:58] (current) val [cgroup v2] |
||
|---|---|---|---|
| Line 9: | Line 9: | ||
| <code> | <code> | ||
| + | # ###systemd-run --scope -p MemoryMax=1M vim | ||
| + | |||
| # lssubsys -a | # lssubsys -a | ||
| Line 16: | Line 18: | ||
| # cat /sys/fs/cgroup/system.slice/apache2.service/memory.high | # cat /sys/fs/cgroup/system.slice/apache2.service/memory.high | ||
| - | # echo 500 > /sys/fs/cgroup/system.slice/apache2.service/memory.high | + | # echo 2000000 > /sys/fs/cgroup/system.slice/apache2.service/memory.high |
| - | # curl 127.0.0.1 | + | # time curl 127.0.0.1 |
| # systemctl edit --force --full my.slice | # systemctl edit --force --full my.slice | ||
| Line 31: | Line 33: | ||
| MemoryHigh=64M | MemoryHigh=64M | ||
| CPUAccounting=true | CPUAccounting=true | ||
| - | CPUQuota=1% | + | CPUQuota=5% |
| TasksMax=4096 | TasksMax=4096 | ||
| </code><code> | </code><code> | ||
| Line 42: | Line 44: | ||
| # systemctl restart apache2.service | # systemctl restart apache2.service | ||
| + | |||
| + | # systemd-cgls | ||
| + | /apache2 | ||
| # cat /sys/fs/cgroup/my.slice/memory.high | # cat /sys/fs/cgroup/my.slice/memory.high | ||