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

Ensure cgroups cpu.weight is within [1, 10_000] #178

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

NathanFlurry
Copy link
Member

@NathanFlurry NathanFlurry commented Nov 16, 2023

Problem

Runs with >= 1 CPU core would fail with this error:

time="2023-11-15T19:01:22Z" level=error msg="runc run failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: failed to write \"38144\": write /sys/fs/cgroup/system.slice/rivet-573e639a-7e66-6d43-3eee-c0fcd98c9cdf/cpu.weight: numerical result out of range"

The resulting CPU weight would be larger than 10,000.

Solution

The CPU weight is now converted from millicors to centicores (i.e. divide by 10) so 32 cores is still less than 10,000 shares.

@NathanFlurry NathanFlurry merged commit e6ab0d0 into main Nov 16, 2023
11 checks passed
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

Successfully merging this pull request may close these issues.

1 participant