• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Delivering fast boot times in Windows 8


SGT Oddball

Member
Team Member
VIP Member
Pro User
Lost in France

Posts
431
#1
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/windows/hardware/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 Computer

System One

  • OS
    NT4 SP6
    CPU
    Cyrix 266 mmx
    Motherboard
    Jetway
    Memory
    32MB
    Graphics Card(s)
    Voodo
    Sound Card
    sb16
    Monitor(s) Displays
    14' CRT
    Screen Resolution
    800x600
    Hard Drives
    200mb Seagate
    PSU
    120w
    Mouse
    2 button
    Internet Speed
    33k

Coke Robot

New Member
Pro User
Gold Member
Posts
5,707
#2
Very intersting indeed! Oh my gravy, that boot up time from solid state, IMPECCABLE!! :shock: I don't know what to say! I am shocked and awed!
 

My Computer

System One

  • OS
    Windows 8.1 Pro
    Computer type
    PC/Desktop
    System Manufacturer/Model Number
    ASUS
    CPU
    AMD FX 8320
    Motherboard
    Crosshair V Formula-Z
    Memory
    16 gig DDR3
    Graphics Card(s)
    ASUS R9 270
    Screen Resolution
    1440x900
    Hard Drives
    1 TB Seagate Barracuda (starting to hate Seagate)
    x2 3 TB Toshibas
    Windows 8.1 is installed on a SanDisk Ultra Plus 256 GB
    PSU
    OCZ 500 watt
    Case
    A current work in progres as I'll be building the physical case myself. It shall be fantastic.
    Cooling
    Arctic Cooler with 3 heatpipes
    Keyboard
    Logitech K750 wireless solar powered keyboard
    Mouse
    Microsoft Touch Mouse
    Browser
    Internet Explorer 11
    Antivirus
    Windows Defender, but I might go back on KIS 2014

robinbredin

New Member
Member
Posts
104
#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 Computer

System One

  • OS
    Win 7
    System Manufacturer/Model Number
    Dell Inspiron 570
    CPU
    AMD x2
    Motherboard
    Dell
    Memory
    4GB
    Graphics Card(s)
    ATI HD 5670
    Hard Drives
    2 x 500GB
    PSU
    Corsair 600W
    Case
    Dell
    Keyboard
    Logitech K300
    Mouse
    Logitech G400 Gaming

Romulinx2

Self taught Loony
VIP Member
Member
Suffolk, UK

Posts
33
#4
Looks good, thanks for the info!
 

My Computer

System One

  • OS
    Win 8 pro X64
    System Manufacturer/Model Number
    Dilithium Computers Mk4
    CPU
    AMD Phenom(tm) II X4 965 Processor, 3400 Mhz, 4 Core(s), 4 Logical Processor(s)
    Motherboard
    Gigabyte GA-790XT-USB3
    Memory
    16Gb
    Graphics Card(s)
    NVIDIA GeForce GTX 470
    Sound Card
    Hi-def
    Monitor(s) Displays
    3D Lg W2363D 23"
    Screen Resolution
    1920x1080
    Hard Drives
    Loads, and a Crucial ssd 256Gb for OS.
    PSU
    1000w
    Case
    Antec 10000
    Cooling
    Big case fans + standard cpu fan
    Keyboard
    Logitech K350
    Mouse
    Coolermaster Inferno
    Internet Speed
    10Mb
    Other Info
    Home made with matchsticks (well...some lego also)
    Blu-ray drive HL-DT-ST BD-RE BH10LS30. Nvidia 3D wireless glasses (active shutter).

vrosa

Tech Addict
VIP Member
Pro User
#5
I'm looking forward and waiting for something really good. :)
 

My Computer

System One

  • OS
    Windows 10.0.10122
    Computer type
    PC/Desktop
    System Manufacturer/Model Number
    My Build - Vorttex Ultimate
    CPU
    Core i7 @ 4500 MHz
    Motherboard
    ASUS Z87-Plus
    Memory
    32GB DDR3 @ 1822 MHz (OC)
    Graphics Card(s)
    Radeon R9 280X 3GB @ 1180 / 6800 MHz
    Sound Card
    7.1 HDA
    Monitor(s) Displays
    LCD LG 22" + CRT LG 17"
    Screen Resolution
    1760 x 1320 / 1280 x 960
    Hard Drives
    1 x 240 GB SSD (System)
    3 x 500 GB HDD (Data/Media)
    1 x 2000 GB e-HDD (Backup)
    PSU
    ThermalTake 1000W PSU
    Case
    Corsair Carbide R300
    Cooling
    Corsair H60 (Push-Pull)
    Keyboard
    Microsoft Wireless Keyboard
    Mouse
    Microsoft Wireless Mouse
    Internet Speed
    60 Mbps (Down) 5 Mbps (Up)
    Browser
    IE, FF, Chrome
    Antivirus
    AVG Internet Security 2015
    Other Info
    Some wired stuff

