At least once a week I run across some well-meaning soul who passes along a dubious tip designed to enhance the performance of Windows XP. According to these folks, you should clean out the Windows Prefetch folder regularly to improve your system’s performance. They’re wrong, because they don’t understand how this feature works. Even generally reliable sources like Fred Langa can get tripped up. Here’s what you need to know:
The Prefetch folder is not a cache – at least not in the sense that you normally think of when you use that term. This folder contains trace files and layout files that Windows uses in specific circumstances. Trace files describe the exact order in which segments of programs (executable files and dynamic link libraries, including those that make up Windows itself) load. Windows uses this information to launch Windows and Windows programs in the most efficient way possible. Layout files provide a list of files and directories in the order that they are accessed when you start your computer or run a program. The Windows XP Defrag program uses the layout information to arrange these files in a contiguous region of the hard drive. The “prefetching” doesn’t mean that code is being loaded unnecessarily; it means that code is being loaded in the right way, and only when it’s needed.
Cleaning out the Prefetch folder will not improve performance. I have proved this with a stopwatch repeatedly on multiple test systems, and documented the results in Windows XP Inside Out Second Edition. In fact, emptying the Prefetch folder will actually reduce performance, because Windows has to re-create the trace files the next time you run the program. Windows cleans out old files here automatically, and it uses the current information simply as instructions to help load programs more efficiently. If you delete a program, its layout and trace files go unused and are deleted within weeks.
This isn’t the first time I’ve written about the Prefetch folder. I have a detailed write-up on the subject here. Be sure to follow the links to the excellent article by Mark Russinovitch and David Solomon and scroll down to the section entitled Prefetch, which explains how this feature works in very clear detail.
The next time someone tells you that cleaning out the Prefetch folder is a performance-enhancing measure, tell them it just isn’t so.

