[Wings] Support CPU burst on top of the CFS quota — bursty game servers get hard-throttled on spikes #5714
menukaabhimandev
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Component: Wings.
Wings applies
cpu_limitas a plain CFS quota (quota = limit × 1000 over a 100ms period). That's a hard ceiling on every 100ms window, which is rough for game servers since their CPU usage is bursty, not steady.example: a Minecraft server sitting at 8% CPU overall. A player teleports somewhere new, the map loads, and for 2-3 seconds the server legitimately wants 150% of a core. With a plain quota it gets throttled mid-spike, players lag, and then it's back to 8% for the next hour. The average usage never got close to the limit, but the ceiling still bit.
The only workaround right now is raising
cpu_limit— which then lets the server actually burn that much constantly. You can't give headroom for spikes without giving it away all the time, and on shared nodes that's a tradeoff admins have to make every day.cgroup v2 already has the mechanism for this:
cpu.max-burst(kernel 5.14+). It lets a task bank unused runtime and spend it on short spikes, so a 100% quota with a burst budget allows the spike without changing the steady-state limit. On cgroup v1 there's no equivalent, so the setting would just be ignored there.Roughly how I'd see it:
cpu_burstlimit next tocpu_limitin the build settings, default 0/disabled so existing installs see no change.cpu_burst > 0and the cgroup is v2, writecpu.max-burstalongside the existing quota.For context, we've been running exactly this on our own nodes (a patched wings writing the burst value) and the teleport/map-load stutter went away without changing anyone's steady-state limit. Happy to share the implementation details if that helps.
All reactions