VMware Cloud Community
alanii
Contributor
Contributor

About Ballooning and Swapping

Is it correct??

0 Kudos
3 Replies
alanii
Contributor
Contributor

Limit = unlimit

0 Kudos
AWo
Immortal
Immortal

Welcome to the forums!

I looked at your drawing but I have problems understanding it....

However, I can explain balloning to you and you may check if your drawing shows that. Regarding swapping you must state if you talk about guest or host swapping.

Balloning occurs when a guest requires more memory which is not free, yet. It is physically available but another guest has occupied it.

I'll try to keep it easy: let's assume you have 1 GB physcal RAM available and nevertheless you assign 1 GB to each of two guests (= 2 GB assigned).

As long as both guests don't require more memory in total than what is physically available everything is fine. If one guest starts to request more memory VMware can grab that memory from the other guest. To achieve this the ballon driver starts to inflate in that guest. That forces this guest to swap out to disk (its own virtual disk using the native swap mechanism of the guest OS). The memory which became free by swapping to disk is then taken away from that guest and given the other one. Of course that comes to an end at some point. At least if both guests use 512 MB actively and one starts to require more. Now the host can'ttake away memory from one guest and it has to swap out and simulate more physical RAM than it has available. This can be used to satisfy the guests need for more memory.

But balloning should not occur if you have enough physical RAM and that also applies to host swapping. That latter should be avoided as this makes the system slow. This mechanism ist not a feature you want to use. It is a last resort to keep things running if you were forced and threatended to death to overcommit guest memory.


AWo

VCP 3 & 4

\[: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
alanii
Contributor
Contributor

Thank you for your reply

i attached a Offical picture about ballooning VS Swapping

i read this P.31-32

http://www.vmware.com/pdf/vsphere4/r40/vsp_40_resource_mgmt.pdf

.....

"NOTE For optimum performance, ESX/ESXi hosts use the ballooning approach (implemented by the vmmemctl

driver) whenever possible. Swapping is a reliable mechanism of last resort that a host uses only when necessary

to reclaim memory."

....

i know why ballooning happen, i want to confirm that

In the mechanism, Ballooning is a first approach

(also a common skill in memory overcommitment, such as 16G ESX running 32G assigned VMs)

to transfer Physical to other VM, by default Ballooning can only get 65% of "Limit" , if system still need more physical memory, Swapping will run

Swapping is last resort that it degrade performance

1. Is ballooning first force Guest OS page out first (you have answerd)

2. if Swapping occur, is it swap out from Assigned value to Limit value ?

if this answer is "yes" then is it only one VM need swapping???

because the total swap out size + all VM OS page out size + reservation must less than or equal to Full size of ESX memory pool

0 Kudos