Just purchased new 48GB server. The rest of the components are not important. Win 2008 R2 is the host, Hyper-V role only installed and host takes 3GB RAM when windows is booted. I am scared how that will look when I start adding virtual machines. Anybody knows why bare host without any virtual machines takes so much memory?
This sort of question has been floating around since the inception of Windows NT. I remember somebody saying "I have a brand new machine with 24MB of RAM in it and NT, idle is using 22MB. What could it possibly be doing?"
The answer is the same now as it was then, though the numbers are different. Windows will use available RAM to speed things up, leaving code images in memory and for file cache. If you actually put the machine to some sort of use, much of that RAM will be scavenged and used for other things.
Would you really want a system that didn't try to speed itself up by using otherwise unused RAM?
Go to "performance", open Resource Monitor, look at the different memory categories :
You will see :
- Working Set and Private : these two are the ones that counts
- Commit : this one is virtual (and often not really used)
Most of what you are seeing is cache or preallocation that will be moved out of the way for real work processes. Don't worry yet.
Have a look at this a for better understanding of the various counters ( a little bit old (2008) but still valid): http://blogs.technet.com/b/markrussinovich/archive/2008/11/17/3155406.aspx
Two things to note:
- Always reserve approximately 2GB of memory on a Hyper-V server for whatever the host OS might need to do. So only configure ~46GB of memory to VMs.
- Memory used by the host partition (the "physical" operating system installation) as VMs are added, except to accommodate the memory requirements of that VM. There is only a very small overhead per VM in terms of memory, so you will have no problem configuring VMs to use up to 46GB of memory, that memory pressure will drive the host partition to use less memory itself for cache.
As an example, I'm running Windows 7 on a machine with 16GB of memory, and my machine is currently using 5,635MB for cache. 5.5GB of cache on only a 16GB machine. But that's nothing to worry about, that's only because I have nearly 8GB of free memory, and Windows is using my free memory to speed up my system. If I started a bunch more programs and VMs, that memory used for cache would go to any program that needed it.