jadams159
Contributor
Contributor

Question about Host Memory usage and VM memory limit.

Jump to solution

Alright, so I have vCenter OPs running in my environment.  My host started getting a little low on available memory and the OPs server was the biggest hog, so I figured I might try to corral it a bit.  Here's some supporting info and what I thought would help.

ESX host highlighted, looking at the vc ops server:

Host Mem - MB:  7364

Guest Mem - %:  3

With the VM highlighted:

Consumed Host Memory:7378 MB

Active Guest Memory:  573 MB

So I understand these figures as such:  The host memory is how much physical memory has been allocated to the vm, and the guest memory is how much of allocated memory is actually active in the Guest OS being used by processes.  Please correct me if I'm wrong.

My solution was to set a memory limit on this VM to 4GB, thus freeing up about 3GB of host memory, however after making the change, the consumed host memory has not gone down.

What am I missing?  Thanks in advance for the help.

0 Kudos
1 Solution

Accepted Solutions
bilalhashmi
Expert
Expert

I understand that. Can you power this guy off and power it back on?

Follow me @ Cloud-Buddy.com

Blog: www.Cloud-Buddy.com | Follow me @hashmibilal

View solution in original post

0 Kudos
9 Replies
bilalhashmi
Expert
Expert

You are right about the memory metrics.. click below for more insight on that...

http://www.yellow-bricks.com/2011/04/29/which-metric-to-use-for-monitoring-memory/

Keep in mind, the memory wont go away instantly, but it will... you can try reseting your VM, if its not production of course.. so see the host consumed going down..

Follow me @ Cloud-Buddy.com

Blog: www.Cloud-Buddy.com | Follow me @hashmibilal
0 Kudos
jadams159
Contributor
Contributor

I have already rebooted the vc ops server, the consumed host memory still hasn't changed.

0 Kudos
bilalhashmi
Expert
Expert

ok.. did you try resting the VM? I mean powering it off and then powering it back on?

Follow me @ Cloud-Buddy.com

Blog: www.Cloud-Buddy.com | Follow me @hashmibilal
0 Kudos
jadams159
Contributor
Contributor

The vc ops server IS the VM I set the limit on.

0 Kudos
bilalhashmi
Expert
Expert

I understand that. Can you power this guy off and power it back on?

Follow me @ Cloud-Buddy.com

Blog: www.Cloud-Buddy.com | Follow me @hashmibilal

View solution in original post

0 Kudos
jadams159
Contributor
Contributor

Alright, so powering the VM off and then powering it back on about 30 seconds later appears to have enforced the setting.  Thanks for that, I'll award points here in a sec, but I have a new question now.

Normally I don't set limits or reservations as I don't run into much contention, but this is coming down the road.  Is this going to be a requirement for setting limits?  (or reservations for that matter?)  Should I have to shut down the VM for a limit/reservation to take effect?

Also, when the VM started back up, I did not see any swap going on in the performance tab of the VM despite the fact that the active guest memory was higher than the set limit.  Is this because there was no cont3ention for memory resources?  I seem to remember reading somewhere that limits don't take effect unless there is contention...

0 Kudos
bilalhashmi
Expert
Expert

To answer your question, I have always understood best practice is to power off the VMs when setting limits/reservation.. plus, its always best to set limits/reservation on RP vs individual VMs.. its just more managable.. Making use of shares seems to make more sense to be though..

Keep in mind the limit is the hard limit.. when u set the limit.. it doesn;t matter what else is on the host.. the VM will not have anything ot do with what else is out there cuz its now limited to whatever u have decided.. Not sure why u didnt see the swapping.. Before swapping even begins.. balloning, compression, TPS are engaged... keep in mind though ur active mem for the VM may have been higher.. bust some of it could have been part of what was in TPS.. Also, ESXTOP/RESXTOP is really the best place for u to look at these stats... vCenter has a small lag, I think its 20 secs or so.. good luck..

Follow me @ Cloud-Buddy.com

Blog: www.Cloud-Buddy.com | Follow me @hashmibilal
jadams159
Contributor
Contributor

Perhaps it was share values that don't come into play until contention occurs.

0 Kudos
bilalhashmi
Expert
Expert

Yes, that correct.. shares come into play when contention happens...

Follow me @ Cloud-Buddy.com

Blog: www.Cloud-Buddy.com | Follow me @hashmibilal
0 Kudos