Engineering Windows 7

Welcome to our blog dedicated to the engineering of Microsoft Windows 7

Windows 7 -- Approach to System Performance

Windows 7 -- Approach to System Performance

Many folks have commented and written email about the topic of performance of Windows. The dialog has been wide ranging—folks consistently want performance to improve (of course). As with many topics we will discuss, performance, as absolute and measurable as it might seem, also has a lot of subtlety. There are many elements and many tradeoffs involved in achieving performance that meets everyone’s expectations. We know that even meeting expectations, folks will want even more out of their Windows PCs (and that’s expected). We’ve re-dedicated ourselves to work in this area in Windows 7 (and IE 8). This is a major initiative across each of our feature teams as well as the primary mission of one of our feature teams (Fundamentals). For this post, I just wanted to frame the discussion as we dig into the topic of performance in subsequent posts.  Folks might find this post on IE8 performance relevant along with the beta 2 release of IE 8. 

Performance is made up of many different elements. We could be talking about response time to a specific request. It might mean how much RAM is “typical” or what CPU customers need. We could be talking about the clock time to launch a program. It could mean boot or standby/resume. It could mean watching CPU activity or disk I/O activity (or lack disk activity). It could mean battery life. It might even mean something as mundane as typical disk footprint after installation. All of these are measures of performance. All of these are systematically tracked during the course of development. We track performance by running a known set of scenarios (there are thousands of these) and developers can run specific scenarios based on exercising more depth or breadth. The following represent some (this is just a partial list) of the metrics we are tracking and while developing Windows 7:

  • Memory usage – How much memory a given scenario allocates during a run. As you know, there is a classic tradeoff in time v. space in computer science and we’re not exempt. We see this tradeoff quite a bit in caches where you can use more memory (or disk space) in order to improve performance or to avoid re-computing something.
  • CPU utilization – Clearly, modern microprocessors offer enormous processing power and with the advent of multiple cores we see the opportunity for more parallelism than ever before. Of course these resources are not free so we measure the CPU utilization across benchmark runs as well. In general, the goal should be to keep the CPU utilization low as that improves multi-user scenarios as well as reduces power consumption.
  • Disk I/O – While hard drives have improved substantially in performance we still must do everything we can do minimize the amount that Windows itself does in terms of reading and writing to disk (including paging of course). This is an area receiving special attention for Windows 7 with the advent of solid state storage devices that have dramatically different “characteristics”.
  • Boot, Shutdown, Standby/Resume – All of these are the source of a great deal of focus for Windows 7. We recognize these can never be fast enough. For these topics the collaboration with the PC manufacturers and hardware makers plays a vital role in making sure that the times we see in a lab (or the performance you might see in a “clean install”) are reflected when you buy a new PC.
  • Base system – We do a great deal to measure and tune the base system. By this we mean the resource utilization of the base system before additional software is loaded. This system forms the “platform” that defines what all developers can count on and defines the system requirements for a reasonable experience. A common request here is to kick something out of the base system and then use it “on demand”. This tradeoff is one we work on quite a bit, but we want to be careful to avoid the situation where the vast majority of customers face the “on demand” loading of something which might reduce perceived performance of common scenarios.
  • Disk footprint – While not directly related to runtime performance, many folks see the footprint of the OS as indicative of the perceived performance. We have some specific goals around this metric and will dive into the details soon as well. We’ll also take some time to explain \Windows\WinSxS as it is often the subject of much discussion on technet and msdn! Here rather than runtime tradeoffs we see convenience tradeoffs for things like on disk device drivers, assistance content, optional Windows components, as well as diagnostics and logging information.

We have criteria that we apply at the end of our milestones and before we go to beta and we won’t ship without broadly meeting these criteria. Sometimes these criteria are micro-benchmarks (page faults, processor utilization, working set, gamer frame rates) and other times they are more scenario based and measure time to complete a task (clock time, mouse clicks). We do these measurements on a variety of hardware platforms (32-bit or 64-bit; 1, 2, 4GB of RAM; 5400 to 7200 RPM or solid-state disks; a variety of processors, etc.) Because of the inherent tradeoffs in some architectural approaches, we often introduce conditional code that depends on the type of hardware on which Windows is running.

