Skip to content

Commit

Permalink
M #-: Improve KVM live memory management description (#2719)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9f7fbf8)
  • Loading branch information
dann1 authored and tinova committed Oct 23, 2023
1 parent 02f0de7 commit c38a4f2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source/open_cluster_deployment/kvm_node/kvm_driver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,15 @@ If you need to resize the capacity of the VM in ``RUNNING`` state, you have to s

.. note:: Live Memory resize needs QEMU version 2.4. Live VCPU resize needs QEMU version 2.7.

MEMORY_RESIZE_MODE
------------------

``BALLOONING`` is about dynamically adjusting the amount of RAM allocated to VMs. It allows KVM to reclaim unused memory from one VM and allocate it to another VM that needs it more, without shutting down or pausing the VMs. The parameter sets up a **balloon driver** within the VM that communicates with the host. When the host needs to **reclaim memory**, the driver *inflates*, reserving some of the VM's unused memory for the host. When the VM needs additional memory, the driver *deflates*, releasing reserved memory back to the VM.

From the VM's standpoint, it seems like the available memory is decreasing or increasing. The OS inside the VM will think it's using more memory when the balloon inflates and think it's using less when the balloon deflates. This can go back and forth many times during the VM's lifecycle, always ensuring that each VM has as much memory as it needs, up to ``MEMORY_MAX``, but no more than that.

In ``HOTPLUG`` mode the Guest OS will perceive a new virtual RAM stick being plugged into the virtual motherboard. The downside of this mode is that in order to reduce memory, you need to remove the exact memory it was added before, which emulates the RAM stick removal. By default is limited to 16 RAM stick devices (ie, you can increase memory by hotplug 16 times).

Disk/NIC Hotplugging
--------------------

Expand Down

0 comments on commit c38a4f2

Please sign in to comment.