January 7, 2013

Windows 8 and C-States

This post explains what to do when your Windows 8 with Hyper-V enabled laptop has power issues.

While working on a light  or heavy workload the laptop turns off.  I do not mean shuts down or blue screens but acts as if you just pulled out the battery  and power cord at the same time.  Basically, a turned off laptop where a running one once was. I have been battling this intermittent issue on my Dell Latitude E6420 laptop for the last year.   Sometimes it was twice in a day, sometimes it was once a week,  other weeks were totally clean.   Dell support believed it was an issue with the motherboard (twice).  At one point, I believed it was an issue running Windows 2008 R2 on a laptop  but that is a story for another post.   When the problem happened on a fresh Windows 8 install it got me thinking.

Windows 8 ran totally clean for a month before the power kill happened.  Right about the time I turned on Hyper-V, hmm...  A few Google searches later and I had the solution.   In the BIOS, Virtualization Technology needs to be turned on and VT for Direct IO will be needed for some functionality.
Turn off C-States.

Hyper-V does not play well with Intel's C-States.  C-States are low power modes for CPUs (see references below for more info).  This doesn't make much sense for a server in a data center, especially when it runs multiple VMs so turning them off is a good thing.  Turning them off will also give your server better performance.  In Hyper-V's defense, they aren't the only one to suffer issues from C-States.  XenServer has had well documented issues (CTX127395) as well.

Sidenote: I did not find official recommendations from Microsoft to turn it off because of issues but I did find one to turn it off for better performance.

SageLike Post ID: SL0002

Applies to:
Windows 2008 R2
Windows 8
Maybe others

hardwaresecrets.com - Everything You Need to Know About the CPU C-States Power Saving Modes
technet.com - Hyper-V and BIOS power plans (c-states)
KB974598 - You receive a "Stop 0x0000007E" error on the first restart after you enable Hyper-V on a Windows Server 2008 based computer
KB2000977 - Hyper-V: Performance decreases in VMs on Intel Xeon 5500 (Nehalem) systems
CTX127395 - Hosts Become Unresponsive with XenServer 5.6 on Nehalem and Westmere CPUs
CTX130464 - How to Check if Extra C-States are Enabled without Booting into the BIOS.
SL0002  - Windows 2008 R2 on a Laptop

No comments:

Post a Comment