This continues to be an issue on 4.11. Trying to figure out how
to calculate the VM size that will be supported on a host.
local dom0_free_mb=$(xl info | egrep "free_memory" | awk '{print
$3}')
# start vm
local dom0_free_after_start_mb="$(xl info | egrep "free_memory"
| awk '{print $3}')"
local domU_mem_after_start_mb=$(sed '/^ *memory *=
*[0-9]*/!d;s/^ *memory *= *//g' paramsfile)
mkdir -p /tmp
echo "dom0 mem pre change: ${dom0_free_mb:-0}MB; dom0 free mem
post change: ${dom0_free_after_start_mb:-0}; domU memory:
${domU_mem_after_start_mb}; discrepancy: $((${dom0_free_mb:-0} -
${dom0_free_after_start_mb:-0} - ${domU_mem_after_start_mb:-0}))"
| tee -a /tmp/memdiscrepancy.log
dom0
mem pre change: 125264MB; dom0 free mem post change: 283; domU
memory: 124000; discrepancy: 981
#
xl info | grep xen_version
xen_version : 4.11.0
Regards, Peter
On 11/01/18 1:16 PM, Peter wrote:
Hi.
Just started using Xen 4.10 with PVH (was using 4.9 with PV).
I start up a Linux domU VM with a params file listing memory = $mb
Not using ballooning.
The amount of free memory reported by xl free after the change is
less than the memory reported by xl free before the change minus
the amount in the memory params setting.
i.e. each VM reduces xl info reported free memory by more than the
amount listed in the params file.
Moreover the amount of extra memory is not constant per VM, but
rather it varies. And I am unclear what the variance is due to.
I would like to be able to calculate from the domU configs how
much memory is going to be used on the dom0. Else we can end up
with some hosts trying to allocate more memory than they have.
Is this a bug? Is there a way to calculate/estimate what that
discrepancy should be?
Sample discrepancies:
dom0 mem pre domu start: 86597MB; dom0 free mem post domu start:
80926; domU memory: 5625; discrepancy: 46
dom0 mem pre domu start: 80926MB; dom0 free mem post domu start:
74600; domU memory: 6272; discrepancy: 54
dom0 mem pre domu start: 74600MB; dom0 free mem post domu start:
66533; domU memory: 8000; discrepancy: 67
dom0 mem pre domu start: 66533MB; dom0 free mem post domu start:
58466; domU memory: 8000; discrepancy: 67
dom0 mem pre domu start: 58466MB; dom0 free mem post domu start:
50370; domU memory: 8031; discrepancy: 65
dom0 mem pre domu start: 50370MB; dom0 free mem post domu start:
36081; domU memory: 14176; discrepancy: 113
dom0 mem pre domu start: 36081MB; dom0 free mem post domu start:
20249; domU memory: 15706; discrepancy: 126
Different host showing total differences:
# xl info | egrep 'total_memory|free_memory'a
total_memory : 49143
free_memory : 28835
Difference is 20308
# xl list | awk '{print $2 " " $3}'
ID Mem
0 2048
1 1899
2 3464
3 4095
4 8115
Total is 19621
# xl list --long | grep shadow
"shadow_memkb": 15200,
"shadow_memkb": 29768,
"shadow_memkb": 36864,
"shadow_memkb": 66976,
Total is 145MB
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-users