-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
Memory hotplug support for VMs #986
Comments
Yeah, that's been something we've been meaning to add for a while, but it's also a very complex one to handle right as you need to decide on the right granularity, consider NUMA nodes, handle hugepages, ... We already have 3-4 different code paths for memory as it stands today and all of those will need to handle DIMM hotplug. The other side of this will be to know how well the OS will handle this. For CPU we can very easily hotplug/hotremove CPUs and the OS usually handles that pretty well. For memory, hotplug should be okay, hotremove likely to be more problematic, so we may need to use ballooning for hotremove. For now the trick you can use is start the VM with a higher allocation than needed and the reduce limits.memory which will use the memory balloon driver to shrink things. |
|
Any chance of an option to 'pre-inflate' the balloon at boot time? That would be a quick and dirty way of way of getting something equivalent to memory hotplug, up to a pre-defined limit :) |
That's an option I considered but it's a bit tricky as the balloon requires a kernel driver to work properly, so it would effectively still allow the guest to consume more memory by preventing that driver from getting loaded. That's particularly relevant when you consider multi-tenant Incus deployments where users have access to individual projects with resource limits in place. If ballooning is used to allow growing the VM memory, then one of those tenants could tweak their VM to prevent ballooning and far exceed their memory allocation. We could still do it but would need a key like |
Is it possible for incus to support qemu memory hotplug feature defined here?
The usage is similar with CPU hotplug, launch qemu instance via
and change memory via QMP like:
From incus source code we can see CPU hotplug feature has been supported so I am asking why QEMU memory hotplug not supported, very confusing.
And the usage is obviously valuable.
Memory hotplug has been supported broadly by most guest OS(even the windows, almost all the versions have support for this as you may know, CPU hotplug has been supported by only windows server edition), and qemu has the support, too.
For incus we may need to add check for memory hotplug feature, give an initial slots value(maybe 2) and maxmem size(maybe 32G) , and when user set limits.memory (or maybe limits.memory.size and limits.slots) I dont know clearly, incusd using the qmp client to handle the config change.
The text was updated successfully, but these errors were encountered: