View Issue Details

IDProjectCategoryView StatusLast Update
0002740Rocky-Linux-9kernelpublic2023-06-08 13:32
Reportermichal michal Assigned To 
Status newResolutionopen 
Platformx86_64OSRocky LinuxOS Version9
Summary0002740: cgroups v2 io.max not applied from parent folder
Descriptionio.max cgroup v2 limit seems to be applied only from the lowest level of cgroup configuration.

We have the following structur for a process:

$ cat /proc/9439/cgroup

Setting io.max limit in dir1, dir2 or dir3 has no effect.

Such as this config has no effect:
echo "253:0 rbps=50971520" > /sys/fs/cgroup/dir1/dir2/dir3/io.max

However setting the limit in dir4 properly works:
echo "253:0 rbps=50971520" > /sys/fs/cgroup/dir1/dir2/dir3/dir4/io.max

$ cat /sys/fs/cgroup/dir1/dir2/dir3/dir4/cgroup.controllers
cpuset cpu io memory hugetlb pids rdma misc

Additional Informationuname -a
Linux hostname 5.14.0-162.18.1.el9_1.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Mar 1 22:02:24 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux


michal michal

michal michal

2023-06-08 09:40

reporter   ~0003730

Here's a good way to replicate this on a clean installation:

cd /sys/fs/cgroup/
echo +io > cgroup.subtree_control
mkdir disktest
cd disktest/
echo "8:0 wbps=1097150" > io.max
echo $$ > cgroup.procs
cd ~
dd if=/dev/zero of=sample bs=30M count=1 oflag=direct

On Rocky Linux 9.1, the io limit is not applied

# uname -a
Linux cg-rocky #1 SMP PREEMPT_DYNAMIC Wed Mar 1 19:45:58 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/rocky-release
Rocky Linux release 9.1 (Blue Onyx)

On Debian and CentOS, the limit is properly applied.

# uname -a
Linux cg-debian 5.10.0-22-cloud-amd64 #1 SMP Debian 5.10.178-3 (2023-04-22) x86_64 GNU/Linux
# cat /etc/debian_version

# uname -a
Linux cg-centos.c.1234.internal 5.14.0-307.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed May 3 06:16:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/centos-release
CentOS Stream release 9
michal michal

michal michal

2023-06-08 13:32

reporter   ~0003763

Can no longer reproduce with

# uname -a
Linux instance-1 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 17:09:15 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Can be closed

Issue History

Date Modified Username Field Change
2023-03-23 09:04 michal michal New Issue
2023-03-23 09:04 michal michal Tag Attached: kernel
2023-06-08 09:40 michal michal Note Added: 0003730
2023-06-08 13:32 michal michal Note Added: 0003763