Tom,
No executable filies should be present in the prefetch folder the file you are refering since it is .exe does not belong. I suggest seeking help in a malware removal forum to clean the infection but your problem has nothing to do with Prefetching. That malware is simply using the Prefetch folder to hide that one file as it could use any other folder. The name of the file is probably random.
Tom you can get help at the Safer Networking Forums:
http://forums.spybot.info/index.php
Wow, guys guys guys. I deleted everything in my prefetch folder. My computer went from 4 bars of loading on startup down to 1 and a half. How does that NOT work? I didn’t do ANY other changes or tweaks.
After I saw how well that worked, I went in and disabled access to the prefetch folder both from all users and the SYSTEM itself. It seems to work wonders for me and it prevents the .pf files from EVER being created.
This is the BEST tweak you can do for optimization if you have a fast computer.
For a better explanation, check out this:
http://www.nerdhelp.com/forums/showthread.php?p=43100#post43100
Surge you said BARS!!!!! How many Bars you see is IRRELEVANT!!!! You cannot visually time prefetching!
You must use a timing device like a STOPWATCH and time from pressing your power button until the desktop loads.
If you are not going to properly test this or attempt to understand how it works then don’t misinform others. What you stated and is stated in that forum thread is 100% wrong.
The ignorance regarding Prefetching is absolutely amazing. I have never seen more people blindly follow bad advice like this before in my life!
By bars, I meant time as well. If you look at that post in the forum, I have actually timed it. A whole 15 secs shaved off of the cold boot time.
On top of that, I used BootVis that showed a BIG decrease in boot time in accordance with my personal timing, specifically in the time it takes Windows to prefetch all of it’s files.
It seriously does work. You ppl against it are just scared to actually try it. Or if you tried it, you must have done something wrong, cuz it always, ALWAYS worked for me on ANY computer I have ever done it too.
Surge STOP spreading your misinformation here and READ the sources about how this actually works:
http://msdn.microsoft.com/msdnmag/issues/01/12/XPKernel/default.aspx
http://www.microsoft.com/whdc/driver/kernel/xp_kernel.mspx
http://www.microsoft.com/whdc/system/sysperf/benchmark.mspx
http://www.microsoft.com/technet/prodtechnol/winxppro/evaluate/xpperf.mspx
http://blogs.msdn.com/ryanmy/archive/2005/05/25/421882.aspx
Then time it properly:
Accurately Timing Boot Prefetching:
Setup: Your system must be in proper working order, not overclocked, not infected with Malware/Viruses on a non-nlite install with a lawfully owned original copy of Windows XP.
1. Confirm that the Task Scheduler Service is set to automatic and the EnablePrefetcher Registry Value is set to 3
([HKLM\SYSTEM\CurrentControlSet\Control\SessionManag er\MemoryManagement\PrefetchParameters] “EnablePrefetcher”) or Run the Prefetcher Fix (http://home.comcast.net/~optimizexp/Files/Prefetcher_Fix.zip). Running the Prefetcher Fix file will set these for you.
2. Then REBOOT.
3. Reboot Windows XP and leave the computer alone for over 2 minutes before rebooting again. (this is VERY important)
4. Reboot Windows XP a second time and leave the computer alone for over 2 minutes. (this is VERY important). Afterward check the C:\Windows\Prefetch folder and make sure the NTOSBOOT-B00DFAAD.pf file exists with a modified date and time from today. (The NTOSBOOT-B00DFAAD.pf is created or updated 1 minute after every boot. This is not idle time dependant)
5. Go to “Start”, “Run”, Type Rundll32.exe advapi32.dll,ProcessIdleTasks. This can take 10-15 minutes to run but no notification will be given when it is finished. You will notice increased Harddrive activity while it is running wait until this stops. When this is finished in the “Run” box Type defrag c: -b.
6. Shutdown Windows XP and turn off your computer.
7. Now using a stopwatch time from when you press the power button to the Windows XP desktop, write that time down. Do NOT look at how long any boot logos ect are on the screen. You must use a timing device.
8. Disable Prefetching (set enableprefetcher to 0 in the registry), disable the Task Scheduler Service and delete the NTOSBOOT-B00DFAAD.pf file from the c:\windows\prefetch folder.
9. Then REBOOT
For what it is worth, for the past several weeks when I launch any program, I have waited as long as 30 seconds For OE, Explorer, IE7 or any other program’s window to appear. The system was sluggish and non responsive.
Today, I deleted all 127 files in the prefetch folder which has never been cleaned out before. The only change I have made. The computer is now very responsive again.
Draw your own conclusions…..
Jim, it would have been helpful if you were able to identify what process was causing the slowdown. I am not disputing your account of events, but what you describe simply makes no sense based on how Prefetch works. The Prefetch layout files simply identify the order in which the system should load clusters from the hard disk when starting up a program. So deleting a Prefetch layout file should have no impact, especially in your case when you say it affected ANY program.
I know. I have bought and read your book. I was beginning to think that the fan on the CPU had a bad bearing and was slowing down causing heating problems. Then, I remembered the prefetch and said “what the hell!” and it worked!
I do tech support daily and I am fond of telling customers ” I don’t do why’s. I just do fixes! I get paid extra for the why’s.” This is one of those why’s that just isn’t worth my time to figure out. It worked and that is what I was after. Vista is probably going to change all the rules again anyway so why bother.
I’ve been doing this since 1972 and the part I hate the most about our business is that things don’t stay the same long enough for a dedicated person to really learn his craft inside and out. More often than not you are forced to go with your “best guess”. A good auto mechanic used to be able to fix just about any car. Now he can only fix the most recent model he has received training on.
I wish microsoft would learn a good lesson. “You can embellish what came before but you can’t change it because that destroys hard learned work habits!”. I’m reminded of that every time I add an icon to my desktop and then waste a lot of time just trying to find it! A new icon should always go in the same place like the lower right corner of th screen. Then you can find it easily and move it to where it makes sense to you. Maybe in another life?
Thanks for your reply.
Jim there are many reasons for your problems. Running any tweak programs on your system could have broken the Prefetching component. Your system may not have been going idle. Overclocking can cause file corruption ect… Just because you had 127 prefetch files does not mean the folder was not being cleaned. It does not clean the folder until 128 files are reached. If you noticed that the modified dates and times were not recent on at least some of the files then something is definitely broken with prefetching on your machine. You name the machine I have seen prefetching broken in some way. There are dozens of bad tweak apps and bad scripts that break it.
The only time cleaning the folder can possibly improve performance is if the prefetch files are corrupted which means something is causing them to get corrupted. You need to fix the source of the file corruption which is not prefetching.
Vista still uses prefetching and it works pretty much the same way but it also adds superfetch which actually precaches frequently used apps which is what people think the XP prefetch does.
Thank you and I agree. However, when you have the average customer with problems who may be an “appliance operator”, to tell him to dig through the files to find the bad one can cause more harm than good. It is much more expedient to wipe the pre-fetch and be done with it. Since Windows rebuilds it I can see no harm done. If the problem comes back, then we dig deeper. Like a torn rotator cuff. They make you go through PT for 6 weeks before they waste time and money on an MRI.
Jim, I agree. It doesn’t hurt to clean out the Prefetch folder, except for a minor and temporary performance hit as the PF files get rebuilt, and in rare cases (such as yours) it can help. My objection all along is to the so-called experts who say that you should regularly clean out the Prefetch folder or even disable prefetching.
I agree, my only problem is with people who think that the Prefetching component or windows is causing the file corruption. Which is why on any machine I find a problem like this (corrupt prefetch files I have not) I make sure to thoroughly check out their hardware, Harddrive Diagnostics, Memory Diagnostics, Power Supply tests ect… Because until they fix the problem it will happen again and then you have a new Myth started that something related to Windows causes the Prefetch files to get corrupted.
This comments thread is closed.
I have just paid Dell to sort out my computer. Yes I know it costs nearly 60 quid but I was sick of going through the “processes” and trying to determine out which one was causing the problem.
Dell advised that they sorted the problem out by deleting files in the prefetch folder, temp folder and another that I cannot remember.
Any comments?