GDI and WDDM

Apr 27, 2009 14:29 GMT  ·  By

One aspect of making Windows 7 the superlative of Windows Vista involves boosting graphics performance, Microsoft reveals. According to Steven Sinofsky, senior vice president, Windows and Windows Live Engineering Group, “in engineering Windows 7 we set out to improve the “real world” performance of graphics as well as continue to improve the most extreme elements of graphics.” In order to improve Windows 7 graphics performance Microsoft has looked at thousands of traces, namely recorded OS events complete with diagnostics information.

“The type of issues ranged from an antivirus blocking disk access for all applications while updating itself on the vendor’s website to an application doing network access from a UI thread. In a significant portion of these traces, we found that a GDI application is waiting on another GDI application which is experiencing slowdowns due to excessive paging activity. This was the single-most frequently occurring cause of all desktop responsiveness issues, which without this data we probably would not have assumed,” revealed Ameet Chitre, a program manager on the Windows 7 Desktop Graphics feature team.

One scenario in which end users will be able to notice enhanced graphics performance in Windows 7 compared to Windows Vista involves multiple applications running concomitantly. First off, the focus was placed on enhancing the GDI Concurrency architecture. The software company worked to re-architecture the code associated with the Graphics Device Interface synchronization objects or “locks.” Windows 7 evolved past the Vista model, which tied system-wide exclusive global lock to a single application. By optimizing the internal synchronization mechanism, Windows 7 now allows for multiple apps to render simultaneously with no problems.

“After the GDI concurrency work was implemented in the Windows 7 builds leading to the Beta, we saw a large reduction in the number of desktop responsiveness issues reported by our testers which were caused by one application blocking another one due to GDI,” Chitre added. “To further validate the scalability of our new implementation, we wrote tests that draw 2D GDI primitives and measured the rendering throughput by launching simultaneously multiple such applications. The throughput is measured by adding together the frame rate (FPS) of each application window.” (see graphic on the left)

In addition, the Redmond company also worked to ensure that Windows 7 would use a cut-down overall memory footprint over Vista's. Simply put, Win 7 used less memory than its precursor. Microsoft explained that the amount of memory necessary to run multiple windows no longer scaled with the volume of the opened items. Windows Desktop Window Manager v1.1 in Windows 7 allows the amount of memory used per app to be half of Vista's because the upcoming iteration of Windows no longer stores the same identical content in two different memory allocations in video and in system.

“We achieved the reduction in system memory by accelerating the common GDI operations through the graphics hardware - the WDDM drivers accelerate these to minimize the performance impact of the CPU read-back of video memory. This was necessary as performing these operations otherwise on the CPU would incur a heavy performance penalty. In order to decide which GDI operations to accelerate, it was important to understand the usage pattern of various GDI applications. We profiled the top 100 GDI applications to learn more about their calling patterns and frequency and nature of the GDI operations,” Chitre stated.

Photo Gallery (3 Images)

Windows 7
Windows 7Windows 7
Open gallery