4 ms·
Hot-adding memory is essentially have the equivalent of the mmap kernel syscall, but there's no ability for the VMs to return memory that they no longer need, a
by andrewstuart2 9y ago
Hot-adding memory is essentially have the equivalent of the mmap kernel syscall, but there's no ability for the VMs to return memory that they no longer need, as you have with the munmap syscall. So you may start out without overprovisioning, but eventually you will hit peak hours, redistribute your VMs, and be overprovisioned again unless you reboot machines after peak hours.
Even if you did add a capability to compact and dynamically stop using hardware memory into linux, then signal the hardware layer that it's not used, you're again just implementing another feature provided by standard kernels for decades. Not to mention this feature seems basically coupled to virtualized hardware.
- ahoka 9y agoThe kernel can unmap memory by having a special "ballooning" driver that "allocates" memory pages returned to the hypervisor. I'm pretty sure that every sane hypervisor supports it since ages.
- wiredfool 9y agoYou can take memory from the VM. I've just tested it on KVM, dropping the current memory allocation for a vm, and reraising it. Shows up in free in the vm instantly.
- andrewstuart2 9y agoWell it sounds like that is possible, but is there any way for the VM to indicate to the hypervisor that there is unused memory? Or for that fact, that it needs more? That's the critical missing piece, unless there's an API I'm unaware of.
- inetknght 9y agoI suppose this question should be posed on a linux kernel mailing list somewhere.