rajujith commented on issue #7430:
URL: https://github.com/apache/cloudstack/issues/7430#issuecomment-1592661910
Testing results :
Offering 512MB, with mem overcommit :1
[root@ref-trl-4866-k-m7-jithin-raju-kvm2 ~]# virsh dumpxml i-2-3-VM
setlocale: No such file or directory
<domain type='kvm' id='3'>
<name>i-2-3-VM</name>
<uuid>32885d38-c0f9-4878-a722-2a32061ab943</uuid>
<description>CentOS 5.5 (64-bit)</description>
<memory unit='KiB'>**524288**</memory>
<currentMemory unit='KiB'>**524288**</currentMemory>
[root@vm1 ~]# grep MemTotal /proc/meminfo
MemTotal: **510584** kB
After changing memory overcommit to **2** on cluster:
<domain type='kvm' id='4'>
<name>i-2-3-VM</name>
<uuid>32885d38-c0f9-4878-a722-2a32061ab943</uuid>
<description>CentOS 5.5 (64-bit)</description>
<memory unit='KiB'>**262144**</memory>
<currentMemory unit='KiB'>**262144**</currentMemory>
[root@vm1 ~]# grep MemTotal /proc/meminfo
MemTotal: **252416** kB
Ballooning config:
<memballoon model='virtio'>
<alias name='**balloon0**'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x0'/>
</memballoon>
Same is applicable for VRs,systemVMs
[root@ref-trl-4866-k-m7-jithin-raju-kvm2 ~]# virsh dominfo 7
setlocale: No such file or directory
Id: 7
Name: s-1-VM
UUID: 49d1f0c2-6890-4bbb-a281-45e01850db25
OS Type: hvm
State: running
CPU(s): 1
CPU time: 25.3s
**Max memory: 262144 KiB
Used memory: 262144 KiB**
Persistent: no
Autostart: disable
Managed save: no
Security model: none
Security DOI: 0
With memory overprovisioning set to 1 with the default offering of VR
[root@ref-trl-4866-k-m7-jithin-raju-kvm1 ~]# virsh dominfo r-4-VM
setlocale: No such file or directory
Id: 1
Name: r-4-VM
UUID: 73787768-76bf-4b4e-a381-f0ed6b6bedf9
OS Type: hvm
State: running
CPU(s): 1
CPU time: 343.6s
**Max memory: 262144 KiB
Used memory: 262144 KiB**
Persistent: no
Autostart: disable
Managed save: no
Security model: none
Security DOI: 0
After changing the memory over provisioning to 2
[root@ref-trl-4866-k-m7-jithin-raju-kvm1 ~]# virsh dominfo r-4-VM
setlocale: No such file or directory
Id: 5
Name: r-4-VM
UUID: 73787768-76bf-4b4e-a381-f0ed6b6bedf9
OS Type: hvm
State: running
CPU(s): 1
CPU time: 136.0s
**Max memory: 131072 KiB
Used memory: 131072 KiB**
Persistent: no
Autostart: disable
Managed save: no
Security model: none
Security DOI: 0
With the above Memory the VR can't start:

If we use **automatic=true** in the ballooning configuration without
reducing the max memory this should work as expected. i.e set Max memory to
offering value, current memory to offering value/ memory overcommit. This
should guarantee minimum Memory and the VM can use the Maximum memory if
available and the Maximum memory will be accessible to the guest.
[1] https://www.linux-kvm.org/page/Projects/auto-ballooning
[2]
https://www.humblec.com/memory-ballooning-and-virtio_balloon-driver-in-qemu-kvm/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]