Windows 7 (and Server 2K8 R2) Kernel changes since Vista
Very interesting article about presentation given this week at PDC 2009. Arun Kishan is the Microsoft Kernel engineer that removed dispatcher lock from Win7 kernel (and this is in Server 2008 R2 — yes R2 does update the Server2K8 kernel) and replaced it with a more efficient locking mechanism that scales across multiple cores and processors much better.
They found that with Vista and Server 2008 (before R2), on systems with 128 processors, that 1 out of every 2 attempts at obtaining the global dispatcher lock resulted in a wait….which means 88% of cpu time was spent just waiting on obtaining a lock (on these many-many-processor systems). The issue is that the current dispatcher lock found in Vista, XP, 2000, etc was never designed with this many processors in mind when it was architected in the early 1990’s.
And here’s the benefit (and cool part):
So this global lock, too, is gone in Windows 7, replaced with a more complex, fine-grained system where each page is given its own lock. As a result, Wang reported, 32-processor configurations running some operations in SQL Server and other applications, ended up running them 15 times faster on Windows Server 2008 R2 than in its WS2K8 predecessor — all by means of a new lock methodology that is binary-compatible with the old system. The applications’ code does not have to change.
Read that last sentence again. That means you get all the performance gains for *free*. That means you’d see a performance improvement if you upgraded your Server 2008 system to Server2K8 R2 (if you have at least 32 processors).
Also, here’s a great video of Arun Kishan explaining the new (and old) locking mechanisms: