Posted by: kurtsh | February 23, 2007

HOWTO: Force background processes to complete at high priority

I recently got a really interesting tip from a co-worker of mine.  Sounds to me like a winner!  Below is the email he sent with some corrections and rewording:

A systems engineer goes to customer meetings and when the customer eventually lets us into the meeting room, we start up our demo machine(s) and hopefully we have the time to let it "settle down" before we actually do the demo – whether it’s physical server or within a virtual machine. 

The problem with this is that if it HASN’T settled down – i.e. loaded up all its services and gotten to a point where it’s ready to run smoothly – the demo goes dog slow.

I came across a very cool command you can issue on a host server and/or demo machines after you’ve logged in for a minute or so.  It essentially forces the server services to load up at a high priority to get the "settling down" to happen much faster.  I’ve tested this on both my physical server demo machine (no VM’s used) as well as my ‘bare’ WS03R2+Virtual Server 2005 R2 machine that runs virtual machines… and it works VERY well.  (I tested it and it can be run in the VM as well)

Before running anything, login and let the desktop settle down for a minute or maybe two.  If it’s a server then let the services have a minute or two.  Then run a simple CMD file you can create yourself on the desktop and let it run.  What this does is force all the background processes to complete quickly with a high priority.  Do this with Task Manager open on the Performance tab and watch it – it gets intense on some configs and then voila, nearly no activity.  Then do a trial run through of your demo and watch the performance difference.  I’ve done this on my nc6000 as well as my nc8430 and same improvements exist.

Each system had a clean install of Windows XP Professional with service pack 2 and all updates installed. The hard drives were defragged prior to each benchmark session. Before we ran each benchmark, we executed the command

  • Rundll32.exe AdvAPI32.dll,ProcessIdleTasks (note the comma)

This immediately executes and forces all background idle tasks to completion, including the Windows Prefetcher!


%d bloggers like this: