VMware Cloud Community
tmilner
Enthusiast
Enthusiast

Memory pressure?

At one of the VMworld presentations I heard a discussion regarding when the esx kernel decides to swap. The jist of the talk was that if you sum up virtual machine memory requirements and divide by available esx memory you end up with a value called "memory pressure". Any value less than 1means that there's plenty of memory available for VMs and life is good. Values greater than 1 means that something must be done to continue (swapping, balloon memory, shared memory,etc.)

I loved the talk... til I asked "where do I get this counter?" Silence. Anyone have any ideas?

Tom

Reply
0 Kudos
4 Replies
drummonds
Hot Shot
Hot Shot

Tom,

I'm pretty sure that such a counter doesn't exist. But it can be easily determined: just check the free memory on the host in either VirtualCenter or esxtop. Just as easily as saying "when the memory pressure approaches 1" one could say "when free memory approaches zero."

Details on memory stats on . You're specifically looking for the last entry ("free") on the PMEM row of the memory screen in esxtop or mem.heapfree.average in VirtualCenter.

Scott

More information on my blog and on Twitter: http://vpivot.com http://twitter.com/drummonds
Reply
0 Kudos
tmilner
Enthusiast
Enthusiast

Scott,

Good feedback, particularly the detail about the specific counter. Thanks.

My only issue (and its a small one at this point), is that the "free memory" counter only tells me if I have a memory issue, not how bad the issue is. Its only half the picture, like having a thermometer for your child that stops at 99 degress F. If your child's temperature measures 99 on that device do you panic or do you assume that its temporary? Knowing how much memory pressure the server is encountering would let us know how bad the "fever" is.

But that's for another day. Smiley Happy

Tom

Reply
0 Kudos
drummonds
Hot Shot
Hot Shot

I can give you some help there, too. The "how bad are things?" question can best be answered at by checking the swap rate. There's documentation on the esxtop and VirtualCenter counters that detail swap rates at . There's a good rule of thumb that if your host is swapping, your performance problems are serious.

Unfortunately, what we can't answer via counters is something that this idea of a "memory pressure" counter would fix. Knowing a ratio of needed v. present memory would tell us exactly how much memory needs to be added to the box to correct the problem. As this stand with swapping, the solution is to add a little more and check if swapping has been eliminated. If not, rinse and repeat.

Of course, you could determine exactly how much memory is needed by just adding up the amount of active memory for all VMs. But that's going to require some math on your part. Smiley Happy

More information on my blog and on Twitter: http://vpivot.com http://twitter.com/drummonds
Reply
0 Kudos
tmilner
Enthusiast
Enthusiast

Better and better.

So would you say that "needed" is the sum of all VM's (mem.active.average + mem.overhead.average),

and "present" is from the MOB HostSystem.summary.hardware.memorySize ?

Tom

Reply
0 Kudos