Link to home
Start Free TrialLog in
Avatar of bhgewilson
bhgewilsonFlag for United States of America

asked on

memory allocation with ESXI

I have a Dell PE server w/ 24GB ram.  I have 4 virtual machines with ESXI.  I want one of these to have 8GB of ram.  I thought I set this up when I built the machine but Windows 2008 R2 only shows 4.0 GB.  should I leave this allocated by ESXI or push it to 8.0 GB.  I guess I need best case scenario for RAM for use in ESXI.  

Any suggestions.  
Avatar of George Khairallah
George Khairallah
Flag of United States of America image

That really depends on your need. I'm not sure why your VM showed up 4Gb when you allocated it. if you did mean Windows 2008 R2, then it is 64 Bit anyway, and will definitely support 8Gb. You can try to re-allocate the RAM to go to 8Gb.

ESXi will take your vm guest memory, merely as a "suggestion". If you don't have resource pool allocations. VMWare will feel free to use memory sharing, and memory ballooning to take care of your VM's memory need.
Memory sharing is usually what you'd want. Memory ballooning, not so much, it will keep things running, but will run at a slightly degraded performance, as RAM is being grabbed from resources that don't exist (other VMs, or page files, etc ...)

So, to answer your question, I would say go with 4Gb for now, and see how the performance is. Considering how easy it is to increase RAM if needed, you can always reconsider later after looking at your performance charts.
Avatar of bhgewilson

ASKER

So in reading this I am trying to follow best practice.  Should I stop my vm and move my ram to 8.0 GB or let ESXI manage it.

If you edit the settings on your VM and it says 4GB, then you will need to shut it down and change it to 8.

ESXi will manage the memory of all VM's in the way that they share the pool of memory that is on the host, but you still need to configure how much memory the VM sees and can attempt to use.
It think your question revolves around VMPerformance. Truly, will your machine require 8GB of ram all the time? I think not. Your positioned to capitalized on the steregnth of ESX. Just install VMWARE tools and set the VM to use the VMWARE ballon driver. As much as 65% of the 8GB can be dynamically removed, to be used for other machines, while at the same time, allowing the VM to think it has 8GB. You have to look into the subject a litte deeper to find the situation which works best for you. For more information, you might look at http://communities.vmware.com/blogs/drummonds/2009/09/09/love-your-balloon-driver

The fact of the matter is resource management is what ESX was made to do. Using Memory Reservations, swap files, Resource Groups, DRS, HA, and FT, you can make a PE with 24 BG of RAM work very well indeed. http://www.vmware.com/pdf/vsphere4/r40/vsp_40_resource_mgmt.pdf

I hope this helps,

Cheers!!
You can use memory reservations and limits to control the amount of physical memory allocated to the machine. For example:

1. You install a machine with 8 GB of RAM
2. You set a memory reservation on the VM to 1 GB
3. You set a memory limit on the VM to 4 GB

Now the OS will think it has 8 GB, ESX will always give it 1 GB of physical RAM guaranteed and it may get up to 4 GB of physical RAM if it requires it. The other 4 GB it thinks it has will come from VMkernal swap space (disk). In truth the VM will rarely need the full 8 GB of RAM, but when it does the OS will get it as a combo of physical ram and swap memory. The nice thing about this method is you can "hot add" memory by increasing the limit without having to power down the VM. If you were to configure the VM with 4 GB of RAM only and then want to add 4 more, you'd have to restart the machine. Using reservations and limits you can control that without downtime.

Put this together with share values - e.g. setting it so that the VM gets proportional weight of other available memory if there is contention - and you have a complete management of your memory allocation.

You can change the reservations and limits on the "Edit Settings" menu on any VM under the Resource tab.
ASKER CERTIFIED SOLUTION
Avatar of Danny McDaniel
Danny McDaniel
Flag of United States of America 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
Right now I have not messed with RAM at all.  My shares tab says normal.  My reservation is pulled all the way to zero and my limit is unlimited.  This is a machine that if I was building with RAM I would add 12GB to so do I need to make some changes or just leave it.  
I would leave things the way they are until I have a reason to change them.  When you look at the summary tab of the VM, you can see how memory is consumed and how much is active.  It's normal for your active to be alot less than consumed and as long as your active memory stays well under what you've assigned it...then you aren't running out of RAM within the VM.
Great thanks,

One of the reasons I am asking is one of the VM's is Exchange 2010 and may add another which would put me at 4 with a dual processor system w/ 24 GB ram.  Might be to much.  
if you reply with number of exchange users and # of cores per processor, perhaps someone else with Exchange experience can weigh in with what they've seen???
I was wrong.  I have one processor with 4 cores.  I would think that at least moving the reservation to 8.0 GB would be best.  I guess I am to naive that I think the machine needs it.  It sounds like ESXI pulls it when it needs but how does the OS know this.
The OS just thinks the system has 8GB of RAM.  When it needs more, it goes out to access and ESXi sees that and provides it.  If it has to open disk pages, then it takes longer to give the memory to the VM.  If the VM tries to use more than 8GB, then it starts paging to disk inside of the VM.

Nothing has really changed as far as the VM's OS is concerned, it just keeps doing what it's doing and ESXi takes the calls to hardware and answers them as needed.
Everyone thanks for the comments.  Right now my VM is not running to well due to RAM.  It seems like my page file is constantly pegging out.  I have enough ram free that I would like to set aside 12GB for the Exchange store.  If not at least 8 GB.  I stopped the VM.  I went into the VM and tried to up the reserve to 8gb and it would not go past 4.  Am I missing something or have I screwed up somewhere.  

Thanks,

Brad
After you rt-click and hit edit settings, the first tab (hardware) should allow you to configure how much total RAM the VM will see and, according to your desires, this should be 12 GB.  On the resources tab, you can set a reservation for any amount between 0 and the total RAM set on the first tab.