Memory management techniques

In an environment where multiple VMs exist, Guest Additions can be used to share physical host memory between several guest VMs by reducing their usage of the total amount of memory. Memory overcommitment is a hypervisor feature that allows a VM to use more memory space than what is available in the physical host.

Memory ballooning

To change or reduce the amount of memory allocated to the guest VM, we need to shut down the VM and modify the settings to reduce the memory. With the help of the memory ballooning feature, memory that is allocated for a VM can be given to another machine without shutting down the guest VM.

When memory ballooning is triggered, the VirtualBox Guest Additions allocates physical memory from the guest operating system on the kernel level and locks this memory in the guest. This not only ensures that the guest no longer uses that claimed memory, but also that no other guest application or guest kernel uses it. Then VirtualBox can re-use this reclaimed memory and give it to another VM.

Currently, memory ballooning is only supported through the VBoxManage command.

To increase or decrease the size of the memory, use the following command:

VBoxManage controlvm "VM name” guestmemoryballoon <n>

Here VM name is the name of the guest VM (or you can use the universally unique identifier [UUID] of the VM) and n is the size of the memory to be allocated in MB from the guest VM.

Page fusion

Page fusion is a technique that transparently and securely shares identical memory pages between VMs, thus eliminating redundant copies of memory pages. This feature helps to avoid memory duplication between several similar, running VMs.

Use the following VBoxManage command to enable page fusion:

VBoxManage modifyvm "VM name” --pagefusion on

VM name: name of the guest VM (or you can use the UUID of the VM).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.74.25