VMware Cloud Community
rupeshdnair
Enthusiast
Enthusiast
Jump to solution

Memory reclamation

Hello All,

I noticed something on the memory usage behavior on esxi 5.0 and wanted to check if this is expected behavior and if so, why do you think it happens

We are running a load test on some guest VMs and vCenter performance chart shows (real time) shows the right usage. However after the load test is done, according the real time performance chart, the memory utilization does not come down immediately. It takes around 15 minutes for the memory usage to come down, as per the real time performance chart. However when we check inside the guest OS, it has released all the memory and is not showing any usage.

Is this behavior normal? Why does the real time performance chart show this 15 minute delay for the memory usage?

Note: The CPU usage does not behave this way though. CPU usage comes down immediately after the load test as per the performance chart.

0 Kudos
1 Solution

Accepted Solutions
MKguy
Virtuoso
Virtuoso
Jump to solution

Which of the many memory related metrics exactly are you watching? I suppose it's memory active?

It's normal to see delays here, since "active memory" is based on statistical sampling of how long memory pages have not been touched by the guest OS. For pages to be considered "inactive" again, they must not have been touched by the guest for a certain amount of time, so you see a gradual decrease in the performance charts.

CPU usage metrics on the other hand are much more dynamic and can more reliably be measured, which is why you see immediate effects on these counters.

-- http://alpacapowered.wordpress.com

View solution in original post

0 Kudos
4 Replies
MKguy
Virtuoso
Virtuoso
Jump to solution

Which of the many memory related metrics exactly are you watching? I suppose it's memory active?

It's normal to see delays here, since "active memory" is based on statistical sampling of how long memory pages have not been touched by the guest OS. For pages to be considered "inactive" again, they must not have been touched by the guest for a certain amount of time, so you see a gradual decrease in the performance charts.

CPU usage metrics on the other hand are much more dynamic and can more reliably be measured, which is why you see immediate effects on these counters.

-- http://alpacapowered.wordpress.com
0 Kudos
rupeshdnair
Enthusiast
Enthusiast
Jump to solution

Yes, I am referring to Memory Active. See screenshot below. So the real time memory (active) usage metric is not actually real time and is statistical sampling? It would make sense if that is the case. What would be a more accurate metric to look at to see if the memory is actually freed up?

graph.png

0 Kudos
MKguy
Virtuoso
Virtuoso
Jump to solution

Yes, I am referring to Memory Active. See screenshot below. So the real time memory (active) usage metric is not actually real time and is statistical sampling? It would make sense if that is the case. What would be a more accurate metric to look at to see if the memory is actually freed up?

It is real time data in the sense of how active memory is detected by an ESXi host. The host does not have any insight in whats actually going on inside the guest, so it's natural that it has to rely on sampling from the outside to see how recently pages have been touched.

What would your definition of active memory be and how is the hypervisor supposed to detect it? It's unfortunately not as easy with memory metrics as it is with dynamically consumed CPU cycles.

I'm not aware of any other metric, but to be honest I don't see the point with just a few minutes delay in the first place.

Also be aware that active memory does not indicate memory reclamation or freeing up memory on the host. Even if memory is inactive, it's still allocated to the guest (unless reservations/reclamation techniques have kicked in) and counts as "consumed memory" (= amount that is backed by physical memory of the host).

-- http://alpacapowered.wordpress.com
rupeshdnair
Enthusiast
Enthusiast
Jump to solution

Accepted, Boss! You are getting the "Correct Answer"

0 Kudos