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.

For those that don't know, CPU parking is a feature in recent Windows Server releases that allows Windows to pretty much drop a CPU core to zero use, and having nothing use it. It's been introduced as a power-saving measure. There's more detail about it here, amongst other places.

However what I'm curious about is whether this matter on a virtualised guest - or is CPU parking more of a hindrance than a help, given that the physical CPUs are managed by ESXi, not Windows, and that a parked CPU is less likely to deal with traffic unless the scheduler deems there's enough work to unpark the CPU?

I've not found anything about this - I do suspect it will be very much based on a given workload, but I've not seen any discussion (unlike, say, whether hyper-threading has any effect, which seems to be discussed regularly). Whilst I do understand the "test with your workload" I was wondering if there was any advice/guidelines out there that I've missed.

share|improve this question
    
I doubt a VM can tell physical cores to go to sleep. If this could be done it would be done by the hypervisor indepentdent of the VM. –  LatinSuD Aug 20 at 12:29
    
Exactly - that's why I'm asking the question, I can't see the point of parking in a VM so should parking be disabled? –  Chris J Aug 20 at 12:31
    
What ESXi version? What's the CPU usage, both on your developer's machine you mentioned in one of the comments and on the VM? What CPU models are used in your developer's machine and in you ESXi host? I don't know if this information will help but it might. –  Mario Lenz Aug 20 at 17:44

2 Answers 2

up vote 7 down vote accepted

Definitely try to right-size your VMs.

If you have enough free virtual CPUs to be concerned about "CPU parking", you may have too many allocated to the VM.

It's not a common request, so I'd just rely on the traditional resource management tools unless you're currently having a performance problem.

Edit:

You are having a performance problem.

  • Make sure you have VMware tools installed.
  • Set your Windows VM Power Options to High Performance

enter image description here

share|improve this answer
2  
It's something we've seen on a rig under a fairly heavy CPU load - a multi-threaded app isn't appearing to be utilising all the vCPUs, with resource manager marking a couple as "parked" (despite there being more than enough threads queued to run). It's the first time we've had to ponder whether parking and VMs really are an issue: the developer on his machine (physical) sees the same code use all cores (more cores than there are on the VM). We're scratching our heads a bit and just wanted to explore this particular aspect. –  Chris J Aug 20 at 12:35
    
@ChrisJ See my edit above. –  ewwhite Aug 20 at 12:48
    
This appears to have done the trick on our test bed: load is now being spread across all the vCPUs (according to Windows), and rather than 2 concurrent threads we've got 4 concurrent threads. We'll be running on the big rig (hopefully) today so will confirm then. –  Chris J Aug 21 at 7:39
1  
Be sure to add it to your windows server group policy. That's why I never end up touching it manually anymore. –  ewwhite Aug 21 at 12:01
    
Good suggestion - ta. –  Chris J Aug 22 at 12:16

It wouldn't matter. If you want to save power, allocate less cores to the VM guest. Windows will try to manage its "virtual" cores, but it has no control over the hypervisor so it wouldn't affect the actual physical CPUs on the system.

share|improve this answer
    
For me this isn't a power saving issue as the host is virtulised, so it's ESXi I need to look at. It's more aobut whether it influences/interferes with the hypervisor scheduler itself, as ultimately physical CPU time is alloacted by that, and not by the Windows scheduler. My own gut feeling is that parking should probably be disabled, so the Windows scheduler doesn't have to "park" a CPU that doesn't actually exist, and this might make better use of the underlying physical CPUs by allowing ESX to allocate time accordingly. I was just wondering whether my gut is correct :-) –  Chris J Aug 20 at 12:25
    
It won't influence the scheduler. Under constrained conditions, ESXi might "steal" unused CPU time from your guests, but otherwise the core will stay idle unless another guest is also using it. –  Nathan C Aug 20 at 12:26
    
@ChrisJ There's no need to disable. Don't try to outsmart VMware :) –  ewwhite Aug 20 at 12:28
    
I'm not trying to outsmart VMWare, I'm trying to second-guess Windows (as it doesn't appear to be scheduling an app across all vCPUs) :-) I didn't think we'd need to do owt, mostly due to the lack of information about it online (implying most/everyone leaves it as is), but just wanted to explore this aspect. –  Chris J Aug 20 at 12:42
    
@ChrisJ I don't think people touch this setting directly. It's usually part of the system's power policy. –  ewwhite Aug 20 at 12:51

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.