VMware Cloud Community
wiewior81
Contributor
Contributor

Swapping instead of ballooning??

Hello all,

I discovered a strange behaviour on one of my ESX4 servers - when I'm checking the memory performance graphs, there is some swap file usage indicated (around 392 MB), but the balloon usage is 0.

This particular host ESX1 has 8 GB of physical RAM, around 6114 MB is used.

Why there is swapping used instead of ballooning??? On the second host ESX2 (same physical memory size, usage around 5100 MB) I have 0 in both Swap and Balloon counters.

Kind regards and thanks for any hints,

Piotr

0 Kudos
9 Replies
depping
Leadership
Leadership

If you placed one of the two hosts in maintenance mode you must have had overcommitment for a period. During that period it most likely swapped to disk. These will not be reclaimed until the VM is powered off unfortunately.

Duncan

VMware Communities User Moderator | VCP | VCDX

-


Blogging:

Twitter:

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
wiewior81
Contributor
Contributor

Nope, the host was not put into MM since last power on... Actually, I don't understand one thing - you have one of the samples attached. Why the VM is using swapping, if there's plenty of memory available "inside" balloon driver...?

Piotr

0 Kudos
jfelinski
Enthusiast
Enthusiast

To identify the cuplrit go to performance stats and check out Stacked graph per VM for memory swap in/out. Maybe you're missing vmtools on one of the Vm's, or you have a memory limit below the allocated memory?

---

MCSA+S, VCP 3, VCP 4

--- MCSA+S, VCP 3, VCP 4, vExpert [url=http://wirtualizacja.wordpress.com]http://wirtualizacja.wordpress.com[/url]
0 Kudos
FredericPerrin
Enthusiast
Enthusiast

Why are you worrying about swapping ? Swapping is bad when the active applications are hitting the swap. If a background application was swaped out because it hasn't touched its memory in ages, there is nothing wrong about that. I for one would rather have my backgound, idle dæmons be swaped out than having them be killed because of the balloon driver. Of course, the correct solution is to get enough RAM to run everything in main memory.

Are your applications slow because they have to touch the swap? From the small screenshots you provided, it doesn't seem to be the case. Maybe there was a time during which memory was under pressure, ballooning couldn't free enough memory, so the host decided to swap out some idle memory. (Of course, when memory pressure is relaxed, the host is not going to swap back in the idle, untouched-in-ages memory it previously swapped out to disk.)

Also, note that ballooning is only available if your guests have the tools correctly installed. IIRC, for Linux guests this means the vmmemctl driver is loaded --check with lsmod|grep vm. I don't know for Windows guests.

0 Kudos
jfelinski
Enthusiast
Enthusiast

Honestly, I'll be worried about any swap activity as this can seriously affect performance. Why? Since in opposite to guest swapping, with kernel swapping there is no way for OS to decide what will be swapped and what should stay in the memory. You can easilly end up with critical memory areas beening swapped out to the disk (like services or even OS memory)

---

MCSA+S, VCP 3, VCP 4

--- MCSA+S, VCP 3, VCP 4, vExpert [url=http://wirtualizacja.wordpress.com]http://wirtualizacja.wordpress.com[/url]
0 Kudos
AWo
Immortal
Immortal

From my understanding that can apply if you are talking about a guest swapping out. But ESX should only swap if you have memory overcommitted and the ballon driver doesn't manage to satisfy the actual amount of memory requested.



AWo

\[:o]===\[o:]

=Would you like to have this posting as a ringtone on your cell phone?=

=Send "Posting" to 911 for only $999999,99!=

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
FredericPerrin
Enthusiast
Enthusiast

Maybe, but from what we can see this is not the case: the host needed to swap once because of some activity more important than usual, and now everything is back to normal, with oogles of memory which is not consumed. If amongst the swap, there were pages from important processes, then by the time we are speaking it would have already be swapped back in main memory. But, we see that there is about 2GB of free memory, so the swap is only holding "unimportant" memory.

--

Frédéric Perrin

Alcatel-Lucent

wiewior81
Contributor
Contributor

OK, so regarding to your answer I have nothing to worry about. Thanks!

Piotr

0 Kudos
jfelinski
Enthusiast
Enthusiast

I'll be worried if you have a constant swap activity and plenty of free memory. This will suggest VM misconfiguration and limits below the assigned memory - to be absolutelly safe, check the stacked graph per VM for swap activity as it is not true that only unimportant memory could be swapped.

---

MCSA+S, VCP 3, VCP 4

--- MCSA+S, VCP 3, VCP 4, vExpert [url=http://wirtualizacja.wordpress.com]http://wirtualizacja.wordpress.com[/url]
0 Kudos