After a delay of several weeks, now I *really* start my [WinPowerTip] series ![]()
For today's WinPowerTip, I will explain what you need to know about Prefetch: What Prefetch is, Why Prefetch is important, and How to optimize your Prefetch to increase your Windows performance.
Follow up:
What is Prefetch?
I'll try to explain what Prefetch is in a not-too-technical way.
Prefetch is a feature of Windows XP and Windows Server 2003. Its purpose is to increase the performance during booting and/or application-launching. This is how it works: When booting or launching, Windows notes what files are being loaded when initialization (of boot or application) happens. On the next boot/launch, Windows will pre-load these files before they are explicitly requested for.
So, how can Prefetch makes Windows go vroom? As it happens, during booting/initialization, the requested file is not loaded whole, but only parts of it are loaded. But in practice, there may be several different parts being loaded from the same file, especially in the case of loading a Library file (.dll). This results in repeated accesses to the same file just to load the needed parts.
Prefetch optimizes this loading process by identifying not only which files need to be pre-loaded, but also which parts exactly from those files that need to be pre-loaded. As a result, instead of accessing the same file repeatedly, Prefetch accessed *all* necessary segments from *all* needed files at the same time. This greatly speeds up the loading process of an application, for before the application explicitly requested a segment, Prefetch has had it ready in memory.
One common misunderstanding: Many thought Prefetch pre-loaded ALL applications during boot-time. This is wrong. Prefetch does not pre-load a file if a file is not needed at the moment. For instance, if there's a library file that's needed only by PhotoShop, that file will not be pre-loaded during booting or during launch of other non-PhotoShop application. That file will be pre-loaded ONLY if the user launches PhotoShop.
Why is Prefetch important?
In the section above, I have explained in general how Prefetch works, and how Prefetch can speed-up the booting process and the application initialization process.
But there's more to Prefetch than just pre-loading.
Prefetch also records the sequence of parts/file that it pre-loaded in a file called "layout.ini". This file may be utilized by Disk Defragmenter utilites to optimize the physical layout of the files in the hard disk. (I'll cover the defragmenter topic in the next WinPowerTip)
As a result of using "layout.ini", not only you'll get faster disk access, you also reduce the workload of your hard disk, and this translates to a longer hard disk life.
On the next page, I will explain how you can optimize your Prefetch.
Indonesia
On seeing the article's title I was expecting to see yet another confused explanation of how prefetch works, and how we can "fix" it's faults. I was quite surprised too see that the author actually knows what he is talking about.
Larry Miller
Microsoft MCSA
Reply to comment 117 by Larry Miller
Yes, it depresses me greatly to see many unguided 'tips' about prefetch while the tip-giver totally misunderstood what prefetch is. I just hope that by first explaining what Prefetch is in (relative) detail -- and in 2 languages -- people will 'get it' and thus no longer blindly apply misguided tips re: Prefetch.
Reply to comment 118 by