Solved

memory allocation with ESXI

Posted on 2010-11-14
14
1,000 Views
Last Modified: 2012-05-10
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.  
0
Comment
Question by:bhgewilson
14 Comments
 
LVL 10

Expert Comment

by:George Khairallah
Comment Utility
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.
0
 

Author Comment

by:bhgewilson
Comment Utility
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.

0
 
LVL 16

Expert Comment

by:danm66
Comment Utility
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.
0
 
LVL 11

Expert Comment

by:louisreeves
Comment Utility
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!!
0
 
LVL 5

Expert Comment

by:Marinertek
Comment Utility
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.
0
 
LVL 16

Accepted Solution

by:
danm66 earned 500 total points
Comment Utility
The above method is likely to cause performance issues with Windows VM's.  When you set a memory limit lower than the amount of assigned RAM to a Windows VM, at boot-up windows tries to go out and touch each page of RAM and when it get's to the limit, windows has to time out on each memory access request.  This causes long delays during the boot process and will continue to affect performance during runtime.

To amplify or restate what was said in previous posts...

If you allocate 8GB of memory to a VM and it doesn't use it, other VM's will get to use the memory that isn't being used.  If the VM does need the memory and the host isn't actively using all of it's available RAM in other VM's then it will get it.  If all RAM is commited, then it will start paging memory to disk and vm's getting disk-paged memory will suffer a performance penalty as they will have to wait longer than normal for memory requests.  There are some other technologies, depending upon your ESX version and some other conditions, that will come into play before memory gets paged to disk, but that's the simple version.

There are other ways to control memory that ESX/vCenter offer such as resource shares and DRS to automatically manage resource contention, but for a one host installation I would recommend you keep it simple and monitor your resource usage and adjust your VM's as necessary to meet your needs.
0
 

Author Comment

by:bhgewilson
Comment Utility
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.  
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 16

Expert Comment

by:danm66
Comment Utility
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.
0
 

Author Comment

by:bhgewilson
Comment Utility
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.  
0
 
LVL 16

Expert Comment

by:danm66
Comment Utility
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???
0
 

Author Comment

by:bhgewilson
Comment Utility
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.
0
 
LVL 16

Expert Comment

by:danm66
Comment Utility
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.
0
 

Author Comment

by:bhgewilson
Comment Utility
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
0
 
LVL 16

Expert Comment

by:danm66
Comment Utility
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.

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
Last article we focus in how to VMware: How to create and use VMs TAGs – Part 1 so before follow this article and perform the next tasks, you should read the first article how to create the TAG before using them in Veeam Backup Jobs.
This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…
This video shows you how easy it is to boot from ISO images for virtual machines with the ISO images stored on a local datastore on the ESXi host.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now