Memory Ballooning not working

Pablohn

New Member
Aug 19, 2016
6
1
3
36
Hi all.

I am having problems with memory because internally I see it just has 4GB total and few memory available http://pix.toile-libre.org/upload/original/1471626760.png while it is configured to
"Automatically allocate memory within 1 and 6 GB" .

My question is: how it is supposed memory ballooning works? Why the vm does not get 6GB RAM ?

Cheers,

Pablo Hinojosa
 

Attachments

  • Selection_015.png
    Selection_015.png
    27.4 KB · Views: 64
No, I did not have it installed.
My Proxmox uname -a is
Linux proxmox 4.4.6-1-pve #1 SMP Thu Apr 21 11:25:40 CEST 2016 x86_64 GNU/Linux

pveversion --verbose
proxmox-ve: 4.2-48 (running kernel: 4.4.6-1-pve)

I have installed it on a test guest (qemu-guest-agent 1:2.1+dfsg-12+deb8u6) with next uname -a
Linux runner1 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 GNU/Linux

When I run next command with values above 1.2, whole ram is filled and swap is partially filled, but RAM size does not grow from 1GB to 3GB (as I have configured). Qemu-agent is enabled.
 

Attachments

  • Selection_559.png
    Selection_559.png
    20.6 KB · Views: 30
memory balloning reduce vm memory if host is near around memory saturated, until host memory reach 80% I think.

qemu guest agent is not related in balloning process.


what is the output of "free -m" on the host ?
 
Free -m at hypervisor

root@proxmox:~# free -m
total used free shared buffers cached
Mem: 15959 13760 2198 59 370 2106
-/+ buffers/cache: 11284 4675
Swap: 4095 206 3889



free -m at guest
root@runner1:~# free -m
total used free shared buffers cached
Mem: 1000 405 594 0 110 175
-/+ buffers/cache: 119 880
Swap: 1375 18 1357


free -m at guest during memory load

total used free shared buffers cached
Mem: 1000 934 65 0 0 14
-/+ buffers/cache: 919 80
Swap: 1375 687 688
 
Free -m at hypervisor

root@proxmox:~# free -m
total used free shared buffers cached
Mem: 15959 13760 2198 59 370 2106
-/+ buffers/cache: 11284 4675
Swap: 4095 206 3889



free -m at guest
root@runner1:~# free -m
total used free shared buffers cached
Mem: 1000 405 594 0 110 175
-/+ buffers/cache: 119 880
Swap: 1375 18 1357


free -m at guest during memory load

total used free shared buffers cached
Mem: 1000 934 65 0 0 14
-/+ buffers/cache: 919 80
Swap: 1375 687 688

so, you have on host 4676mb free / 14959mb, it's 70%, need to 80%.

if you see 1000MB in your vm, that's mean that you don't have already enough memory, and balloon have reduce the vm memory to avoid host saturation.
I you have enouh host memory, you should see all the ram in your vm.

(The usage of balloon don't increase memory in vm if a script or software need memory in the vm, it's decrease memory when host is near saturation)

If you want to force balloon, you can set shares=0, this will force min memory value.
 
  • Like
Reactions: chipbreak
Ok, I understand it.

I will test it again when I have enough RAM resources.

Thanks for your help :)