WS2012 Hyper-V – Managing Virtual CPU Performance

The Performance Tuning Guidelines for Windows Server 2012 document is available and I’m reviewing and commenting on notable text in it.

Microsoft makes a very interesting point.  Just because you can allocate virtual CPUs (vCPUs) to a VM (up to 64 if your hardware is up to it), you shouldn’t.

Virtual machines that have loads that are not CPU intensive should be configured to use one virtual processor. This is because of the additional overhead that is associated with multiple virtual processors, such as additional synchronization costs in the guest operating system.

Using up to date integration components improve CPU scalability.

You can also improve the performance of your overall virtual machine estate by conserving CPU cycles.  In other words, disable or tune down CPU utilising background activity and free up cycles for VMs that are engaged in providing services.  Microsoft suggests:

· Install the latest version of the virtual machine Integration Services.

· Remove the emulated network adapter through the virtual machine settings dialog box (use the Microsoft Hyper-V-specific adapter).

· Remove unused devices such as the CD-ROM and COM port, or disconnect their media.

· Keep the Windows guest on the sign-in screen when it is not being used.

· Use Windows Server 2012, Windows Server 2008 R2, or Windows Server 2008 for the guest operating system.

· Disable the screen saver.

· Disable, throttle, or stagger periodic activity such as backup and defragmentation.

· Review the scheduled tasks and services that are enabled by default.

· Improve server applications to reduce periodic activity (such as timers).

· Use the default Balanced power plan instead of the High Performance power plan.

Some of those tips will be pipe dreams in a true cloud.  For example, I’d never disable the virtual CD-ROM because that’s an endless run of help desk calls waiting to happen. Reviewing scheduled tasks in a true cloud is ambitious considering that the compute cluster admin has no idea what’s going on in the VMs. Disabling the screen saver … I like that one, but that’s going to be a fun conversation with IT security officers who are known for being aware of current technology … oh … 😛

For client guest OSs (VDI), they also suggest:

· Disable background services such as SuperFetch and Windows Search.

· Disable scheduled tasks such as Scheduled Defrag.

· Disable Aero glass and other user interface effects (through the System application in Control Panel).

You can use weights and reserves to control how each vCPU in a VM uses physical logical processors, e.g. 100% reserve gives a vCPU 100% of a logical processor.  A handy tip is to use this for certain CPU intensive workloads such as Exchange or SharePoint to guarantee a certain SLA for application performance.  Microsoft says:

Highly intensive loads can benefit from adding more virtual processors instead, especially when they are close to saturating an entire core.

That makes sense.  2 vCPUs is not the same as 2 physical CPUs.  2 physical CPUs (2 * quad core) might be 8 logical processors.  Therefore you might want to give the VM equivalent 8 vCPUs – if the ASSESSMENT (yes I’m back on that again) says that it is required.

Please follow and like us:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.