2

I am building an home server on a old PC (Core 2 Duo E6600 as processor, 4GB RAM, two hard disk, one for each VM), and I am having difficulties with one of my VM. I currently have two VMs on it, one running Untangle OS, and the other running Windows Server 2008 R2. The Untangle VM runs perfectly, but the Server 2008 is very slow, with barely anything installed except the OS (I think I only installed an antivirus, which only scans on demand).

Even though the PC is old, I am pretty sure it should run Server 2008 pretty well, although you may correct me if I am wrong. I have read about the processor and found that it actually had 2 physical processor and 2 logical in each physical (not sure what exactly is the difference). This said, I thought it actually had four processors to allocate to my VMs. I then assigned 1 processor and 1 GB RAM to the Untangle VM, and three processors and 3GB RAM to the Server 2008. The Windows Server was practically unusable. Then I learned from a co-worker that process could actually freeze when assigned to two different physical processor as data would have trouble crossing the path through each physical socket (not sure if it's right). He suggested that I put only 2 processors on that VM, so that the all the data would be processed on the same physical processor. This seemed to fix the issue for bit, but I am still experiencing some time fragment where the VM runs very slow. It comes by waves. I may run a virus scan and it goes very fast for the first 30 mins, but then slow down by a lot, and when it finishes, I barely can even open windows explorer.

I also reserved 4800 MHz for the VM with Server 2008 (not sure if it actually means two full processor, as they run at 2.4GHz each), but I am not too familiar with this notion of resource reservation.

I am wondering if the VM resources are distributed correctly (which I think they are not, but that's only a feeling), or if it's just that it's an old PC and will have trouble running Windows Server 2008.

Please forgive me if I am using wrong terms or mixing notions, as I am new to this world of virtualization.

Thanks for the help,

Louis

louis
  • 25

1 Answers1

0

Little too long for a comment, So I'm adding it as an answer.

Your CPU is a dual core CPU with a clock rate of 2.4GHz or 2400MHz per core. [1] That equates to 4800Mhz of total processing at any given time. Normally speaking, the operating system handles the management of a computer's resources. VMWare ESXi is a bare-metal operating system, aka a hypervisor. Basically that means there isn't a whole lot to it, which is why you can install ESXi to a 1GB SD card if you really wanted. [2]

When it comes to managing the CPU resources, there is something called a scheduler that governs how and when processes run on the CPU. ESXi has a scheduler built into it's kernel. [4] All is fine and well so long as there is enough processing available for the scheduler to give all of the processes running the CPU time that they need. A computer can begin to run slowly and be unresponsive if there is more work that needs to be done than it can readily process. When this occurs within ESXi, the kernel then begins to time-slice the physical CPU cores so that all the virtual machines get a chance to run what instructions they need to. [3]

Since we all know that computers work by magic, everything should just work, right?

Well lets look at it this way: You have two VMs currently and you have a 4800MHz of CPU power for all them to share. Oops, almost forgot about ESXi... So that means you have a total of three things running on the workstation. All three of those things are trying to use a portion of the total 4800MHz that's available. Good news is that under most circumstances there should be enough to go around because most operating systems do not utilize 100% of the CPU at all times.

Now for the bad news: You've told ESXi to give all 4800MHz of CPU time to the Windows guest VM regardless of it's availability. Effectively, that doesn't leave anything else for the other two to use. ESXi will then time-slice the physical CPUs so that the other things can run as well. This time-slicing doesn't really affect Untangle or ESXi because they are running just way they need to when they need to run. It does affect the Windows VM because when it's trying to do something, it's getting stopped part way through for numerous short intervals by the ESXi scheduler. A little interruption here or there isn't noticeable, but it's happening over and over again many many times a second, which may explain why the Windows VM is so sluggish at times.

Your coworker wasn't quite right on his diagnosis of your machine because it only has one socket and one CPU, although his recommended resolution was a step in the right direction. Taking the virtual CPU count down from 3 to 2 helped because you had "over-provisioned" your CPU resources. Basically your configuration in regards to CPU reservation is also called by the same name. To resolve this you need to move your reservation down to about 1000MHz and set a CPU limit of somewhere between 3000-3800MHz. Doing so may not solve all your slowness issues, but it should help.

Sources:

[1] http://ark.intel.com/products/27250/Intel-Core2-Duo-Processor-E6600-4M-Cache-2_40-GHz-1066-MHz-FSB
[2] http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.vsphere.install.doc/GUID-DEB8086A-306B-4239-BF76-E354679202FC.html
[3] http://pubs.vmware.com/vsphere-55/index.jsp?topic=%2Fcom.vmware.vsphere.resmgmt.doc%2FGUID-DFFA3A31-9EDD-4FD6-B65C-86E18644373E.html
[4] http://www.vmware.com/files/pdf/techpaper/VMware-vSphere-CPU-Sched-Perf.pdf