7

Is it possible to detect from within a Linux VM that memory is being reclaimed by the memory balloon? I don't think any information about the host is propagated to the VM, so connecting to the host and asking is not an option. I would prefer not to rely on heuristic approach either.

Edit: The reason why I want to know about it from the VM is to raise an alert to the VM's admin, who may not have access to the host, but should nevertheless know about the potential performance degradation.

3
  • What's the situation? Can you add any more detail to the problem description?
    – ewwhite
    Jan 16 '15 at 14:58
  • For instance.. what do you plan to do about it if you detect ballooning?
    – ewwhite
    Jan 16 '15 at 15:16
  • 2
    Ballooning requires cooperation between guest and host. If the guest OS doesn't have a ballooning driver, then the host cannot take memory from the guest. The ballooning driver inside the guest OS will always know how much memory has been handed back to the host. So it is definitely possible to tell, the question is how. Perhaps this question will help: superuser.com/questions/704675/…
    – kasperd
    Jan 18 '15 at 0:20
11

If you have VMware Tools installed inside the VM then you can find this out with

vmware-toolbox-cmd stat balloon

More info here

(And, well, you must have VMware Tools installed, otherwise ballooning won't work)

0

Can't you just see how much vmmemsty.sys is using?

1
0

I'm not sure if it matters if a specific VM is ballooning if you're not willing to view it from the host/cluster/vCenter level. Otherwise, how would you "unballoon" the memory?

See: "Unballooning" RAM that's been ballooned by VMware

2
  • I will tell the meatbot operating the machine to go and ask nicely the host's admin :-)
    – JohnEye
    Jan 20 '15 at 13:08
  • I added a answer to that link: echo 1 > /proc/sys/vm/drop_caches Oct 6 '16 at 20:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.