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.

--Steven

Leave a Comment
  • Please add 2 and 8 and type the answer here:
  • Post
  • A great post about the complexity oif making the choice, but how about this for a simple guiding principle:

    On a 2Gb Core 2 system, no feature/function should be slower than it was on a 1G Pentium M XP system.

    This is certainly not the case today and why many of us have said performance is issue #1.

  • Well, I am going to stick my neck out here and say that I loved the improvements to Vista for standby and resume. It is very fast, and it improved further in SP1. For resume, it looks like the screen display is restored first, and then the other devices - (good psychology to make it seem faster!) but if I was to ask for one improvement, it is that the screen comes up with a password prompt in my case, but the keyboard takes its time to be resumed/restored, so I am left pressing keys trying to input my password, trying to see if the keyboard is working yet. Perhaps the keyboard could be restored as the second device? My system is an HP laptop, nc8430 running Vista 32 and a pretty much standard HP config. Cheers folks.

  • PLS no Crapware in WIndows 7 (OEM productor)

  • What I lack mentioning in these posts about performance is the Microsoft developer experience in writing effective code.

    Not only Windows has been suffering from sluggish performance lately, but also Office, IE 7, System Center products, etc.

    Like we heard about the security from Microsoft a few years ago, that it became a concern of highest priority, that every developer had obligatory courses on how to write as secure code as possible and we, customers, really saw the fruits of that - first in XP SP2, later Vista and other products.

    So needs the focus on the performance to come back to Microsoft now at a very high level - we've seen so much about the "bloated code" from the customers and press, they're not out of nowhere. Not new code with new features, but old code needs to be reviewed and made more effective.

  • Thanks for an informative post about the basics of how you guys gauge performance. I'm quite looking forward to the promise of more details on boot/start-up next time, as it's an area which could always use improving - as you say, it can never really be fast enough!

    Just reading the comments on these posts tells me it's a bloody hard job for you guys to balance people's needs - like the typical example of all the people on these comments, some saying "there were way too many versions of Windows Vista" versus those saying they want different versions to allow different experiences. I was thinking, is it at all possible to please both camps by selling just one flavour of Windows which would have on the disc(s) the equivalent of Windows Vista Ultimate (i.e. all the features from all the lower versions). Then you have an option at the start of the install that asks the user whether they want to install Windows 7 Basic, Windows 7 Media, Windows 7 Gaming, Windows 7 Pro, Windows 7 Ultimate or a Windows 7 Custom where they can DIY their install and choose exactly what is or isn't installed.

    Obviously the name suggestions are just ones I've pulled out of my head in 30 seconds to demonstrate the point, I have no idea what different levels you'd choose yourself. It just seems like a good way to put one single version of Windows on the shelf so people always know they're buying what they need and you can please people who want that, while still offering that level of choice and customisability that you get from having different default installations.

    I imagine the team that writes the installer part of Windows 7 is rolling their eyes at this suggestion, either because it's technically implausible or because it's a much bigger undertaking than I can comprehend, but I figure any suggestion at all is better than me just saying "fix x, y or z" without trying to put myself in your shoes and actually put forward something constructive, if completely ignorant of how it all works.

  • Here's my take on Windows performance:  A clean install of Windows performs very well.  Over time, Windows performance degrades.  In my opinion this is Windows weakest area, and you didn't address it here.

    Why does Windows slow down over time, and more importantly, how can Windows protect itself from this?

    If you can eliminate having to "re-pave" your system every year to regain the performance that a fresh install gives, now that would be a reason to upgrade.

  • You say that a must have feature for one user is a no-no for another. Why not provide the option to the user - split the OS up at setup so the user chooses what they want. If they want the pretty fun UI, let them have it, if they want the windows 2000 UI, let it be.

  • 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.

    So is important to react when something is as slow or slower and takes the double of the space.

    What I would really like to see in this blog is a roadmap. So far I've read a bunch of excuses on how difficult it is to please everyone when asking totally different things. So, I guess that is up to you to choose what is really important (eg: eye candy vs speed and usability) and stick to it! The worst that can happen is something like vista that does not seem to please either group and get stuck somewhere in the middle.

    Don't get me wrong.. this discussion you are having here is important.. but meaningless if no conclusions are taken.

  • I really hope you really take lots of effort on improving the performance. I red somewhere that Windows 7 would not require _much_ more power from the computer than Vista. Since Vista is very bloated, a fact no one can deny, I remain quite sceptical about the thing you wrote here.

    The big issue with all windows releases have been that you simply cannot leave those dozens of useless components and services unistalled and unstarted automatically in the install. Every time I reinstall windows (no need to do this as regular as before thou), I have to go through a list of services I will never use, and shut down those by hand. But I they still exist on the hard drive. I'm sure HDD space is cheap today (but also cosider the SSDs), but I'm sure there is even _some_ files in the few GBs that could be left off.

  • Performance is a real tricky subject. Sometimes it's measurable, you can time stuff. Other times it's subjective, "it just feels slow"

    One of the plus points to Vista in my opinion is that the GUI is snappy and responsive. Others that maybe don't have the hardware complain that it's fat slow useless eye candy. A point I have mentioned in other replays, If a cheap Dell laptop can handle Vista and your PC can't you are running the wrong OS for your hardware. New versions of Windows is for new computers. So please no more calls for Win7 to run on old kit! and then mention the poor performance...

    One type of performance that hasn't been mentioned is one of productivity. Not the OS but the user! If the GUI is complicated or causes the user to do stuff in a strange way it becomes a barrier to productivity. A well designed GUI should be an aid to productivity. How much faster does a computer feel if you can quickly get a task completed. How bad dose it feel if you have to do battle with your PC to get stuff done.

    So a snappy and responsive desktop with a task orientated GUI. I would like the opportunity to define what those tasks are. Even complicated multi step stuff with a single click once I have set it up.

    Most of the rest of the stuff, the hardware will take up the slack. This shouldn't be used to cover poor code or sloppy integration of moduals. But no one sets out to wright sloppy code.

    Please don't fall pray to the nay sayers that call for Win7 to run fast on slow computers. If you do we will not get the feature rich Windows experience we have come to expect from MS. It has to be super fantastic with eye candy, toys, productivity. Because you charge for your product, and charge a lot in a market where nobody else does...

  • You have time to make W7 closer to perfection.

    I believe performance is #1 perfection point.

    There are many problems with WV performance, and that's because, i believe, there were a lot of 'macro-optimizations', instead of 'micro-optimizations' which were favored before.

    - Spend more time polishing. There is too much small things were done badly in WV, and team leaders must know (otherwise what leaders they are?!)

    - Optimize common code. Count how much different PNG/JPG 'codec' implementations are in WV? I can count about 10.

    - Remove dead resources and files hanging from alphas/betas/DOS-81...

    - Throw WinSxS please. That was the worst design decision ever possible. The closest example i can think of are cheap game makers filling files with random bytes to make game cost more CDs and more money.

  • Quoting: "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."

    I just about hit the floor when I read those two lines.  When, exactly, is this NOT the case?!  The less CPU time, disk time, memory is being used up by background processes, the more nimble the system should be in running on-demand processes.

  • As a response to Pentagon's post.

    This is really a thing I have wondered many years now. How can the new OS's be so heavy? The programming tools evolve, compilers have better optimizing capabilities, HW doubles it's capacity once in a while, the programmers have more and more knowledge about programming... But still when a new OS comes, I need a high end hardware to run it.

    The new features are ok, but the really new features are few - most of the new things just replace something old. Many of the waited features were left off the Vista release.

    The improved security is great, but the lack of security is usually just thing done wrong in the previous products.

    I just cannot understand how change of one OS version goes beyond 6 years or PC hardware development. I really cannot.

    New hardware is an easy way to hide and forget the heaviness of a new OS. We the customers should not accept that so easily. Of course I can buy new hardware, but I got perfectly functional computers I cannot buy a Windows for. That is wrong.

  • I can think of a case when using MORE means better performance. At a given point in time unused RAM can be sheer waste. If an OS utilises some of that "unused" RAM by preloading certain things so that when we need to use them we don't have for wait them to be read from hard disk.

    Because the RAM was NOT being used, it didn't impact performance and preloading saved our time and improved performance.

    If the user requires RAM for any process that wasn't already loaded in RAM and the available RAM wasnt sufficient, the OS should be able to release that RAM it used for preloading.

    This is exactly what Vista does, I believe. And that is why I like it.

    And I am only an accountant.

  • Perhaps, since Microsoft is intent on following some of Apple's paths (I know, they won't admit that, and I understand), they could do what the Mac OS does for applications and do away with the registry altogether. Have applications maintain their own settings and info themselves. This would eliminate hostile take-overs by drive-by downloads or rogue applications installed by third party applications. For OS specific configurations, have a skeletal hive that maintains a minimum of settings and the rest are handled by the apps themselves. This would greatly improve performance, since I've noticed that the registry is about 40% the reason for performance slow-downs over time. Mostly because uninstalled apps tend to leave drops of their blood in there even though they were removed.

Page 1 of 8 (113 items) 12345»