Link to home
Start Free TrialLog in
Avatar of ITDharam
ITDharamFlag for United States of America

asked on

How to tune Memory allocation in an existing VMWare ESXi 5.1 environment

Firstly, everything is working pretty well.  I have 3 Dell R710 servers each with 128Gb of RAM.  All together, I have approximately 45 virtual machines.  Till now I've been pretty generous with the RAM allocations, but now were starting to hit the ceiling as far as RAM goes.

I'd like to analyze the actual needs of the virtual machines, and adjust RAM allocations accordingly.  I've read a bunch from VMWare, various blog posts, EE of course, and in the end I think I have a good approach, but I just want to vet it.

So I have IPMonitor setup to watch each of my VMs, it records the Physical Memory consumption every 5 minutes and I can create a report looking as far back as I want.

So for example if I have a Citrix Web Interface vm with 4Gb of RAM allocated, IP Monitor (And the OS) report over 80% free memory over the course of the previous month.  So it is only using 820Mb of RAM and I add the VMWare overhead which is reported at 46Mb, and add 30% for breathing room which comes to 1.1Gb of RAM, am I golden? (Based on some general recommendations that your 'average' memory consumption shouldn't exceed 70%)

Let me know if I'm going about this right.

Thanks a ton
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ITDharam

ASKER

So I don't have a way to capture 'Active Memory' usage over time within vSphere (They remove the 'Active' memory metric when you try and change the chart to anything other than real-time.  When set to 'Active' I can see that the average 'Active' metric is a whopping 60Mb with a max of 167Mb

Meanwhile I'll look at the articles provided
Try PowerCLI and the get-stat cmdlet, you will have to be creative I guess to get what you want.

Have a look at this, could be scheduled and you can collate figures over time.

http://www.virtu-al.net/2009/07/01/powercli-stats-one-liner/
Before I go down that route, is 'Active' really the attribute I want?  If it is report max <170Mb for a Windows web server, I'm guessing it isn't looking at the whole picture because I'm pretty sure that server wouldn't run if I allocated that little RAM to it.
depends what the server is actually doing, at startup Windows Test all Memory, and then drops off, to idle!
Let's take one of my Xenapp Application servers.  I've allocated 16Gb of RAM, at load there may be 40 active users, at this very moment there are 5 active users.  vSphere is reporting 655Mb of 'Active RAM', and it is showing 1.5Gb as the MAX.  Now, what are the chances that this Citrix server would run with 2Gb of RAM allocated?  I checked a Domino server with 20 active users, and it had a similar 1.5Gb MAX RAM usage.

So this has me pretty well confused, and I've read a lot of documentation on this.  I would think this would be fairly straight forward even with the vSphere overhead and sharing that are possible.  I'd also expect that watching a system that is already deployed would readily reveal whether RAM should be (de) allocated.

What am I missing here?
Active is a current figure, you would need to look at the averages and max and mins, to confirm real values. Not just at a point in time.

Do Memory Summary figures match your Memory figures in the OS, as a guide?
OK, I left the vSphere performance tab open on my Citrix app server and over 2 days it is now averaging 4Gb, and maxed at 7Gb which seems a lot more realistic.

Unfortunately I don't have IPMonitor setup to watch this particular VM.

Can you recommend a product that will monitor these metrics from vSphere over time and allow me to generate historical reports?  IPMonitor is really nice like that, but as far as I know it won't collect data on these vmware specific metrics.  I'll contact Solarwinds and verify.

Thanks for the help, this is becoming clearer.
All the information and performance is collected in the vCenter Server database.

If you want a different method of presenting this information

Veeam One
http://www.veeam.com/virtualization-management-one-solution.html

vCenter Operations Manager
http://www.vmware.com/products/vcenter-operations-management/

Both are good applications which can report on performance and metrics, we prefer vCenter Operations Manager.
Great, thank you hancocka.

I just realized that while memory 'Active' isn't available in the basic performance charge when selecting a period of time, memory 'usage' is which is good enough for me.  Slightly unfortunate that memory 'usage' only reports as a percentage instead of a KB value, but this gives me something to work with.

Thank you for your assistance.