I am working on a virtual machine that runs SQL Server Express (as part of Sage Line 50 Manufacturing). The details are as follows:
Physical Server (host machine)
- Intel Xeon Quad Core 2.1GHz
- 4GB RAM
- VMDK image stored on RAID-5 500GB SATA drives (7200RPM)
- Running Ubuntu 10.04 Server 64 bit
- VMware Server 2
Virtual Machine
- Windows Small Business Server 2003
- Allocated 2 vCPU's and 2GB RAM
- Using 100GB pre-allocated flat VMDK file
The problem I have is that there is process that runs in SQL Server that is CPU intensive. On the old physical server that we migrated to the virtual machine from, this would utilise both CPU cores so the sqlserver.exe process would be running 100% on each of the CPU cores. On the virtual machine, it only seems to use one of the two CPU cores, meaning that the process is much slower to run.
Question
Is there a way to force SQL Server (sqlserver.exe process) to use both of the CPU cores, and distribute it's load between them? Is this a VMware setting that needs changing to allow processes to use both cores?
I dont have much experience with the MS SQL Express Databases on virtual machines but I think you just ran into the hardware restrictions of the MS SQL Express Edition.
I assume that your physical server had 1 cpu with 2 cores. The MS SQL Express 2008 (and I think 2005 also) do support only ONE phyisical cpu but mulitple cores.
A VM recognizes each vCPU's as a single CPU and not as an additional core. So the sqlserver.exe process is limited to 1 vCPU.
In vSphere (and this may not be applicable to VMware server but might be useful to people who stumble across this answer) you can change the number of "cores per socket" presented to a VM to accurately reflect multi-core (or hyper-threading) CPUs.
See this article: http://www.virtualizationbuster.com/?p=132