Session
VM Memory Resizing Daemon (vmrd). We describe about a userspace daemon that registers to the Linux kernel's PSI mechanism for monitoring and detecting memory pressure events in the system, and requests for adding/removing memory blocks from the host based on real-time memory demands in the system. This dynamic approach makes it guest driven without need for intervention of an admin/host. The virtio-mem interface is used for communicating with the host for adding/removing memory blocks. Detecting increase in memory demand – the daemon registers to certain PSI events and monitors pressure building up when memory allocations occurs. With set thresholds, even the slightest memory pressure triggers the daemon to make an educated guess that a memory requiring use case is active and requests additional memory from the host. Detecting decrease in memory pressure – the daemon monitors pressure decay and psi averages (avg10, avg60, avg300) and along with other memory stats. Based on these metrics, it makes an educated guess that the usecase has ended and frees up memory by releasing it back to host. The process of tracking memory pressure going down and releasing memory back to host is done in a separate thread. This gives a fully dynamic and on-demand approach of resizing the VM system memory by way of detecting memory pressures using the kernel PSI mechanism. The native userspace daemon is also CPU architecture and Hypervisor agnostic. More details on design and logic will be explained in the presentation session.