Memory overcommiting process

Guest virtual machines running on a KVM hypervisor do not have dedicated blocks of physical RAM assigned to them. Instead, each guest virtual machine functions as a Linux process where the host physical machine's Linux kernel allocates memory only when requested. In addition the host physical
machine's memory manager can move the guest virtual machine's memory between its own physical memory and swap space. T his is why overcommitting requires allotting sufficient swap space on the host physical machine to accommodate all guest virtual machines as well as enought memory for the
host physical machine's processes. As a basic rule, the host physical machine's operating system requires a maximum of 4GB of memory along with a minimum of 4GB of swap space.




T his example demonstrates how to calculate swap space for overcommitting. Although it may appear to be simple in nature, the ramifications of overcommitting should not be ignored. Refer to Important before proceeding.

ExampleServer1 has 32GB of physical RAM. T he system is being configured to run 50 guest virtual machines, each requiring 1GB of virtualized memory. As mentioned above, the host physical machine's system itself needs a maximum of 4GB (apart from the guest virtual machines) as well as an additional 4GB as a swap space minimum.
The swap space is calculated as follows:
Calculate the amount of memory needed for the sum of all the guest virtual machines - In this example: (50 guest virtual machines * 1GB of memory per guest virtual machine) = 50GB
Add the guest virtual machine's memory amount to the amount needed for the host physical machine's OS and for the host physical machine's minimum swap space - In this example: 50GB
guest virtual machine memory + 4GB host physical machine's OS + 4GB minimal swap = 58GB
Subtract this amount from the amount of physical RAM there is on the system - In this example
58GB - 32GB = 26GB
T he answer is the amount of swap space that needs to be allocated in Host.

Comments

Popular posts from this blog

Using a Linux server to route packets between two private networks

PHP Fatal error: Class 'JFactory' not found

KVM & Qemu