Memory ballooning

Memory ballooning

Overview

Ivy with balloon

Memory ballooning is a dynamic memory management technique that enables the Edera hypervisor to adjust the memory allocated to zones in real time. This allows the Edera platform to reallocate memory resources based on current usage patterns without requiring pod disruption.

Why memory ballooning

In virtualized environments, physical memory is a shared resource. When multiple Edera zones are deployed on a single node, the aggregate memory demand may exceed the node’s available capacity. Memory ballooning helps mitigate this issue by allowing the hypervisor to reclaim unused memory from some zones and redistribute it to other zones that require more memory based on usage patterns or a scaling event.

How it works

Memory ballooning is implemented through a balloon driver running within the zone. The zone driver interacts with the hypervisor to indicate memory pressure inside the guest. This mechanism operates as follows:

  • Balloon inflation: The hypervisor requests the balloon driver to allocate memory pages within the zone. These pages are backed by physical memory on the node. Once allocated, the hypervisor revokes access to the node memory behind these pages, making it available for reuse by other zones.
  • Balloon deflation: When workloads scale down or sufficient node memory is available, the balloon driver releases its allocated pages. The hypervisor restores access to those physical pages for use by the node.

This process is transparent to pod running in the zone and can be performed in real-time without pod disruption. Some workloads that run in zones may be idle, while others may require more memory during peak usage. Through ballooning, Edera can reclaim unused memory from idle zones and dynamically allocate that memory to zones with higher demand, improving memory utilization across the node and the cluster.

Last updated on