On the one hand, performance should be straight forward—use less, do less, have less. As long as you have less of everything performance should improve. At the extreme that is certainly the case. But as we have seen from the comments, one person’s must-have is another person’s must-not-have. We see this a lot with what some on have called “eye candy”—we get many requests to make the base user interface “more fun” with animations and graphics (“like those found on competing products”) while at the same time some say “get rid of graphics and go back to Windows 2000”. Windows is enormously flexible and provides many ways to tune the experience. We heard lots on this forum about providing specific versions of Windows customized for different audiences, while we also heard quite a bit about the need to reduce the number of versions of Windows. However, there are limits to what we can provide and at the same time provide a reliable “platform” that customers and developers can count on and is robust and manageable for a broad set of customers. But of course within a known context (within your home or within a business running a known set of software) it will always be possible to take advantage of the customization and management tools Windows has to offer to tune the experience. The ability to have choice and control what goes on in your PC is of paramount importance to us and you will see us continue to focus on these attributes with Windows 7.

By far the biggest challenge in delivering a great PC experience relative to performance is that customers keep using their PCs to do more and more things and rightfully expect to do these things on the PC they own by just adding more and more software. While it is definitely the case that Windows itself adds functionality, we work hard to pick features that we believe benefit the broadest set of customers. At the same time, a big part of Windows 7 will be to continue to support choice and control over what takes place in Windows with respect to the software that is provided, what the default handlers are for file types and protocols, and providing a platform that makes it easy for end-users to personalize their computing experience.

Finally, it is worth considering real world versus idealized settings. In order to develop Windows we run our benchmarks in a lab setting that allows us to track specifically the code we add and the impact that has. We also work closely with the PC Manufacturers and assist them in benchmarking their systems as they leave the factory. And for true real-world performance, the Microsoft Customer Experience Improvement Program provides us (anonymous, private, opt-in) data on how machines are really doing. We will refer to this data quite a bit over the next months as it forms a basis for us to talk about how things are really working, rather than using anecdotes or less reliable forms of information.

In our next post we will look at startup and boot performance, and given the interest we will certainly have more to say about the topic of performance.


