Tuesday, April 17, 2007

Quad Core Nostalgia

As I watch Intel launch its latest quad-core CPU I can't help but wax nostalgic about my time as contract test engineer for the company's Desktop Architecture Labs (DAL). It was early 2000 and the first Pentium 4 was still in preproduction testing. I had just received my prototype system for evaluation - an 800Mhz box with dual-channel RAMBUS (remember those guys?) RDRAM. I knew they were in trouble when my first round of tests - mostly linear office productivity tasks - showed the chip to be 30-40% *slower* than its predecessor, the Pentium III. I communicated my findings back to Intel and they blamed it on a buggy BIOS and poorly tuned chipset.

Weeks later, as I evaluated the now 1.5GHz production-level chip, I became convinced that a traditional linear benchmark approach wasn't going to cut it. The Pentium 4's longer pipeline simply clobbered throughput, with most tests showing performance barely on par with the older P6 core. Fortunately, I was already hard at work on my first parallel-processing test suite, Benchmark Studio, and tests with multiple, concurrent tasks had the Pentium 4 pulling away from the Pentium III by a sizable margin.

Once again, I communicated my findings to Intel, even suggesting a possible marketing spin for the data: More performance for demanding workloads. It would have dovetailed nicely with the related work I had been doing around the company's "Constant Computing" initiative, however, ultimately my findings were canned. Apparently, my message of "more torque for heavy multitasking loads" (i.e. the "SUV" argument) wasn't sexy enough. They wanted a "sports car" message. Better linear performance. Ever higher clock speeds (4GHz was the long term goal). The rest, as they say, is history.

Of course, the Pentium 4 architecture (a.k.a. "NetBurst") ultimately flopped, allowing AMD to each Intel's lunch for many years. When Intel finally dumped NetBurst in favor of a revamped Pentium III design (a.k.a. Core 2), the industry had finally caught-up with where I was over 7 years ago. Now, virtually all business productivity benchmarks emphasize parallel execution performance, a necessity now that most CPUs have 2 or more cores on board. Symmetrical Multiprocessing (SMP), once the purview of engineering workstations, is now de rigeur, and the current mainstream OS - Windows XP - is completely at home on multiple CPUs.
I guess I can take some small measure of satisfaction in knowing that I was right about where benchmarking was headed, and that if Intel had followed my lead they might have fared better (at least in terms of marketing success).

Note: You can download the latest incarnation of my test suite, Clarity Studio, for free from the exo.performance.network (www.xpnet.com) web site. Read more...

Tuesday, March 20, 2007

Vista Aero: What a CPU Hog!

Microsoft's new Aero Glass GUI - one of the cornerstones of the company's Windows Vista marketing message - is a joy to behold. Aero's sleek, semi-transparent facades serve to enhance the user experience by providng a stronger sense of "depth" and cohesion. Combined with Vista's enhanced UI metaphors (love those "breadcrumbs" in explorer), Aero is a major improvement over the XP GUI.

It's also a CPU hog. Despite Microsoft's claims about leveraging 3D accelerator technology to offload the GUI workload, Aero still chews-up more CPU cycles (an average of 22%) with desktop composition enabled (i.e. 3D accelerated mode) than with it disabled (i.e. non-accelerated "legacy" mode). In other words, turn on the "bling" and you toss nearly a quarter of your CPU bandwidth out the window.

Note: I measured the above using the recently updated DMS Clarity Tracker Agent, which is now part of the new public exo.performance.network (xpnet.com) project. You can reproduce the test scenario by downloading the companion DMS Clarity Studio tool (also at xpnet.com) and running the OfficeBench test script, first with composition enabled and then with it disabled.

Other interesting tidbits:

  • The ratio of the increased CPU overhead is roughly 4:1 in favor of User vs.Privileged (i.e. kernel mode) time - a good thing.

  • That User mode bump can be traced directly to the participating applications - for example, Word 2007 using 48% more CPU time with composition enabled.

  • Enabling desktop composition also causes windows to chew another 16% of the available physical RAM as measured by the Committed Bytes counter.

  • Though CPU overhead was higher with composition enabled, overall script completion times - as measured by OfficeBench - were only 3% slower.

  • One alarming statistic: Processor Queue Length, a measure of how many threads are queued and waiting for CPU time, increases by 28% with composition enabled - not good, especially for multitasking.

Bottom Line: For single-tasking users running generic productivity application scenarios, the added overhead from enabling desktop composition shouldn't be much a factor. However, more demanding users - especially those needing maximum performance - may find that turning composition off let's them regain some of those long lost CPU cycles.

I guess the old saw still applies: What Intel (and AMD) giveth, Microsoft taketh away...

Read more...

Saturday, March 10, 2007

The Secret Life of SuperFetch

One of the more mysterious new features of Windows Vista is its SuperFetch memory management subsystem. Billed as a "smart" pre-caching mechanism, SuperFetch is supposed to improve system responsiveness by monitoring application usage patterns and then pre-loading application code in anticipation of the next task. SuperFetch uses the time of day and other behavioral markers to determine what to load when, using the Windows memory manager's Standby List as its entry point (the ever illuminating Mark Russinovich goes into more detail in his recent TechNet Article).

Of course, it all sounds good on paper. But how do you quantify the impact of something that's designed to work in the background and to be essentially undetectable (beyond some vague sense that the OS is more responsive)? For starters, it helps to know where to find it. SuperFetch runs as a Windows Service under the SVCHOST alias. The actual filename is sysmain.dll, so a quick scan of Task Manager to correlate the Process ID with the instance of SVCHOST in question gets you in touch with SuperFetch.

Next, you need a way to monitor both SuperFetch's behavior and its impact on system responsiveness. The first part is easy - any Vista-compatible metrics agent will do the trick, though we prefer the one we provide through the xpnet: DMS Clarity Tracker. Measuring the second part - how SuperFetch impacts the system - is a bit trickier.

Here we used another xpnet tool, DMS Clarity Studio, to generate a scripted productivity workload spanning Microsoft Word, Excel, PowerPoint and Internet Explorer. By comparing before/after results with SuperFetch enabled/disabled (and rebooting after each test run) we were able to determine that Microsoft's new VMM magic is indeed having a positive impact on application responsiveness. With the service enabled, Startup times - as measured by the OfficeBench test script - were cut in half, this after multiple "training" runs to allow SuperFetch to map the usage pattern (i.e. "We run Office after booting").

We'll be conducting additional research and testing around SuperFetch and other new Vista technologies (Integrated Search, ReadyBoost) in future blog entries for the exo.performance.network. Stay tuned! Read more...

Friday, March 9, 2007

Monster Excel Workbooks Exposed

Everyone knows that Microsoft Office is a bit of a memory hog. In fact, few products can claim as much credit for driving the memory upgrade cycle as the ubiquitous combination of Word, Excel, PowerPoint and Outlook. However, while many power users may think they’ve pushed the envelope on one or more of these applications – massive documents, huge spreadsheets, media-rich presentations – none can compare to those captains of industry that make their home at the corner of Wall and Broadway.

I’m referring, of course, to financial services traders. The “Type A” personality crowd – risk takers, deal makers, the rock stars of wealth creation. They live life on the edge, balancing risk vs. reward in constant battle with each other and the market itself. And the fuel that drives their engines is…data. Lots and lots of data – analyzed, quantified and extrapolated in nearly every conceivable way.

Massaging that data falls on the shoulders of Microsoft Excel. Through myriad templates and macros and real-time data connections, these traders push Excel to the extreme as they tweak and tune their customized (and highly proprietary) financial models. All of which consumes a tremendous amount of hardware resources. In at least one shop we found that traders ran, on average, six concurrent instances of the Excel application process, each one occupying a peak memory footprint of from 300-500MB during a normal trading session (for a total of 1.8GB).
CPU utilization was also high, with each instance consuming ~60% of the available CPU cycles on a 4-CPU workstation, or 300% out of a total CPU capacity of 400% (100% x 4 CPU). Then there was the thread count. At any given time these systems were asked to juggle up to 230 concurrent execution threads just from the various Excel instances.

That’s approximately 1/2 the total thread workload for a typical business productivity user, yet this is just one application among many. These systems are also running proprietary trading software (plus various real-time feeds, like Bloomberg), which is why even a high-end PC isn’t adequate. Hence their reliance on top-of-the-line workstation hardware. And even then, with dual-cores and gigabytes of memory, many traders still need more than one system in order to handle their computational load. In fact, it’s not uncommon to find 3 or more high-end boxes under a trader’s desk – thanks in large part to the overhead of their massive Excel workbooks.

1.8GB of RAM. 300% CPU utilization. 230 concurrent execution threads. And you thought your spreadsheets were complicated! Read more...

Wednesday, February 21, 2007

DreamScene? More like a “Nightmare on Vista Street!”

Today I installed “DreamScene” – and kissed my CPU cycles goodbye. The official marketing moniker for Microsoft’s seductively frivolous new “motion desktop” technology (one of those Ultimate Extras we’ve been promised since Vista was RTM), DreamScene transforms Windows’ staid desktop wallpaper mechanism into a seamless, animated backdrop to your workaday tasks. And like much of the Vista Aero user experience, DreamScene is pure eye candy with little or no practical benefit.

Yes, having an MPEG or WMV video play seamlessly in the background – with full support for window transparency and other Aero goodness – is cool. Having Windows Explorer chew-up 10-15% of your available CPU bandwidth in order to accommodate DreamScene’s frivolity, on the other hand, is decidedly un-cool. And the mechanism itself is buggy as hell. Case in point: Every time I suspend/resume my Dell XPS M1710 “notebrick” the driver for its integrated nVidia GeForce 7900 GS graphics adapter crashes. Or at least that’s what Vista is telling me once it recovers. What I see when it happens is a blank screen that makes me want to reach for the power switch (I assumed it had hung like XP was wont to do in similar situations – old habits die hard).

Of course, I could use the above scenario point out one of the nicer features of the revised Vista driver model – namely, the ability to recover from many driver-related errors thanks to a modular architecture that moves much of the non-critical code outside of the kernel. But this is about DreamScene, and from where I’m standing it looks like a real nightmare for corporate IT.

My advice: Outlaw DreamScene, at least until Microsoft agrees to reimburse you for all those lost CPU cycles and panicked calls to the help desk. And to think, we gave up WinFS…for this! Read more...