Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a VM running Server 2003 and SQL Server 2008 on VMware ESXi. Can I safely assume this configuration can cope with a change to the number of vCPUs? Are there better solutions to address the demands of the guest? More info below...

After an upgrade to software utilising SQL, I'm seeing a notable increase of CPU demand from the SQL server, often up to 100% for a few minutes at a time. Users are complaining of slow response from the software. The VM has only one vCPU assigned. My proposed solution is to increase the number of vCPUs assigned to the VM.

Does anyone have any experience in increasing the amount of vCPUs with this configuration? The only thing that scares me is the warning in vSphere that a change "after the guest OS is installed may make your virtual machine unstable". Reading responses to similar questions, it seems it should work without incident.

Would it be best to also reserve some CPU for this VM or make a change to the processing priority via the resources "shares" property?

share|improve this question
1  
You've received some good answers to your question but I'd like to point out that you're unlikely to solve your problem by adding more vCPU to it. If you're seeing that SQL server is being bottlenecked by your CPU when it previously wasn't, then there is a high chance that you have an issue with either the database structure or the queries you run against it. –  Stephane May 16 '13 at 13:39

3 Answers 3

up vote 6 down vote accepted

KB888729: How to add processors to a computer that is running Windows Server 2003, Windows Server 2008, ... etc.:

When you restart the computer, Plug and Play detects and installs the processor or processors.

All versions of Windows Server 2003, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows 7 and of Windows XP Professional x64 Edition use the Advanced Configuration and Power Interface (ACPI) Advanced Programmable Interrupt Controller (APIC) hardware abstraction layer (HAL).

  1. Shut down VM
  2. Add CPU/s
  3. Power on
  4. Log in to the VM console, after a minute you get the usual message about needing to reboot for new hardware to work
  5. Reboot

After this you ought to find 2 CPUs (or however many you have if you added more than just 1) in Task Manager.

It's also worth mentioning that this may not help the issue as the performance issue may lie elsewhere, e.g. disk access, poorly written SQL, badly designed tables, etc. Performance tuning SQL servers is an advanced topic all on its own, but adding more vCPU is certainly quick and easy enough to do that its worth trying at least.

I would not start messing with reservations and shares just yet, unless you find that CPU usage on the host is particularly high, which may lead to contention amongst VM guests.

share|improve this answer
1  
Thanks for the response. That was pretty much my plan, so thanks for confirming my thinking. –  Liam May 16 '13 at 15:17

You should generally be fine adding a virtual CPU to this configuration to ease contention issues. You don't mention your hardware configuration or the other guest virtual machines using resources on the host, though.

Do you have that visibility?

I would not mess with reservations at this juncture. Can you report back on the details from the Summary tab in your vSphere client screen?

enter image description here

share|improve this answer
    
Thanks for the response. Yes, I can see that info. The host has a capacity of 8 x 2.53 GHz. The usage is sitting at about 15% average and peaking at about 25%. The other VMs are not as demanding on CPU resources. –  Liam May 16 '13 at 13:44
    
Good. Then you're safe to try adding a vCPU. –  ewwhite May 16 '13 at 13:47

You can safely add another vCPU. Upon boot, Windows will upgrade the HAL from Uniprocessor to Mutliprocessor.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.