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, 2015 at 14:58
  • For instance.. what do you plan to do about it if you detect ballooning?
    – ewwhite
    Jan 16, 2015 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, 2015 at 0:20

3 Answers 3

12

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
  • 7
    No, because it's a Linux VM! Jan 16, 2015 at 18:57
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

3
  • I will tell the meatbot operating the machine to go and ask nicely the host's admin :-)
    – JohnEye
    Jan 20, 2015 at 13:08
  • I added a answer to that link: echo 1 > /proc/sys/vm/drop_caches Oct 6, 2016 at 20:58
  • @ewwhite: This assumes that one has access to the host/cluster/vCenter level which most people do not. Jun 26, 2022 at 15:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .