@@ -4,6 +4,7 @@ layout: default
44---
55
66Memory is used for many things:
7+
78- the hypervisor code: this is the Xen executable itself
89- the hypervisor heap: this is needed for per-domain structures and per-vCPU
910 structures
@@ -23,15 +24,19 @@ at system boot time and model the per-VM overheads.
2324Host overhead
2425-------------
2526
26- TBD
27+ The host overhead is not managed by xapi, instead it is sampled. After the host
28+ boots and before any VMs start, xapi asks Xen how much memory the host has in
29+ total, and how much memory is currently free. Xapi subtracts the free from the
30+ total and stores this as the host overhead.
2731
2832VM overhead
2933------------
3034
3135The inputs to the model are
32- - VM.memory_static_max: the maximum amount of RAM the domain will be able to use
33- - VM.HVM_shadow_multiplier: allows the shadow memory to be increased
34- - VM.VCPUs_max: the maximum number of vCPUs the domain will be able to use
36+
37+ - ` VM.memory_static_max ` : the maximum amount of RAM the domain will be able to use
38+ - ` VM.HVM_shadow_multiplier ` : allows the shadow memory to be increased
39+ - ` VM.VCPUs_max ` : the maximum number of vCPUs the domain will be able to use
3540
3641First the shadow memory is calculated, in MiB
3742
@@ -44,9 +49,18 @@ Second the VM overhead is calculated, in MiB
4449Memory required to start a VM
4550-----------------------------
4651
47- TBD
52+ If ballooning is disabled, the memory required to start a VM is the same as the VM
53+ overhead above.
54+
55+ If ballooning is enabled then the memory calculation above is modified to use the
56+ ` VM.memory_dynamic_max ` rather than the ` VM.memory_static_max ` .
4857
4958Memory required to migrate a VM
5059-------------------------------
5160
52- TBD
61+ If ballooning is disabled, the memory required to receive a migrating VM is the same
62+ as the VM overhead above.
63+
64+ If ballooning is enabled, then the VM will first be ballooned down to ` VM.memory_dynamic_min `
65+ and then it will be migrated across. If the VM fails to balloon all the way down, then
66+ correspondingly more memory will be required on the receiving side.
0 commit comments