From: Emmanuel Kasper Date: Thu, 9 Jun 2016 11:26:42 +0000 (+0200) Subject: Document the Shares option in Memory panel X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=c9f6e1a4f6607851c416c2abdfee350affa47c33;p=pve-docs.git Document the Shares option in Memory panel --- diff --git a/qm.adoc b/qm.adoc index b365e9b..a9e3d53 100644 --- a/qm.adoc +++ b/qm.adoc @@ -252,6 +252,18 @@ done via a special `balloon` kernel driver running inside the guest, which will grab or release memory pages from the host. footnote:[A good explanation of the inner workings of the balloon driver can be found here https://rwmj.wordpress.com/2010/07/17/virtio-balloon/] +When multiple VMs use the autoallocate facility, it is possible to set a +*Shares* coefficient which indicates the relative amount of the free host memory +that each VM shoud take. Suppose for instance you have four VMs, three of them +running a HTTP server and the last one is a database server. To cache more +database blocks in the database server RAM, you would like to prioritize the +database VM when spare RAM is available. For this you assign a Shares property +of 3000 to the database VM, leaving the other VMs to the Shares default setting +of 1000. The host server has 32GB of RAM, and is curring using 16GB, leaving 32 +* 80/100 - 16 = 9GB RAM to be allocated to the VMs. The database VM will get 9 * +3000 / (3000 + 1000 + 1000 + 1000) = 4.5 GB extra RAM and each HTTP server will +get 1/5 GB. + All Linux distributions released after 2010 have the balloon kernel driver included. For Windows OSes, the balloon driver needs to be added manually and can incur a slowdown of the guest, so we don't recommend using it on critical