Installation guide

Linux Compressed Loop image, useful only to reuse directly compressed CD -ROM images
present for example in the Knoppix CD -ROMs.
33.4 . Overcommit t ing Resources
The KVM hypervisor supports overcommitting CPUs and memory. Overcommitting is the process of
allocating more virtualized CPUs or memory than there are physical resources on the system. CPU
overcommit allows under-utilized virtualized servers or desktops to run on fewer servers which saves
power and money.
Important
Memory overcommitting is not supported for the Xen hypervisor, however CPU overcommitting
is supported.
O verco mmit t in g memo ry
Most operating systems and applications do not use 100% of the available RAM all the time. This
behavior can be exploited with KVM to use more memory for guests than what is physically available.
When using KVM, virtual machines operate as Linux processes. Guests on the KVM hypervisor do not
have blocks of physical RAM assigned to them, instead they function as processes. Each process in
a Linux system is allocated memory when it requests more memory. In a similar way, KVM allocates
memory for guests when the guest requests more or less memory. The guest only uses slightly more
physical memory than the virtualized operating system appears to use.
When physical memory is nearly completely used or a process is inactive for some time, Linux moves
the process's memory to swap. Swap is usually a partition on a hard disk drive or solid state drive
which Linux uses to extend virtual memory. Swap is significantly slower than RAM.
As KVM virtual machines are Linux processes, memory used by guests can be put into swap if the
guest is idle or not in heavy use. Memory can be committed over the total size of the swap and
physical RAM. This can cause issues if guests use their total RAM. Without sufficient memory and
swap space for the virtual machine processes, the system can run completely out of memory, leading
to the failure of one or more virtual machine processes.
Warning
If sufficient swap is not available guest operating systems will be forcibly shut down. This may
leave guests inoperable. Avoid this by never overcommitting more memory than there is swap
available.
The swap partition is used for swapping underused memory to the hard drive to speed up memory
performance. The default size of the swap partition is calculated from amount of RAM and overcommit
ratio. It is recommended to make your swap partition larger if you intend to overcommit memory with
KVM. A recommended overcommit ratio is 50% (0.5). The formula used is:
(0.5 * RAM) + (overcommit ratio * RAM) = Recommended swap size
Red Hat Knowledgebase has an article on safely and efficiently determining the size of the swap
partition.
Red Hat En t erp rise Lin ux 5 Virt ualizat ion Guid e
312