This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
технология_cgroup [2023/09/16 05:58] val |
технология_cgroup [2024/04/28 09:41] val |
||
---|---|---|---|
Line 4: | Line 4: | ||
* [[https://blogs.rdoproject.org/7761/hands-on-linux-sandbox-with-namespaces-and-cgroups|Hands on Linux sandbox with namespaces and cgroups]] | * [[https://blogs.rdoproject.org/7761/hands-on-linux-sandbox-with-namespaces-and-cgroups|Hands on Linux sandbox with namespaces and cgroups]] | ||
- | ===== Debian10/Ubuntu20 ===== | + | ===== cgroup v2 ===== |
+ | <code> | ||
+ | # systemd-cgls | ||
+ | /apache2 | ||
+ | |||
+ | # cat /sys/fs/cgroup/system.slice/apache2.service/memory.high | ||
+ | |||
+ | # echo 500 > /sys/fs/cgroup/system.slice/apache2.service/memory.high | ||
+ | |||
+ | # curl 127.0.0.1 | ||
+ | |||
+ | # systemctl stop apache2.service | ||
+ | |||
+ | # source /etc/apache2/envvars | ||
+ | |||
+ | # /usr/sbin/apache2 -k start | ||
+ | |||
+ | # csystemd-cgls | ||
+ | /apache2 | ||
+ | </code> | ||
+ | ===== cgroup v1 (Debian10/Ubuntu20) ===== | ||
<code> | <code> | ||
# ls /sys/fs/cgroup/ | # ls /sys/fs/cgroup/ |