Nowadays the SSD technology become more widespread, and more and more computers are shipped with a SSD disk. But their price is still high and not everyone can afford a 500 Gb SSD disk, at 160$, in replacement of his good old mechanical disk (HDD). The HDD still has some beautiful days ahead…
Do you know what device in your computer that makes your system heavy and slow ?
it’s the disk !
Why ? Because all the data needed by the OS and programs are stored in the disk. And whenever you need to read a file or start an application, this operation can take several seconds because of your slow 5200 rpm hard disk! it’s then worthless to have the speediest CPU in the market or a big amount of RAM, you will always have a bottleneck.
So how to ensure that your Windows is set up properly to overcome the performance limits of your HDD ?
Windows offer to deal with the poor HDD performance two mechanisms; The Prefetcher and the ReadyBoot.
The main problem with the mechanical disks during a system boot or an application startups is that the data or code are brought in from one part of a file, then maybe from a distant part of the same file, then perhaps from a directory, then from a different file …etc. This jumping around slows down each access considerably. The disk seek times are a dominant factor in slowing boot and application startup times.
So the prefetcher monitor data and code accessed by application startup, then cache these information in the %SystemRoot%\Prefetch folder so that the next time these data are loaded quickly during the application startup. By prefetching batches of pages all at once, the system achieve a more sensible ordering of access without excessive backtracking, thus improving the overall time for system and application startup.
For the system boot another mechanism called ReadyBoot is used. ReadyBoot analyzes file trace information from the five previous boots and identifies which files were accessed and where they are located on disk then store these information in %SystemRoot%\Prefetch\Readyboot. This way the I/O operations are optimized by creating large and efficient I/O reads and storing the data in RAM; so that when system components require these data, it’s serviced through the RAM.
I wrote this article, after one of our users has experienced poor performance on his Laptop. it was a Windows 10, HP ProBook, with I7 CPU, 8 Gb RAM and 1 To 5400 rpm HDD. He noticed slowness in boot and his Excel application became unresponsive when loading or working on some files !
I took a boot trace with Windows Performance Recorder and found that the boot time was about 175 seconds. And in the Disk usage graph you can notice a high disk activity ! So at first glance I’ve deduced that the problem is disk bound. I was reinforced in my analysis by the non-presence of readyboot graph ! Which means that the ReadyBoot and Prefetch mechanisms were not enabled !
My next step was enabling the Superfetch service which hosts the two mechanisms. After rebooting the system six times, to allow the ReadyBoot to prefetch and cache the necessary data. The boot time decreased to 77 seconds ! A gain of 98s.
You can enable or disable Prefetching for boot and application startups, by editing this registry key value HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters\EnablePrefetcher.
- Set it to 0 to disable prefetching altogether;
- Set it to 1 to enable prefetching of only applications;
- 2 for prefetching of boot only;
- 3 for both boot and applications.
So by enabling Prefetcher and ReadyBoot mechanisms you can improve Windows Performance even when the hardware plays against you.