One of my tasks today was a bit on the tough side. Following up on yesterday, I had to be able to calculate the amount of RAM required for each VM, whether it was assigned 1GB, 2GB or 4GB. Form this, based purely on RAM, I had to be able to calculate numbers of VM’s I could get on a host – CPU, storage and I/O are well in hand.
This proved tough. At this point, Hyper-V is still RC1 so there’s little information out there. The only result from a lot of searching was a MS page about how they virtualised 3 VM’s, each with 10GB RAM, on a 32GB host. They said they reserved 2GB RAM for the parent partition. Not very useful, to be honest.
I couldn’t find any more so I sent out some mails requesting some help. In the meantime I decided to do some observational testing. I ran VM’s on my test host and used PerfMon to measure "Hyper-V VM VID Partition – Overhead bytes"". The overhead was as follows (rounded up):
- 0.5GB: .0039% of assigned RAM
- 1GB: .0049% of assigned RAM
- 2GB: .0015% of assigned RAM
- 3GB: .0023% of assigned RAM
- 4GB: .0022% of assigned RAM
OK. I loaded my VM’s to 100% RAM utilisation and that overhead didn’t change. That gave me something to work with but I was wondering about that 2GB for the parent. Was that official? Did the overhead for the 3 * 10GB machines come from that? Maybe it did?
This evening I got some replies. Dave Northey sent me a link to a document (Performance Tuning Guidelines for Windows Server 2008) that didn’t turn up in my searches. It says:
"You should size VM memory as you typically do for server applications on a physical machine. You must size it to reasonably handle the expected load at ordinary and peak times because insufficient memory can significantly increase response times and CPU or I/O usage. In addition, the root partition must have sufficient memory (leave at least 512 MB available) to provide services such as I/O virtualization, snapshot, and management to support the child partitions.
A good standard for the memory overhead of each VM is 32 MB for the first 1 GB of virtual RAM plus another 8 MB for each additional GB of virtual RAM. This should be factored in the calculations of how many VMs to host on a physical server. The memory overhead varies depending on the actual load and amount of memory that is assigned to each VM".
So I read this two ways (assuming 2GB RAM per VM scenario):
- First machine charge = 32MB overhead + 8MB. Second machine charge = 16MB overhead.
- First machine charge = 32MB overhead + 8MB. Second machine charge = 32MB overhead + 8MB.
I’m assuming it’s the second scenario for now. I’ll chase this down next week.
I also got a response from John Howard. He said:
"Our general recommendations will be the same as for Windows Server 2008. … minimum and recommended RAM requirements which are 512MB minimum, 2GB recommended. This is for the parent partition. Our general requirements for just the Hypervisor being launched are a little under 300MB. Any driver stacks, management applications and virtual machine memory are on top of that. In the parent partition, we consume … RAM per virtual machine".
So being fairly conservative, it sounds like we allow 2GB for the parent, another 300MB for Hyper-V, a bit for the drivers of the parent (probably be safe within that 2GB) and then our overhead for RAM for each VM. That gives me something like this:
|
VM RAM (GB)
|
Overhead (MB)
|
Total MB Used
|
|
0.5
|
32
|
544
|
|
1
|
32
|
1056
|
|
2
|
40
|
2088
|
|
4
|
56
|
4152
|