firecracker-microvm / firecracker

Secure and fast microVMs for serverless computing.
http://firecracker-microvm.io
Apache License 2.0
26.37k stars 1.83k forks source link

[Feature Request] Memory hot-plug #2890

Open luben opened 2 years ago

luben commented 2 years ago

Feature Request

We want to be able to add memory to an already booted VM. Tests with QEMU shows it's possible.Cursory look at cloud-hypervisor show it's supported by them also.

Describe the desired solution

An API call to running VM can add more memory to the system.

Additional context

We need VMs with different memory sizes and CPUs that can be used immediately. Currently we pool VMs with different sizes. We would prefer if we pool only one size of VMs and add the memory on-demand - when we know what size it needs.

There is already feature request for hot-plugging CPUs: https://github.com/firecracker-microvm/firecracker/issues/2609

Checks

raduiliescu commented 2 years ago

Hi @luben ,

Beside memory hotplug, which is not implemented in Firecracker, an alternative for your use case might be memory ballooning. Please take a look here - https://github.com/firecracker-microvm/firecracker/blob/main/docs/ballooning.md

Thanks!

alindima commented 2 years ago

Similar issue here: https://github.com/firecracker-microvm/firecracker/issues/2610