Windows 8 and 8.1 Forums


Delivering fast boot times in Windows 8

  1. #1

    Delivering fast boot times in Windows 8


    When it comes to talking about "fundamentals" we want to start with boot time – no feature gets talked about and measured more. We designed Windows 8 so that you shouldn't have to boot all that often (and we are always going to work on reducing the number of required restarts due to patching running code). But when you do boot we want it to be as fast as possible. This is a very deep topic and we have a lot of folks focused on it. We made a bigger leap in this area with Windows 8 than we have in a long time due in no small part to cooperation across the whole ecosystem. Gabe Aul, a director of program management in Windows, authored this post (a first in what will be a series of posts on fundamentals).
    --Steven
    Few operations in Windows are as scrutinized, measured, and picked apart as boot. This is understandable—boot times represent an effective proxy for overall system performance and we all know the boot experience is an incredibly important thing for us to get right for customers. Data shows that 57% of desktop PC users and 45% of laptop users shut down their machines rather than putting them to sleep. Overall, half of all of users shut down their machines rather than putting them to sleep.

    Qualitatively, people say they prefer to shut down because they want to have their PC completely “off” so that it uses no power – either to preserve battery life or to reduce their energy use. Hibernate is also a good option for this since it similarly has no power draw, and many people really like it. However, it’s clearly not for everyone, since one of the other things we’ve heard is that many people want to turn their PCs on and have it be a “fresh start” rather than running all of the stuff from their previous session. Sleep/resume is the best option for fast on/off transitions on today’s PCs, but it still consumes some power in order to preserve the contents of RAM, which means battery drain – even if it’s only a little bit on a well optimized system. All of this is happening with the backdrop of how we all use our mobile phones today, which is almost never restarting them, and always using what feels closest to a sleep-like state.
    Our challenge then, was to design a way to meet all of these desires on today’s PCs without requiring some special new hardware. These were our goals:

    • Effectively zero watt power draw when off
    • A fresh session after boot
    • Very fast times between pressing the power button and being able to use the PC.

    In Windows 7 we made many improvements to the boot path, including parallel initialization of device drivers, and trigger-start services, but it was clear we’d have to get even more creative (and less incremental) if we hoped to get boot performance anywhere close to fast enough to meet all of these needs.
    Our solution is a new fast startup mode which is a hybrid of traditional cold boot and resuming from hibernate.
    Before I go into exactly how it works though, a little background is probably helpful on how shutdown and boot works today in Windows 7.
    Shutdown entails:

    1. The user initiates a shutdown by selecting “shut down” from the Start menu, or by pressing the power button; or an application initiates shutdown by calling an API such as ExitWindowsEx() or InitiateShutdown().
    2. Windows broadcasts messages to running applications, giving them a chance to save data and settings. Applications can also request a little extra time to finish what they’re doing.
    3. Windows closes the user sessions for each logged on user.
    4. Windows sends messages to services notifying them that a shutdown has begun, and subsequently shuts them down. It shuts down ordered services that have a dependency serially, and the rest in parallel. If a service doesn’t respond, it is shut down forcefully.
    5. Windows broadcasts messages to devices, signaling them to shut down.
    6. Windows closes the system session (also known as “session 0”).
    7. Windows flushes any pending data to the system drive to ensure it is saved completely.
    8. Windows sends a signal via the ACPI interface to the system to power down the PC.

    And boot entails:

    1. After pressing the power button, the PC’s firmware initiates a Power-On Self Test (POST) and loads firmware settings. This pre-boot process ends when a valid system disk is detected.
    2. irmware reads the master boot record (MBR), and then starts Bootmgr.exe. Bootmgr.exe finds and starts the Windows loader (Winload.exe) on the Windows boot partition.
    3. Essential drivers required to start the Windows kernel are loaded and the kernel starts to run, loading into memory the system registry hive and additional drivers that are marked as BOOT_START.
    4. The kernel passes control to the session manager process (Smss.exe) which initializes the system session, and loads and starts the devices and drivers that are not marked BOOT_START.
    5. Winlogon.exe starts, the user logon screen appears, the service control manager starts services, and any Group Policy scripts are run. When the user logs in, Windows creates a session for that user.
    6. Explorer.exe starts, the system creates the desktop window manager (DWM) process, which initializes the desktop and displays it.

    There are a lot more specific details here, if anyone wants to go deeper: http://msdn.microsoft.com/en-us/wind...dware/gg463386
    The key thing to remember though is that in a traditional shutdown, we close all of the user sessions, and in the kernel session we close services and devices to prepare for a complete shutdown.
    Now here’s the key difference for Windows 8: as in Windows 7, we close the user sessions, but instead of closing the kernel session, we hibernate it. Compared to a full hibernate, which includes a lot of memory pages in use by apps, session 0 hibernation data is much smaller, which takes substantially less time to write to disk. If you’re not familiar with hibernation, we’re effectively saving the system state and memory contents to a file on disk (hiberfil.sys) and then reading that back in on resume and restoring contents back to memory. Using this technique with boot gives us a significant advantage for boot times, since reading the hiberfile in and reinitializing drivers is much faster on most systems (30-70% faster on most systems we’ve tested).

    Sample of test results from System Integration Test lab systems.
    Click to see a bigger version of this chart.
    It’s faster because resuming the hibernated system session is comparatively less work than doing a full system initialization, but it’s also faster because we added a new multi-phase resume capability, which is able to use all of the cores in a multi-core system in parallel, to split the work of reading from the hiberfile and decompressing the contents. For those of you who prefer hibernating, this also results in faster resumes from hibernate as well.

    Representation of different phases between cold boot and fast startup.
    Click to see a bigger version of this chart.
    It’s probably worth mentioning quickly how we treat the hiberfile—if you read this and immediately went and did a dir /s /ah hiberfile.sys you would have found that it’s a pretty big file on disk. The hiberfile is sized by default at 75% of physical RAM. The file is essentially a reservation for hibernation data that will be written out as the system is dropping into hibernation. Typically much less space is actually used, and in the case of our fast startup usage, it’s typically ~10-15% of physical RAM but varies based on drivers, services, and other factors. The system also treats the hiberfile slightly differently than other files on disk, for example, the Volume Snapshot service ignores it (a small performance benefit.) You can disable hibernation and reclaim this space by running powercfg /hibernate off from an elevated command prompt. But be aware that if you do this, it will disable hibernation completely, including some nice capabilities like fast startup as well as hybrid sleep, which allows desktop systems to do both a sleep and hibernate simultaneously so if a power loss occurs you can still resume from the hibernated state. You can also run powercfg /hibernate /size and specify a value between 0 and 100 for the percentage of physical RAM to reserve for the hiberfile – but be careful! Specifying too small a size can cause hibernation to fail. In general, I recommend leaving it enabled at the default value unless you’re working on a system with extremely limited disk space.
    Another important thing to note about Windows 8’s fast startup mode is that, while we don’t do a full “Plug & Play” enumeration of all drivers, we still do initialize drivers in this mode. Those of you who like to cold boot in order to “freshen up” drivers and devices will be glad to know that is still effective in this new mode, even if not an identical process to a cold boot.
    This new fast startup mode will yield benefits on almost all systems, whether they have a spinning HDD or a solid state drive (SSD), but for newer systems with fast SSDs it is downright amazing. Check out the video below to see for yourself:
    Your browser doesn't support HTML5 video.
    Download this video to view it in your favorite media player:
    High quality MP4 | Lower quality MP4
    One thing you’ll notice in the video was how fast the POST handoff to Windows occurred. Systems that are built using Unified Extensible Firmware Interface (UEFI) are more likely to achieve very fast pre-boot times when compared to those with traditional BIOS. This isn’t because UEFI is inherently faster, but because UEFI writers starting from scratch are more able to optimize their implementation rather than building upon a BIOS implementation that may be many years old. The good news is that most system and motherboard manufacturers have begun to implement UEFI, so these kinds of fast startup times will be more prevalent for new systems.
    Of course, there are times where you may want to perform a complete shutdown – for example, if you’re opening the system to add or change some hardware. We have an option in the UI to revert back to the Windows 7 shutdown/cold boot behavior, or since that’s likely a fairly infrequent thing, you can use the new /full switch on shutdown.exe. From a cmd prompt, run: shutdown /s /full / t 0 to invoke an immediate full shutdown. Also, choosing Restart from the UI will do a full shutdown, followed by a cold boot.
    Boot work is mostly owned by our Kernel Platform Group, but a number of teams came together in Windows 8 to make changes across the OS to support this new mode, plus other exciting boot changes that we’ll talk about very soon. We’re really enjoying the boot performance of Windows 8 in our internal use, and are looking forward to you being able to try it for yourselves so you can let us know what you think.
    Gabe Aul

    More...

      My System SpecsSystem Spec

  2. #2


    Posts : 5,707
    Windows 8.1 Pro


    Very intersting indeed! Oh my gravy, that boot up time from solid state, IMPECCABLE!! I don't know what to say! I am shocked and awed!
      My System SpecsSystem Spec

  3. #3

    Windows 8 instant boot


    The software giant has been working hard to improve boot times in Windows 8. is a fundamental metric that is widely discussed for Windows systems. “Few operations in Windows are as scrutinized, measured, and picked apart as boot,” admits Microsoft’s Gabe Aul in a blog post on Thursday. “We all know the boot experience is an incredibly important thing for us to get right for customers.” More below,

    Microsoft reveals incredible instant boot feature of Windows 8 | WinRumors
      My System SpecsSystem Spec


  4. #4


    Suffolk, UK
    Posts : 33
    Win 8 pro X64


    Looks good, thanks for the info!
      My System SpecsSystem Spec

  5. #5


    I'm looking forward and waiting for something really good.
      My System SpecsSystem Spec

  6. #6


    Nice post Oddball

    ~

    Ops. Sorry for double post
    Last edited by vrosa; 09 Sep 2011 at 22:38.
      My System SpecsSystem Spec

  7. #7


    So Cal
    Posts : 151
    Windows 7 Ultimate 64 bit Steve Ballmer Signature Edition

    Booting Windows 8 in 2 seconds


    Microsoft has been explaining its efforts to make Windows 8 start up faster, and with suitable hardware, it's now possible to get the boot time below 2 seconds. This is unlikely to make a huge difference to Windows 7 users, who should already enjoy boot times of around 15 to 45 seconds with conventional hard drives. However, Windows 8 is also destined for use on tablets, where relatively speedy starts are more common.
    More here from ZDNet:
    Booting Windows 8 in 2 seconds | ZDNet UK
      My System SpecsSystem Spec

  8. #8


    Bathurst
    Posts : 7
    Windows 7 Pro x64 Retail


    If boot times are faster that means it's going to be awesome! My desktop never had Vista, but Vista boots faster than Win 7 on my laptop. I guess Microsoft is getting better and better!
      My System SpecsSystem Spec

