Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sane-behavior cannot set when enabling hierarchical cgroup v1 blkio throttling #177

Open
liuyingshanx opened this issue Sep 16, 2022 · 1 comment

Comments

@liuyingshanx
Copy link

Question

OS: Ubuntu20.04 5.15.0-46-generic
docker: 20.10.12
containerd: 20.10.12-0
runc: 1.1.0-0
cgroup version: v1
kubernetes: 1.22.0

Hello,

I implemeted OpenLocal with kubernetes 1.22.0, and trying to throttle LVM block IO following https://github.com/alibaba/open-local/blob/main/docs/user-guide/type-lvm_zh_CN.md.

The cgroup block io bps and iops limit is all in pod level. Throttling implements hierarchy support, it is reasonable to limit all containers' total block iops and bps under the value that set to the pod's blkio.throttle.read_bps_device, blkio.throttle.write_bps_device, blkio.throttle.read_iops_device and blkio.throttle.write_iops_device.

However, throttling's hierarchy support is enabled only if "sane_behavior" is enabled from cgroup side, and cgroup.sane_behavior(ReadOnly) is set to 0 by default.
Ref: https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt
To limit container's blkio, I must enable "sane_behavior" by remounting /sys/fs/cgroup/blkio with the flag -o __DEVEL__sane_behavior. The problem is that it seems the kernel desn't recognize the flag.

$ umount -l /sys/fs/cgroup/blkio
$ mount -t cgroup -o blkio -o __DEVEL__sane_behavior none /sys/fs/cgroup/blkio
mount: /sys/fs/cgroup: wrong fs type, bad option, bad superblock on none, missing codepage or helper program, or other error

Is any one tried the io throttling function with success? Could you please give me some info about your kernel version or any problem with my configuration? Thanks!

@Clara12062
Copy link
Contributor

Clara12062 commented Sep 7, 2023

Do you have any new developments? I'm also having the same issue on version 0.7.1.

  • kernel: 3.10.0-1160.6.1.el7.x86_64.
  • k8s: 1.23.17
  • docker: 20.10.24
    This is environmentally effective.

I deployed it as https://github.com/alibaba/open-local/blob/main/docs/user-guide/type-lvm_zh_CN.md.
When I use kernel version 4.18.0-372.9.1.15.po1.x86_64, pod-level limits are successfully written.
But the current limit didn't take effect. Then I wrote the limit to the container hierarchy of the inner layer, the IO limit takes effect.

I also suspect something to do with sane_behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants