Server 2012 and balanced power plan, part deux – processor queue length

Ok in our last installment on Windows Server 2012 R1 and the balanced power plan, we saw core parking. But was that ‘bad’?

I think so. It depends, naturally, on a variety of factors, but generally speaking in server land, we want stuff done quickly, not don’t slower to save power. Generally.

So here’s what this looks like at high performance plan, running a Monero cryptonote mining program on 4 cores. In the image below you can see we have about 142 hashes / second from 4 cores of work. CPU is at about 62% across all cores, pretty evenly I think.

11

 

So great. What happens if we flip this to balanced plan?

12

We just lost 25% of our cores. 2 parked out of 8. Now, you’ll be quick to note, “hey its teh same CPU util, just busier on 6 cores and idle on 2, so who cares?”

Lets dig a little deeper. Looking at System\Processor Queue Length in perfmon:

13

Ok so we’re bouncing around. Waiting. We have items waiting on a CPU here some of the time. It’s not a lot. But this is a synthetic setup on a VM on a Dell T5500. Not a production server running, say, a stock exchange. So we have a few threads waiting for a core. So what?

Look what happens if we just pop back over to high.14

As soon as I flip to high performance, queue length goes to 0. Because 2 of our 8 cores aren’t parked. And this is in a VM mind you. So there goes the theory that Virtual Machines don’t need a power plan set because they are virtual (I run into this argument from time to time…)

Next installment, we’ll examine the impact to the network stack.

Server 2012 and balanced power plan

Power is something I’ve written about before. I get it. Really I do. I recycle. I like our planet. I want it to be livable for my grand-kids, etc.

But, when work is going to be done on a computer, why you want it to take 2x as long to do the same work, that will end up burning basically the same amount of energy (just less/minute), plus burning my time sitting around waiting on 145 Windows updates to install for hours… is beyond me.

For some troubleshooting I was doing, I needed to validate some things in Windows Server 2012. So I installed it. It took forever. Even on 8 cores, 8GB of RAM, and backed by a solid state drive. Like, an hour to install. And 2 hours to apply 145 updates from Microsoft and it still wasn’t fully done, just the first pass…

So. This is what my system looked like running Windows Update on a Server 2012 (non-R2) vm:

parked

So, CPU 3 is parked. I don’t care much for core parking. Especially not in older OSes on older hardware. Also see how cores 0/1/2 are busy, really busy, and 3/4/5/6/7 are all parked/quiet? Is that good? Why did I allocate 8 cores to this box? Because I want it to get stuff done faster. Not to save power with core parking.

What’s the big deal, you may ask… Here’s the big deal:

Slow Performance on Windows Server when using the “Balanced” Power Plan

But dude, you’ll say, chill out. No. Here’s why:

Hosts Become Unresponsive with XenServer on Nehalem and Westmere CPUs

I quote:

“In addition to the total system lockups, C-states have been linked to a number of less severe issues, such as erratic network performance, resets on storage adapters, random crashed processes, and the overall system performance.”

BIOS to high perf, power plan to high perf, C-states off.

It occurs to me a WU snap in time of what perf looks like isn’t an empirical test, especially for the incredulous reader. So I’ll show you what I mean with a Monero CPU miner shortly…

Part II

Quick and Dirty – Collect an ETW shutdown trace on Windows 7.

Let’s say you need to collect a trace of the shutdown of a Windows 7 box. Or 8, or 10. Whatever.

Maybe it takes forever, hangs up, et etc.

Jeff to the rescue;

For Windows 7, or Window 8.x, download the WADK for 8.1 update. You’re going to say, “but dude, this is for Windows 7”. The dude abides, for reasons I can’t go into, use the 8.1 update ADK please for a Windows 7 trace. Capiche?

Ok. So, Download here

That downloads adksetup.exe. Run it. It’s a web installer, we are going to opt-out of almost all of it; when you get to the below screen, make it look like so:

clickthisway.png

And then click Install. You’re going to want to know, what do all these do? Later, padwan learner, we’ll get to that sometime in the future.

For now, focus on the present. I know master Yoda says to be mindful of the future, but not at the cost of the now.

Anyway, when it is done, run WPRUI;

On Windows 7, you’ll likely be prompted to disable paging executive. Do it and reboot. This tells Kernel “YO! Keep all those stacks in RAM and don’t outpage them with yo bad self”.

Then rerun WPRUI if you had to reboot. Make the checkboxes look so;

checkboxhell.png

Arrows are where you need to change something. Then hit “start” and reboot.

After you power back up, you’ll find a trace in your appdata by default.

View with WPA (Windows Performace Advisor).

Enjoy.