[pve-devel] [PATCH pve-docs 1/3] Document the Shares option in Memory panel

Emmanuel Kasper e.kasper at proxmox.com
Thu Jun 9 13:26:42 CEST 2016

 qm.adoc | 12 ++++++++++++
 1 file changed, 12 insertions(+)

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

More information about the pve-devel mailing list