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.

JohnEye
  • 389
  • 1
  • 4
  • 12
  • 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: http://superuser.com/questions/704675/vmware-ballooning-state-from-inside-guest – kasperd Jan 18 '15 at 00:20

3 Answers3

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)

Sebas
  • 535
  • 1
  • 7
  • 18
VFrontDe
  • 1,478
  • 8
  • 11
0

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

Chopper3
  • 100,240
  • 9
  • 106
  • 238
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

ewwhite
  • 194,921
  • 91
  • 434
  • 799