Delivering fast boot times in Windows 8

Similar Threads
Thread Forum
Fast Boot enabled on UEFI blocks access to Windows
Hi, I restored UEFI to default settings and after that I couldn't get into Windows anymore, I just get into UEFI all the time after every reboot. No Windows. So I started to try and change things and finally found out that Fast Boot enabled is the culprit. If I disable it, I can get into...
General Support
Problem with windows 8.1 Fast Start up (hybrid boot)
I recently installed windows 8.1 and there is a problem with the windows Fast Start up (hybrid boot) feature as sometimes it works and windows starts very fast and sometimes it doesn't starts fast but just take sometime to start as if I started from a cold boot. I tried everything from inside...
General Support
How to (re)boot Windows 8.1 fast and without problems ?
Hello, The last couple of days, when I (re)boot my PC (Windows 8.1) I experience the following : - all desktop icons are visible, but only a few are as it should be (others : white) - after seconds, only "this PC" and "wastebasket" icons are OK; all others become white - internet...
General Support
Windows to Go - No Fast boot option
Hi there Windows to go doesn't seem to have a Fast boot option -- Not a real issue since I use an SSD for this but just curious. I suppose if Windows to Go is being used on different computers and the idea is to use the external device totally then it obviously doesn't make sense to store a...
General Support
Long 5-10 boot times on windows 8.1.
In the last couple of months the time it takes my laptop to show the start screen, I have tried numerous ways to help increase the like disabling unimportant services and disabling some startup programs.
General Support
Please Help! Some times Windows 8 would crash on boot up
Some times Windows 8 would crash after boot up. This is the message I received 17710
BSOD Crashes and Debugging
Intel SSD to boost Windows 8 boot, wake times
Source A Guy
Windows 8 News

Eight Forums Android App Eight Forums IOS App Follow us on Facebook