vrosa

Tech Addict
VIP Member
Pro User
#6
Nice post Oddball :)

~

Ops. Sorry for double post
 
Last edited:

My Computer

System One

  • OS
    Windows 10.0.10122
    Computer type
    PC/Desktop
    System Manufacturer/Model Number
    My Build - Vorttex Ultimate
    CPU
    Core i7 @ 4500 MHz
    Motherboard
    ASUS Z87-Plus
    Memory
    32GB DDR3 @ 1822 MHz (OC)
    Graphics Card(s)
    Radeon R9 280X 3GB @ 1180 / 6800 MHz
    Sound Card
    7.1 HDA
    Monitor(s) Displays
    LCD LG 22" + CRT LG 17"
    Screen Resolution
    1760 x 1320 / 1280 x 960
    Hard Drives
    1 x 240 GB SSD (System)
    3 x 500 GB HDD (Data/Media)
    1 x 2000 GB e-HDD (Backup)
    PSU
    ThermalTake 1000W PSU
    Case
    Corsair Carbide R300
    Cooling
    Corsair H60 (Push-Pull)
    Keyboard
    Microsoft Wireless Keyboard
    Mouse
    Microsoft Wireless Mouse
    Internet Speed
    60 Mbps (Down) 5 Mbps (Up)
    Browser
    IE, FF, Chrome
    Antivirus
    AVG Internet Security 2015
    Other Info
    Some wired stuff

Darryl Licht

Not @ ANON
VIP Member
Member
So Cal

Posts
151
#7
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 Computer

System One

  • OS
    Windows 7 Ultimate 64 bit Steve Ballmer Signature Edition
    System Manufacturer/Model Number
    Homebrew PC - "Alpha_Dawg"
    CPU
    Intel Core 2 Quad - Q9550 - 2.83GHz stock - OC'd to 3.6GHz
    Motherboard
    Gigabyte EP45-UD3P
    Memory
    4GB DDR2 800MHz (PC6400) OCZ Reaper
    Graphics Card(s)
    Nvidia GeForce GTX 460
    Sound Card
    Asus Xonar DX
    Monitor(s) Displays
    Samsung SyncMaster 2333HD
    Screen Resolution
    1920 x 1080
    Hard Drives
    WD Caviar Black 750GB/7200RPM/32MB cache
    WD Caviar Green 2.5TB/5400RPM/64MB cache
    WD Caviar Green 2.0TB/5400RPM/64MB cache
    PSU
    PC Power & Cooling Silencer 750
    Case
    Gigabyte 3D Aurora
    Cooling
    Case is Air - 5ea. 120mm fans (mix of Arctic and Xigmatec)
    Internet Speed
    50 mbps down/5 mbps up
    Other Info
    AVerMedia - AVerTVHD G2 Dual Tuner Card

Sbrideau

New Member
Bathurst

Posts
7
#8
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 Computer

System One

  • OS
    Windows 7 Pro x64 Retail
    Computer type
    PC/Desktop
    System Manufacturer/Model Number
    Self built
    CPU
    Intel Core I3 530 2.93GHz
    Motherboard
    Asus P7P55-M
    Memory
    8GB DDR3
    Graphics Card(s)
    EVGA GTX550Ti FPB
    Sound Card
    Onboard
    Monitor(s) Displays
    HP w2207h & Acer H213H
    Screen Resolution
    1280x1050 & 1920x1080
    Hard Drives
    WD Caviar Black 1TB - WD Caviar Green 1TB - WD Caviar 750GB
    PSU
    Mushkin HP-550 550W Power suppy
    Case
    Cooler Master Elite 310
    Cooling
    Air
    Keyboard
    Logitech Access 600
    Mouse
    Logitech M110
    Internet Speed
    50Mb/s down 30 Mb/s up
    Other Info
    Asus G53SW-A1 laptop