Notes on comments.
Welcome to our blog dedicated to the engineering of Microsoft Windows 7
Ed. Note: This is our first post from a senior member of the development team. Allow me to introduce Michael Fortin who is one of Microsoft’s Distinguished Engineers and leads the Fundamentals feature team that is in our Core Operating System group. Michael leads performance and reliability efforts across the Windows platform. --Steven (PS: Be sure to visit www.microsoft.com/ie and try out the beta 2 release of Internet Explorer 8).
For Windows 7, we have a dedicated team focused on startup performance, but in reality the effort extends across the entire Windows division and beyond. Our many hardware and software partners are working closely with us and can rightly be considered an extension to the team.
Startup can be one of three experiences; boot, resume from sleep, or resume from hibernate. Although resume from sleep is the default, and often 2 to 5 seconds based on common hardware and standard software loads, this post is primarily about boot as that experience has been commented on frequently. For Windows 7, a top goal is to significantly increase the number of systems that experience very good boot times. In the lab, a very good system is one that boots in under 15 seconds.
For a PC to boot fast a number of tasks need to be performed efficiently and with a high degree of parallelism.
Because systems and configurations differ, boot times can vary significantly. This is verified by many lab results, but can also be seen in independent analysis, such as that conducted by Ed Bott. Sample data from Ed’s population of systems found that only 35% of boots took less than 30 seconds to give control to the user. Though Ed’s data is from a small population, his data is nicely in line with what we’re observing. Windows Vista SP1 data (below) also indicates that roughly 35% of systems boot in 30 seconds or less, 75% of systems boot in 50 seconds or less. The Vista SP1 data is real world telemetry data. It comes to us from the very large number of systems (millions) where users have chosen to send anonymous data to Microsoft via the Customer Experience Improvement Program.
From our perspective, too few systems consistently boot fast enough and we have to do much better. Obviously the systems that are greater than 60 seconds have something we need to dramatically improve—whether these are devices, networking, or software issues. As you can see there are some systems experiencing very long boot times. One of the things we see in the PC space is this variability of performance—variability arises from the variety of choices, and also the variety of quality of components of any given PC experience. There are also some system maintenance tasks that can contribute to long boot times. If a user opts to install a large software update, the actual updating of the system may occur during the next boot. Our metrics will capture these and unfortunately they can take minutes to complete. Regardless of the cause, a big part of the work we need to do as members of the PC ecosystem is address long boot times.
In both Ed’s sample and our telemetry data, boot time is meant to reflect when a machine is ready and responsive for the user. It includes logging in to the system and getting to a usable desktop. It is not a perfect metric, but one that does capture the vast majority of issues. On Windows 7 and Vista systems, the metric is captured automatically and stored in the system event log. Ed’s article covers this in depth.
We realize there are other perceptions that users deem as reflecting boot time, such as when the disk stops, when their apps are fully responsive, or when the start menu and desktop can be used. Also, “Post Boot” time (when applications in the Startup group run and some delayed services execute), the period before Windows boot is initiated, and BIOS time can be significant. In our efforts, we’ve not lost sight of what users consider being representative of boot.
Before discussing some of our Windows 7 efforts, we’d like to point out there is considerable engagement with our partners underway. In scanning dozens of systems, we’ve found plenty of opportunity for improvement and have made changes. Illustrating that, please consider the following data taken from a real system. As the system arrived to us, the off-the-shelf configuration had a ~45 second boot time. Performing a clean install of Vista SP1 on the same system produced a consistent ~23 second boot time. Of course, being a clean install, there were many fewer processes, services and a slightly different set of drivers (mostly the versions were different). However, we were able to take the off-the-shelf configuration and optimize it to produce a consistent boot time of ~21 seconds, ~2 seconds faster than the clean install because some driver/BIOS changes could be made in the optimized configuration.
For this same system, it is worth noting the resume from sleep time is approximately 2 seconds, achieving a nearly instant on experience. We do encourage users to choose sleep as an alternative to boot.
As an example Windows 7 effort, we are working very hard on system services. We aim to dramatically reduce them in number, as well as reduce their CPU, disk and memory demands. Our perspective on this is simple; if a service is not absolutely required, it shouldn’t be starting and a trigger should exist to handle rare conditions so that the service operates only then.
Of course, services exist to complete user experiences, even rare ones. Consider the case where a new keyboard, mouse or tablet HW is added to the system while it was off. If this new HW isn’t detected and drivers installed to make the HW work during startup, then the user may not be able to enter their credentials and log into the machine. For a given user, this may be a very rare or never encountered event. For a population of 100s of millions of users, this can happen frequently enough to warrant having mechanisms to support it. In Windows 7, we will support this scenario and many others with fewer auto start services because more comprehensive service trigger mechanisms have been created.
As noted above, device and driver initialization can be a significant contributor as well. In Windows 7, we’ve focused very hard on increasing parallelism of driver initialization. This increased parallelism decreases the likelihood that a few slower devices/drivers will impact the overall boot time.
In terms of reading files from the disk, Windows 7 has improvements in the “prefetching” logic and mechanisms. Prefetching was introduced way back in Windows XP. Since today’s disks have differing performance characteristics, the scheduling logic has undergone some changes to keep pace and stay efficient. As an example, we are evaluating the prefetcher on today’s solid state storage devices, going so far as to question if is required at all. Ultimately, analysis and performance metrics captured on an individual system will dynamically determine the extent to which we utilize the prefetcher.
There are improved diagnostic experiences in Windows 7 as well. We aim to quickly identify specific issues on individual systems, and provide help to assist in resolving the issues. We believe this is an appropriate way to inform users about some problems, such as having too many startup applications or the presence of lengthy domain-oriented logon scripts. As many users know, having too many startup applications is often the cause of long boot times. Few users, however, are familiar with implications of having problematic boot or logon scripts. In Windows XP, Vista and in Windows 7, the default behavior for Windows is to log the user into the desktop without waiting for potentially lengthy networking initialization or scripts to run. In corporate environments, however, it is possible for IT organizations to change the default and configure client systems to contact servers across the network. Unfortunately, when configuring clients to run scripts, domain administrators typically do so in a synchronous and blocking fashion. As a result, boot and logon can take minutes if networking timeouts or server authentication issues exist. Additionally, those scripts can run very expensive programs that consume CPU, disk and memory resources.
In addition to working on Windows 7 specific features and services, we are sharing tools, tests and data with our partners. The tools are available to enthusiasts as well. The tools we use internally to detect and correct boot issues are freely available today here as a part of the Windows Performance Toolkit. While not appropriate for most users, the tools are proving to be very helpful for some.
One of the topics we want to talk about in the future which we know has been written about a great deal and is the subject of many comments, is the role that additional software beyond the initial Windows installation plays in overall system performance. The sheer breadth and depth of software for Windows means that some software will not have the high quality one would hope, while the vast majority is quite good. Microsoft must continue to provide the tools for developers to write high performance software and the tools for end-users to identify the software on their system that might contribute to performance that isn’t meeting expectations. Windows itself must also continue to improve the defensive tactics it uses to isolate and inform the end-user about software that might contribute to poor performance.
Another potential future topic pertains to configuration changes a user can make on their own system. Many recommended changes aren’t helpful at all. For instance, we’ve found the vast majority of “registry tweak” recommendations to be bogus. Here’s one of my favorites. If you perform a Live search for “Enable Superfetch on XP”, you’ll get a large set of results. I can assure you, on Windows XP there is no Superfetch functionality and no value in setting the registry key noted on these sites. As with that myth, there are many recommendations pertaining to CPU scheduling, memory management and other configuration changes that aren’t helpful to system performance.
Startup is one topic on performance. As described in the previous post we want to continue the discussion around this topic. What are some of the elements you’d like to discuss more?
Glad to hear some of your new ideas. Reducing system services sounds great to me!
I'd like to know more about performance throttling scenarios when a user unplugs. I'm assuming / hoping that WPF will be used more widely in the W7 shell and I'm just wondering how the experience will degrade nicely such that I still get a rich experience while not allowing the GPU to chew through battery.
Thanks for all the detail in these posts. IE8 B2 has me really impressed and I'm hoping its just a preview of whats to come in Windows 7 in terms of an overall focus on usability.
"Our perspective on this is simple; if a service is not absolutely required, it shouldn’t be starting and a trigger should exist to handle rare conditions so that the service operates only then. "
This snippit I noted above is the most interesting in the post. It goes one step further from just saying "we are making it faster" it deals with a possible solution of how to do so. Not only that, but it is simple in explaination, and makes sense.
Sure, this could be a bit of a tiny engineering feat, but the payoff of something like this would be interesting, if it ends up in the next release.
Nice first post "Perf" and thank you for giving us some incite on how the team is building Windows 7.
A few manufacturers started integrating OS (typically a Linux image) with BIOS. And, I think it is a great idea. In many cases you need only one thing: connect to a network and open up a browser or run a business application (e.g. payment terminals).
It would be great if we had an option of "disk-less" Windows OS core residing in an EEPROM (BIOS). Also, it can be used to host Windows installation process.
I'd love to see a post on how you intend to maintain system performance over long periods of use. It's no secret that installing/uninstalling programs takes a toll on the registry and system performance over time.
So let's hear about what sort of maintenance tools Windows 7 will implement to keep the system running at peak performance over long periods of time. "Disk Cleanup" hardly counts as maintenance ^_~
To me, a "Clean Install" shouldn't even be a metric that you try to promote ... because *no one* has a clean install. Everybody has different applications that they need to install ... for examples, developers may have a slew of applications and services. It is these "User Profiles" that should be touted when you talk about boot times.
You mentioned in the post that different people have different perceptions of boot time. Just to throw in my two cents ... my perception is when I can use my system to launch some application such as outlook or even as trivial as notepad. Even if the user chooses to bog their system down with a bunch of things that must start up in the beginning, there should be an easy of seeing what it is that is causing such long start times (as it happens), and to easily disable it. This should be a built-in windows feature.
I know it's easy to ask for things like that when you're not on the team, but one can dream a dream can't they? :-P
Considering that boot time is strongly connected with the application installed (even before the start up ones), one course of action would be to isolate the influence of these in the OS. Nowadays, even third party software is too much deep rooted in the OS (I'm still looking for a good reason for a software only application need a system restart - but that is another topic).
Also, discourage applications makers to put useless start ups notification icons and who knows what running in the background. That would make boot and performance much better.
Many thanks to "the Team" for listening to us and to "Perf" for this instructive explanation.
The more I read this blog the more it looks great. :thumb: Better performance has been a key demand indeed since Vista but already with Xp.
Talking boot time performance woul not be complete if we don't talk shut down performance as well.
Vista is considerably faster than Xp in that matter but we are talking w7.
'If this new HW isn’t detected and drivers installed to make the HW work during startup, then the user may not be able to enter their credentials and log into the machine."
Just disabled the service then auto-enable it on failed log in. Then on succesful log in re-disable it. Simple. At least from my point of view ;).
But I know many poeple who would say "why don't you whipe that away, instead"?
I have had nothing but problems over the years with hibernate and sleep. Even Vista still causes me grief—sometimes monitors don’t come back on , printers are no longer connected, etc. I am not complaining, but I point out that it is still not 100%. I especially notice the issues with my Tablet PC more than my desktop.
Anyway, I digress…
I am NOT a hardware guy (I am a programmer.) But I have always wondered why my mobile PCs are instant-on whereas my PCs take a minute to load (and then some if new hardware is connected.) Can’t we just go solid state and be done with all the booting, or is that a “pipe dream?”
Thank you for a great blog!
I'm getting to really like this blog more and more. It's clear, deliberate, and shows a lot of the deliberations that go into production of software.
There are some pretty big hints in this post that Windows is going to start monitoring what's going on at startup (possibly also at shutdown) and producing reports on it. That's a great idea, hopefully simple to execute, and will provide the best possible "proof" of what's going wrong with boot times.
I've noticed repeat commentary from people that defrag and disk optimisation tools aren't worth the paper they're coded on. While they may not be a panacea for all ills, they're far from useless. And surely one of the factors that benefits a clean install is a tidy disk?
One behaviour I've found great is from another free tool, TuneXp, which performs a very simple procedure: moving the boot files to the physical centre of the disk. This has produced dramatic decreases in boot time for me, and I'm not booting off a crusty 10 year old disk either. While obviously this won't benefit everyone to the same degree, it struck me as strange that this isn't default behaviour for windows - why not have an option to do this at every shutdown? Better yet, have it done as part of the install process, then lock the files before anything else gets written?
People may claim that the advent of SSD's negates the need for defrags altogether, but if SSD's suffer from significantly reduced non-sequential read/write performance, I don't see how that can be the case.
Oh, and bring back the Real Explorer Window. I want my folder tree.
Basically the problem is articulated in a different way .
Personally performance of Vista on all my PC works perfectly, but one thing clear,
even a new PC and crisp factory output should be formatted so full of crapware,
I recently bought an XPS OF 1530 (A PC overtime )
but the performance was very poor because the day one full Crapware
Google desktop, google sidebar, google search desktop
Windows sidebar, WIndows Search, etc etc.
You can do the best job in the world, but you must also make good agreements with OEM manufacturers.
otherwise all your work will remain useless, especially for less experienced USER
The concern with boot performance in Windows 7 is a good thing to hear. I disable most of the programs in my Vista by the msconfig. But and the user who don't even know about this? It could have an initialization managing more eficient for the non-IT (the laity) ones, and no more reclamations about the boot time in Windows will come. For example, when the boot time took more than 30 seconds, a wizard will be launched for the choice of the initialization programs, or something like that
Hope you can implement this.
Harping on my point in a previous comment; simply decreasing the size of every executable (exe, dll and driver) in Windows by 10% will improve boot times. I'll bet hundreds of executables could be reduced by 20-30% while improving performance.
(A simple native "Hello World" application grew by almost 20% between VC++ 6.0 and Visual Studio 2008. This is pathetic engineer.)
I would like to make three points.
1. I'm glad that you are working on boot times. Even though I've been completely converted to the Vista way of shutting down (Sleep & Hybrid Sleep) I still think it is important to make the boot process as lean as possible.
2. I really hope Microsoft is able to either convince PC manufactures to reduce the number of custom applications that are installed by default (Like the ill mannered Symantec software) or to maybe provide them a friendly framework that they can use to push their wares but at the same time not impact the Windows experience. One example I have is a poorly designed power management tool that my older Toshiba laptop had. It was error prone, not as full featured as the built in windows tool and actually overrode the built-in windows tool. I hated the fact that I could only use this tool. The only way to 'fix' it was to do a clean install. After that the standard windows power management worked just fine.
3. Thank you for dispelling one of the Windows tweak myths. There are a lot of myths that float around the internet that do nothing but promote the idea that Windows needs massive tweaking to work properly or efficiently. Such as tweaking virtual memory. I'd like to see more 'Windows Myth Busters!'
BTW, thank you for this blog.
As nice as the idea of prefetching sounds, can we go a little deeper into it? From what Ive been reading it is more or less a heuristic technique for loading applications based on startup configurations, etc.. Is the idea to keep the hd from having to read out of multiple location on disk? The issue I have with any such method is that the machine is consuming cycles and memory that I as a user have not requested. I realize the improvement for certain application startup times may be worth it to some people, but I wish a different approach was taken to achieve this end goal. For example, why not focus on trying to minimize (eliminate?) file fragmentation in the first place? Is this not technically possible for some reason?
When I read about the references to prefetching in the post, I was instantly reminded of one of my biggest gripes about Vista. Indexing, why oh why? I personally felt that constantly indexing my entire hd was not only extremely distracting, but just felt awful! Im sorry, but I simply find the idea of a “search-on-steroids” to be mind-bogglingly mundane, aggravating, and shortsighted. I hope I'm wrong about prefetching. If not, can I turn it off?