Win XP UP/MP performance feature

Hello everybody!
I’ve noticed very interesting thing with Windows XP SP3 Mulitpocessor kernel (MP) and Uniprocessor kernel (UP).
I have a driver that emulates registry (i.e redirects opens/creations to a special hive) it also has user-mode controlling application which makes desciosion if a redirection for particular process should take place.
And I’ve noticed the following performance issue:

  1. Given Windows XP uniprocessor: driver works fine, on a process start there is an instant performance slowdown for a moment (noticeable only through task manager, which detects almost 100% CPU load for a moment). This is not noticeable for user, though.
  2. Given windows xp multiprocessor (vmware with 4 procs) Same driver.
    Now, processes begin to load for a very long time, for example, firefox starts for several seconds, and FAR manager , for example starts for such a long time that I can’t even wait until when it actually start.
    What can be the reason for this issue ? Does anyone have an idea ? :slight_smile: And by the way, is there any code performance analyzer tool which will work on vmware?.. I’ve noticed, that, for example amd codeanalyzer doesn’t work inside vmware probably due to virtual machine architectural features…

Well the one of the biggest differences between the two kernels is that
KeAcquireSpin lock on a uniprocessor only raises IRQL, and does not
spin. So my first reaction is you probably have a deadlock or close to
it. For performance tools try kernrate, I don’t use a VM but I would
think it would work no matter what.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

xxxxx@gmail.com” wrote in
message news:xxxxx@ntdev:

> Hello everybody!
> I’ve noticed very interesting thing with Windows XP SP3 Mulitpocessor kernel (MP) and Uniprocessor kernel (UP).
> I have a driver that emulates registry (i.e redirects opens/creations to a special hive) it also has user-mode controlling application which makes desciosion if a redirection for particular process should take place.
> And I’ve noticed the following performance issue:
> 1. Given Windows XP uniprocessor: driver works fine, on a process start there is an instant performance slowdown for a moment (noticeable only through task manager, which detects almost 100% CPU load for a moment). This is not noticeable for user, though.
> 2. Given windows xp multiprocessor (vmware with 4 procs) Same driver.
> Now, processes begin to load for a very long time, for example, firefox starts for several seconds, and FAR manager , for example starts for such a long time that I can’t even wait until when it actually start.
> What can be the reason for this issue ? Does anyone have an idea ? :slight_smile: And by the way, is there any code performance analyzer tool which will work on vmware?.. I’ve noticed, that, for example amd codeanalyzer doesn’t work inside vmware probably due to virtual machine architectural features…

Are you testing this inside a VM? When you have a multiproc VM, make sure you don’t oversubscribe it. The VM host needs to give all 4 processors at once to it, otherwise if there is a contention for a spinlock, you’ll get undefined latencies and big slowdowns. Also, IPIs necessary for the INVTLB calls may cost too much.

TL;DR: spinlock contention may kill the oversubscribed MP VM.