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

maxprocs: CPU quota undefined #43

Closed
ardan-bkennedy opened this issue Dec 9, 2021 · 7 comments
Closed

maxprocs: CPU quota undefined #43

ardan-bkennedy opened this issue Dec 9, 2021 · 7 comments

Comments

@ardan-bkennedy
Copy link

This has not always been the case and I have tried to trace the code, but I don't know enough.

The project in question is https://github.com/ardanlabs/service and I am using KIND.

It seems to me /proc/self/cgroup is missing from the list of SuperOptions. Not sure why this is now happening.

Any guidance to debug or understand this would be appreciated. I can walk someone to run the code.

@ardan-bkennedy
Copy link
Author

More information. I have a shell inside the running container. Just not sure what I can do with this information.

# cat /proc/self/cgroup
0::/
# cat /proc/self/mountinfo
1065 962 0:328 / / rw,relatime master:245 - overlay overlay rw,lowerdir=/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/53/fs:/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/52/fs:/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/51/fs,upperdir=/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/55/fs,workdir=/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/55/work
1066 1065 0:330 / /proc rw,nosuid,nodev,noexec,relatime - proc proc rw
1067 1065 0:331 / /dev rw,nosuid - tmpfs tmpfs rw,size=65536k,mode=755
1068 1067 0:332 / /dev/pts rw,nosuid,noexec,relatime - devpts devpts rw,gid=5,mode=620,ptmxmode=666
1069 1067 0:321 / /dev/mqueue rw,nosuid,nodev,noexec,relatime - mqueue mqueue rw
1070 1065 0:152 / /sys ro,nosuid,nodev,noexec,relatime - sysfs sysfs ro
1071 1070 0:30 / /sys/fs/cgroup ro,nosuid,nodev,noexec,relatime - cgroup2 cgroup rw
1072 1065 254:1 /docker/volumes/2682bff96335d7b90731910f0ca3a21b656691f7a8bd8dcf077be5b29e08b53a/_data/lib/kubelet/pods/9e244aa4-b0e9-40bc-b5ac-f1d5606d99cb/etc-hosts /etc/hosts rw,relatime - ext4 /dev/vda1 rw
1073 1067 254:1 /docker/volumes/2682bff96335d7b90731910f0ca3a21b656691f7a8bd8dcf077be5b29e08b53a/_data/lib/kubelet/pods/9e244aa4-b0e9-40bc-b5ac-f1d5606d99cb/containers/sales-api/9e48480f /dev/termination-log rw,relatime - ext4 /dev/vda1 rw
1074 1065 254:1 /docker/volumes/2682bff96335d7b90731910f0ca3a21b656691f7a8bd8dcf077be5b29e08b53a/_data/lib/containerd/io.containerd.grpc.v1.cri/sandboxes/2663843aea5341800696094fc9b10adc8b4190ee93414c3a1a4caea5d7d6f286/hostname /etc/hostname rw,relatime - ext4 /dev/vda1 rw
1075 1065 254:1 /docker/volumes/2682bff96335d7b90731910f0ca3a21b656691f7a8bd8dcf077be5b29e08b53a/_data/lib/containerd/io.containerd.grpc.v1.cri/sandboxes/2663843aea5341800696094fc9b10adc8b4190ee93414c3a1a4caea5d7d6f286/resolv.conf /etc/resolv.conf rw,relatime - ext4 /dev/vda1 rw
1076 1067 0:318 / /dev/shm rw,nosuid,nodev,noexec,relatime - tmpfs shm rw,size=65536k
1077 1065 0:317 / /run/secrets/kubernetes.io/serviceaccount ro,relatime - tmpfs tmpfs rw,size=6087028k
963 1066 0:330 /bus /proc/bus ro,nosuid,nodev,noexec,relatime - proc proc rw
964 1066 0:330 /fs /proc/fs ro,nosuid,nodev,noexec,relatime - proc proc rw
965 1066 0:330 /irq /proc/irq ro,nosuid,nodev,noexec,relatime - proc proc rw
966 1066 0:330 /sys /proc/sys ro,nosuid,nodev,noexec,relatime - proc proc rw
967 1066 0:330 /sysrq-trigger /proc/sysrq-trigger ro,nosuid,nodev,noexec,relatime - proc proc rw
968 1066 0:333 / /proc/acpi ro,relatime - tmpfs tmpfs ro
969 1066 0:331 /null /proc/kcore rw,nosuid - tmpfs tmpfs rw,size=65536k,mode=755
970 1066 0:331 /null /proc/keys rw,nosuid - tmpfs tmpfs rw,size=65536k,mode=755
971 1066 0:331 /null /proc/timer_list rw,nosuid - tmpfs tmpfs rw,size=65536k,mode=755
986 1066 0:331 /null /proc/sched_debug rw,nosuid - tmpfs tmpfs rw,size=65536k,mode=755
987 1070 0:334 / /sys/firmware ro,relatime - tmpfs tmpfs ro

@Penthious
Copy link

Any updates on this, I as well am hitting this same issue

@ardan-bkennedy
Copy link
Author

I have not received anything :(

@embano1
Copy link

embano1 commented Jan 27, 2022

IMHO you‘re hitting cgroupv2 behavior on your underlying Docker host (where kind is running). IIUC, should be fixed by #44

@ardan-bkennedy
Copy link
Author

I just verified that #44 fixes the problem.

@ardan-bkennedy
Copy link
Author

ardan-bkennedy commented Apr 5, 2022

I just tried the new 1.5.0 tagged release which was expected to fix the quota for cgroups2. It's not working :(

CPU quota undefined

@abhinav any ideas?

This fork is working
"github.com/emadolsky/automaxprocs/maxprocs"

@abhinav
Copy link
Contributor

abhinav commented Apr 6, 2022

Based on discussion in #44 and #49, this looks like it's done.
Thanks for testing @ardan-bkennedy!

@abhinav abhinav closed this as completed Apr 6, 2022
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

4 participants