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

daemon,agent: Use custom load1 for CPU scaling #1136

Draft
wants to merge 9 commits into
base: misha/cpu-scaling
Choose a base branch
from

Conversation

sharnoff
Copy link
Member

Builds on #1111. Fixes #1114, helps with #729.

Pending approval of the RFC: https://www.notion.so/neondatabase/131f189e004780b2915ef2fdb95bae6a
Pending testing that this works as intended in practice.

mikhail-sakhnov and others added 9 commits October 31, 2024 01:47
…xplicitly default the field value if it is not set

Signed-off-by: Misha Sakhnov <[email protected]>
…nd mark vmSpec.Guest.CPUs.Min as online during the boot

Signed-off-by: Misha Sakhnov <[email protected]>
introduce separate CPU scaling flow based on the vmSpec.cpuScalingMode

If vmSpec.cpuScalingMode is equal to `qmp_scaling` the logic of the
scaling is preserved as before:

- Scale, if required the amount of CPUs using qmp commands.
- If it is required to scale cgroups, call vm-runner /cpu_change endpoint

if vmSpec.cpuScalingMode is equal to `cpuSysfsStateScaling` all cpu
scaling requests go directly to the vm-runner /cpu_change, which in
that configuration goes to the neonvm-daemon to reconcile required
amount of online CPUs.

Value `cpuSysfsStateScaling` also modifies the qemu and the kernel
arguments to enable plug all CPUs but mark as online only first one.

Signed-off-by: Misha Sakhnov <[email protected]>
pass cpuScalingMode as argument to the vm-runner
rename arguments, constants and functions here and there
drop unused code
move default cpu scaling mode to controller argument

Signed-off-by: Misha Sakhnov <[email protected]>
@sharnoff sharnoff marked this pull request as draft November 11, 2024 05:02
Copy link

No changes to the coverage.

HTML Report

Click to open

@mikhail-sakhnov mikhail-sakhnov force-pushed the misha/cpu-scaling branch 5 times, most recently from ffd9538 to 27299cb Compare November 19, 2024 06:36
@mikhail-sakhnov mikhail-sakhnov force-pushed the misha/cpu-scaling branch 3 times, most recently from d0af69f to fe10eef Compare November 20, 2024 16:03
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.

2 participants