Leave a Comment
  • Please add 3 and 7 and type the answer here:
  • Post
  • I think Microsoft should definitely think about shiping only two Windows versions. A "Personnal" and a "Professionnal" one. Then, once I buy a version, I can select during the installation which use I generally make of Windows.

    For example, if I want "Ultimate" I'll just buy a "Personnal" Windows and then do an "Advanced" installation which will allow me to "Select All" features or to choose specific features to install. Someone who uses his computer only for entertainement (games, media, etc.) will also buy "Personnal" Windows but choose a "Games and Media" installation.

    I think this would *really* make our lifes much easier and we would be very thankful if purchasing and installing windows becomes just as "clear ans easy" as this. Plus, by doing this, you're satisfying the guy who wants a lot of versions as well as the guy who just wants few versions.

  • Yeah, problem is, MS can't make money off of one version. They split it all up for cost reasons and to make more money from it. If Windows Vista were setup like that, it would likely be on 2 DVDs and cost around $399. Not only is this not fair to the consumer, but also MS would make much from it since it's a single source of income from teh OS. It's a trade-off. Make 3 version max and stick to it. This ultimate, home and basic crap is ridiculous. Make Home, Media, and Advanced. Period.

  • Oh, and get rid of Home Basic. What the heck was that? A booby prize?

  • One of the most annoying performance strategies I find in Windows is the tendency of the file system cache to take most of the memory, even the memory currently in use by programs. Or perhaps it's the other way around: the tendency for the memory manager to keep paging out the processes' memory even when it's not quite necessary. This might be difficult to experience in the kind of performance tests done in laboratories.

    I usually leave 8-12 applications open (some of them being 20-30 open tabs browsers... yes, browser/S/). I don't reboot my PC for weeks (thanks XP for being so stable!) nor close any of those programs if I can help it. Typically, after performing long file system operations (like copying/creating large files, watching a movie, etc.), most applications become paged out. I certainly don't want more than 512M of my 2GB used in file system caching, and even less in a single large file I will only need to access once. Since Windows 2003 server SP1 there is the SetSystemFileCacheSize() system call, which I tried to use with not much luck. I have some proposals about this, which you might want to consider (these are my own thoughts, which I hereby donate to the public domain):

    * File system cache should limit the amount of blocks it caches for each file; that can be achieved in the read/write system calls, by counting the amount of bytes sequencially read/written and switching to a "no cache" mode after a certain threshold. Of course, scattered read/writes should be properly cached as they most probably come from some kind of database system. For video playback programs, perhaps a more refined strategy would be to cache only the latest blocks, to speed up the ocassional temporary rewind, but that's more difficult to implement.

    * I don't have in-depth knowledge of the Windows memory system, but it seems it tends to page out text and data from programs even if the memory is not immediately needed. If that's the case, then that memory shouldn't be immediately recalled as free; if, for example, that memory is paged out in order to speed up a potential hybernate process, it doesn't mean it's not still there and ready to be used by the process.

    Anyway, Windows should make its best effort to avoid paging out process memory; there is an old performance setting "Optimize for programs server", but the "Programs" setting doesn't quite cut it.

    PS: My currently open programs are: Opera Browser (18 tabs), Visual Studio 2005 + Help, MS Outlook 2003, WinCVS, Total Commander (three windows + several tabs), Word Magic Tools, Adobe Reader, EmEditor (3 documents) Calculator, Winamp, Miranda (3 accounts), OfficeScan, SoundControl, totaling about ~1GB VM size. Many programs have 30~70% memory blocks paged out. I have 2GB of memory.

  • There's another idea I forgot to mention in my previous comment:

    * When idle for some time, Windows should get back from the page file all the blocks paged out from interactive processes.

  • "While it is definitely the case that Windows itself adds functionality, we work hard to pick features that we believe benefit the broadest set of customers."

    Have you ever thought about turning the tables on this one? Let customers pick the features they believe would benefit them? Kind of like the sidebar feature in vista, where people can search through a database of widgets they can add to the sidebar.

    Provide users with the bare minimum, the core of windows, then provide them with a database (with good explanations of what the feature is and does) so they themselves can pick what they feel/think is necesarry.

    For someone who writes alot, he could add tablet software, language packs, writing tools etc, while someone who only plays games could just add support for old/new games, directx and stuff.

    Pants optional is the way to go!

  • @sniper511 -- Hi there.  I am sorry I might not have been totally clear for you.  The basic view is that more can be less--background and caches are two examples of where using more CPU or more memory for something means using "more" but those both can make things faster (not appear faster, but actually be faster).  That's the tradeoff I was referring to.

    The broader point (@wolferey, for example) is that I think we're seeing that there is one thread of feedback that says to start from some definition of minimum and then build things up from there--we're definitely in sync on understanding this.  Today in Windows Vista we have two ways to do that--first you can pick Windows Home Basic and add your own software, or you can pick a more "feature-oriented" version.  With that you can then customize what is running through the "Windows Features" control panel (or via other means available within Windows depending on the feature).  Most of the items mentioned by many people can be turned off along those lines (tablet PC, speech, language support, etc.), some features can be controlled via options (sidebar and gadgets, indexing) and then there are many of the user-interface elements that can be altered via the advanced performance settings.  And "Set Your Default Programs" can make sure that you launch only the software you want to launch for any given protocol/file type (for pictures, for example).


  • One of my frustrations when dealing with boot-up and login time is the lack of control over what applications, services, and other processes get started at run time.  Having to go into the registry and hunt down all the potential holes is frustrating.  What I would like to see is a centralized control panel applet that allows administrators to control the start-up process and eliminate the "junk" the accumulates.  In addition, the panel would allow administrators to easily create different start-up profiles depending on use of system.

  • Thanks, wonderful detailed post, I really appreciate the time you spend on the community (but were still thirsty for knowledge ^^).

    I think the problems you adressed could be solved by just give the user a bit more configuration options. For example if I´d like to "tune" my system without buying new hardware I have very few options: Switch to Win2000 style - never. Defrag...doesnt really the way, got worse with Vista, still too less options and not as powerful as other apps. What else ? The "Performance Information and Tools" dialog is quite nice, helps a bit.

    But what I think would was really cool: modular windows. Please, tell us if its doable. So many people I know would like to turn things off, just to alleviate the system a bit. Take a look at vLite - THIS should be integrated into Windows 7.

  • Steve,

    I have to agree with the above; in letting the user choose what he/she wants.

    Obviously have a 'typical' installation option but also the advanced one.

    ButIi believe this is not the only problem with Windows, this being a different point completely and that is... there is so much software out there (made by MS) which effectively does the same thing.

    I mean like a general picture gallery viewer:

    You have the standard viewer, you have the MS Office picture viewer, you have the windows live gallery viewer just to mention a few...streamline it all into one or make it in such a way that rather then creating different apps let it add extensions to the original.

    Another example is the 'address book' its so badly integrated into the system that if I have Outlook installed then it doesn’t synchronise between the two.

    Another example is the mail client... we have Outlook express (or whatever its called now), we have windows desktop live mail and we have Microsoft Office Outlook...each one running independently of the other. Streamline the whole thing give it polish, its these small things that people see and generate their opinions from.

    And I know this is a Windows 7 blog, but what about all of us that paid that extra for Vista Ultimate?? I mean if you’re going to count language packs as being an ‘extra’ then don’t expect a lot of custom for windows 7 ‘ultimate’.

    Another point, the sidebar had/still does the potential for being so so much more except it just wasn’t exploited, Microsoft rather then jumping from one ship to the next; have a clear idea what you want and produce end to end solutions. Just take a look the concept shots from around 2003 of what you wanted in the sidebar and look at the mostly 3rd party add ons out there now. There are soo many ideas for gadgets out there and its Microsoft that needs to get behind them and build them rather then leave it to the 3rd party developers. Windows live messenger gadgets, better integration with Microsoft Outlook and so on and so forth, rather then leaving it to the 3rd party at least for essential gadgets mentioned above MS should develop.

  • I think what hits most people in terms of performance is the initial boot into the OS, If MS somehow could control what applications are loaded on startup we wouldnt have so many complaints of windows being so slow.

    At the moment every software house wants to load an 'updater' tool into startup...seems to be in fashion i think?lol, it just means that windows boots slow.

    I think if windows made that part of the registry protected then that may help.

  • Most people I know today rarely ever shut down their computer because it takes too long. They just leave it running. I liked Vista's improvements to shutdown but it took a while to figure out what different features were. For example, there is now sleep, hibernation and hybrid sleep, sometimes only one of these options appears on the shut down menu while other times, there may be more. This could be very confusing to the average user. Also, by default, the power button on the start menu does not shut down the computer which makes no sense to me and it is also hard to change this setting.

  • Someone above has pointed out the elephant in the corner all right in nLite/vLite. I think when it has got to the stage where a 3rd party developer has produced a tool that lets people get at the Windows actual install process and strip out the fat, then people setting the goals for Windows need to sit up and pay attention. This is a tool that's not just being used by server managers, IT directors, or hardcore nerds, it's being used by everyday John Doe's, and it actually solves and addresses a lot of the points that are being brought up in this blog.

    This tool does the one thing people are calling for: to have control over the OS that they're getting. You mentioned above that Vista has the tools and controls to do a lot of "asset stripping" and asset control, and you're right, I think a lot of people's performance complaints would be solved if they were prepared to poke about under the hood a bit. The problem is not so much that Vista can't do it, it's that Vista defaults to making us do it. Why should I install Vista, then spend hours removing all the bits I never wanted? nLite reverses that system: We, the users decide what we want *before* the OS goes in. That's a gem of an idea. Let us create "install profiles" which can be saved in a file. Then, if you ever have to re-install, you can just point the installer to the install profile file and say "Do that!"

    PS: Bring Explorer back to the original, functional style.

    I am going to end all of my posts with that sentence it's so important.

  • I just want to point out that window vista performance has nothing very little to do with hardware users use. Unlike other OS, increase in hardware and memory or better HD doesn't increase in performance for vista. I have quad-core with 4Gig memory and sata drive; by jaw dropped the first time I used vista; the performance is un freaking believable (and nothing changed since then, though SP2 is a bit better).

    Word of advice when it takes 4-5 from boot time to workable state; something is wrong somewhere.

    I also use Linux, it takes me 50 seconds load on this powerful system.

    Macbookpro on a inferior hardware, takes less time to boot up.

    I am not going to rant on which OS is better but its a good thing to compare yourself to other OS in performance and see where you stand.

    I appreciate (again and again) for taking the initiative to talk to windows users to see where we stand. There are some satisfied users, but make no mistake that there are a lot of disgruntled users. The only thing that's keeping me from dumping windows is because I am a long time windows users and I have this emotional attachment to it (I know, it's weird). But if this keeps going on with the next windows version, I think you guys will loose a lot of faithfull users, you have long alienated.

    This is a what I want on windows 7:

    - not six different version of window. 2 versions, one for home user, one for professional user; ie company - corporation. Simple, easy on the point.

    - Security should be an integrated part of the system, not a user generated "do you want this?", "do you want that?" crap.

    - fast boot time. I dont want 5 minutes for my system to load. very simple.

    - Why should we have to worry about fragmented disk. Either make a smart option where system automatically defragmenting disk in the background, with user having to ask them to do it when system is sluggish; or use a superior file system, where fragmenting is not even an option. In the year 2008, why should any operating system in their right mind worry about defragmenting their disk?

    - There is much more to be desired from windows aero effects. As far as the windows layout is concerned what has changed since windows 95? Windows need both revolutionary and evolutionery changes in most part of user experience.

    - Performance - performance - performance. Do the people who worked on windows vista still have their job? How can they sleep at night, knowing what a shameful product they created or was part of?

    Sorry for all the rants, but there is a lot of hidden anger towards windows vista and mostly towards Microsoft for the way they have handled some of their products. As if someone is intentionally screwed up. I don't think I could have intentionally screw up with windows vista so badly...

    Keep up the good work. Hopefully we will see some good results from you guys.

  • Great post, many thanks...quick question here, how can I become a Windows 7 Beta Tester?

    Thanks -

    Keith Johnson,

    Hallandale, FL

Page 2 of 8 (113 items) 12345»