VMware Cloud Community
juchestyle
Commander
Commander
Jump to solution

Balloon driver healing memory leak applications

Hey guys,

Does the balloon driver fix or make better applications that have memory leak?

Put another way, if you have a physical that has an app that has memory leak, if you move the physical to vm, and install the tools, would the balloon driver keep that vm running longer than in a physical or would it heal it completely, or would the app have the same limitations it did in the physical?

Respectfully,

Matthew

Kaizen!
0 Kudos
1 Solution

Accepted Solutions
BUGCHK
Commander
Commander
Jump to solution

All the balloon driver does is force the guest OS to push memory from processes into pagefile(s). These physical memory pages can then be taken away from the VM and assigned to another one.

The idea is that the guest OS has a better idea which memory pages can be swapped out to disk than the VMkernel which does not know how a process in a VM looks like.

The leaked data still belongs to the process in the guest OS, but it is now stored on disk. If the applikation continues to leak, it will continue to allocate memory.

View solution in original post

0 Kudos
9 Replies
oreeh
Immortal
Immortal
Jump to solution

Hi,

I don't think that the balloon driver makes a difference in this case.

The reason: the balloon driver allocates memory from the guest and gives it to

the host, but this doesn't prevent the application with the memory leak from requesting memory further.

And if the ballooned memory is released back to the VM I don't see a reason how this could reallocate leaked memory to the VM.

BUGCHK
Commander
Commander
Jump to solution

All the balloon driver does is force the guest OS to push memory from processes into pagefile(s). These physical memory pages can then be taken away from the VM and assigned to another one.

The idea is that the guest OS has a better idea which memory pages can be swapped out to disk than the VMkernel which does not know how a process in a VM looks like.

The leaked data still belongs to the process in the guest OS, but it is now stored on disk. If the applikation continues to leak, it will continue to allocate memory.

0 Kudos
alhamad
Enthusiast
Enthusiast
Jump to solution

The baloon drive is not designed for this, it is to be used by the host to force guests to release memory when the it is running out of it.

0 Kudos
juchestyle
Commander
Commander
Jump to solution

Based on what the previous two responces say, it makes me think that inadvertantly, the balloon driver would help in the case of a memory leak.

Let's test this! Oliver, or anyone else, does anyone know of a program we could download that is designed to leak memory? If there is one we could test this!

Let me know.

Respectfully,

Matthew

Kaizen!
0 Kudos
oreeh
Immortal
Immortal
Jump to solution

I'm not aware of a program like this, but you only have to install the old (unpatched) VMware tools from ESX 3.0.1 in a Windows VM to get a memory leak.

0 Kudos
BUGCHK
Commander
Commander
Jump to solution

does anyone know of a program we could download that is designed to leak memory?

Try Firefox and keep a few tabs open... Smiley Wink

0 Kudos
grasshopper
Virtuoso
Virtuoso
Jump to solution

Upon launching the following link, iexplore.exe will start to leak memory:

Link to Start Memory Leak[/b] (Caution!):

http://www.quirksmode.org/js/memoryleaks/test1.html

Disclaimer:[/b]

\[Caution... Immediately upon clicking the above link, memory will begin to leak. This will require you to 'end task' on iexplore.exe. Only run this in a test environment]

Viewing Results:[/b]

To illustrate this best, open task manager and navigate to "View > Select Columns" and check "Handle Count". Next, you can click the column header on Task Manager to sort by "Mem Usage" or "handles". The java script located on the link above will begin to leak memory quickly and can be viewed in real time using Task Manager.

Script Contents:[/b]

Here's the contents of the script (not needed... just for informational purposes):

// Java Script to Create Memory LEAKS

// Obtained from http://www.quirksmode.org/blog/archives/2005/10/creating_memory.html

window.onload = init;

function init()

{

createLinks();

var x = document.getElementsByTagName('a');

for (var i=0;i<x.length;i+=2)

{

if (!x[i].nextSibling) continue;

x[i].relatedElement = x[i].nextSibling;

// node A refers to node B

x[i].nextSibling.relatedElement = x[i];

// node B refers to node A

}

}

oreeh
Immortal
Immortal
Jump to solution

Nice one - thanks Mike!

0 Kudos
juchestyle
Commander
Commander
Jump to solution

Allright, so here is what I am thinking.

On a phyiscal machine open this link and see how long it take to break.

V2P that phyiscal, install tools, open link and see how long it takes to break.

Respectfully,

Matthew

Kaizen!
0 Kudos