Recently CCleaner has added an internet urban legend as a cleaning option, "Old Prefetch data". Cleaning the Prefetch folder is an internet Myth that simply will not die due to the gross ignorance of many people in regards to how Windows XP Prefetching works. These same people generally recommend other bogus advice such as disabling Windows Prefetching completely and adding /Prefetch:1 to desktop shortcuts.
"Bottom line: You will NOT improve Windows performance by cleaning out the Prefetch folder. You will, in fact, degrade Windows performance by cleaning out the Prefetch folder." - Source
CCleaner for the most part is a good application, it quickly and easily removes temporary and unused files from Windows. It has a nice interface that clearly shows what has been "cleaned". On neglected systems this can free hundreds of Megabytes of harddisk space. Apparently in the authors quest to clean everything and anything, he blindly ignored how Prefetching works.
"When a Windows XP-based system is booted, data is saved about all logical disk read operations. On later boots, this information is used to pre-fetch these files in parallel with other boot operations. During boot and application launch, a Windows system demands and pages a sizable amount of data in small chunks (4K to 64K), seeking between files, directories, and metadata. The Logical Prefetcher, which is new for Windows XP, brings much of this data into the system cache with efficient asynchronous disk I/Os that minimize seeks. During boot, the logical prefetcher finishes most of the disk I/Os that need to be done for starting the system in parallel to device initialization delays, providing faster boot and logon performance.
Logical prefetching is accomplished by tracing frequently accessed pages in supported scenarios and efficiently bringing them into memory when the scenario is launched again. When a supported scenario is started, the transition page faults from mapped files are traced, recording which page of a file is accessed. When the scenario has completed (either the machine has booted or the application started), the trace is picked up by a user-mode maintenance service, the Task Scheduler. The information in the trace is used to update or create a prefetch-instructions file that specifies which pages from which files should be prefetched at the next launch.
The user-mode service determines which pages to prefetch by looking at how successful prefetching has been for that scenario in the past, and which pages were accessed in the last several launches of the scenario. When the scenario is run again, the kernel opens the prefetch instructions file and asynchronously queues paging I/O for all of the frequently accessed pages. The actual disk I/Os are sorted by the disk drivers to go up the disk once to load all pages that are not already in memory. This minimizes seeks, cuts down on disk time, and increases performance. The kernel also prefetches the file system metadata for the scenario, for example, MFT entries and directory files. Because prefetching is useful only when the required data is not in memory, the applications that are launched frequently are not traced and prefetched each time." - Source
1. Prefetching is enabled by default in Windows XP.
2. Prefetching is configured optimally by default.
3. Prefetching will significantly improve application load times.
4. The Prefetch (.pf) files are not a cache, they are reference files.
5. The Prefetch (.pf) files do not preload/cache anything upon Windows startup that does not normally load at startup.
6. Only one Prefetch (.pf) file is referenced during startup = NTOSBOOT-B00DFAAD.PF
7. Only one Prefetch (.pf) file is created per application.
8. The Prefetch (.pf) files including the Layout.ini and NTOSBOOT-B00DFAAD.PF files are automatically updated.
9. The Prefetch folder is auto cleaned after 128 entries have been reached down to the 32 most used applications.
10. Notebooks running on battery power will not execute idle tasks and thus cannot further optimize or remove prefetch files.
What CCleaner does
CCleaner deletes any Prefetch file older then two weeks based on the .pf file's last access date. This is completely idiotic for a number of reasons. First you should never delete a .pf for any installed application. With the .pf file missing, that application will take up to 100% more time to load when you decide to launch it. CCleaner does this to any application you have installed on your computer but have not used in over two weeks. It makes absolutely no sense to delete these files. Why would you deliberately want to slow down any installed application's load time? It will also do this if you have not used you computer for two weeks. Second, it is quite common to disable the NTFS Last Access Time Stamp for performance reasons. I actually recommend doing this since it speeds up the file system. In this case CCleaner will delete any .pf file that was created over two weeks ago. You can clearly see how running CCleaner in this case would wind up deleting ALL your Prefetch files every two weeks. Now you are crippling every application's load time on your system instead of just the ones you have not used in two weeks. Ridiculous!
Make sure the Task Scheduler service is set to automatic. Launch an application like Firefox three times. Reboot and make sure there is a FIREFOX.EXE-XXXXXXXX.pf file in the C:\WINDOWS\Prefetch folder. If there is, launch Firefox and time it. Then delete the .pf file, reboot, relaunch Firefox and time it again. You will now see Firefox take a significantly longer time to load. Now imagine this on any other application, then imagine doing this deliberately every two weeks? Why? To save a tiny bit of HD space? It makes no sense. 128 .pf files take up maybe 5 MB of disk space.
Do not clean the prefetch folder! If you use CCleaner uncheck the "Old Prefetch data" option. Finally let the makers of CCleaner know they need to remove this option from CCleaner.
Windows XP: Kernel Improvements Create a More Robust, Powerful, and Scalable OS - (Mark Russinovich, Ph.D Computer Engineering, Microsoft Technical Fellow)
Misinformation and the The Prefetch Flag - (Ryan Myers, Microsoft Windows Client Performance Team)
One more time: do not clean out your Prefetch folder! - (Ed Bott, Author Windows Inside Out)
Kernel Enhancements for Windows XP - (Microsoft)
Benchmarking on Windows XP - (Microsoft)
Microsoft Windows XP Performance - (Microsoft)
Update, October 4, 2005:
It has been brought to my attention the makers of CCleaner want to cover up and ignore this issue. They do not want to allow a discussion of it because they know they are wrong and cannot win an argument where the facts are against them. They either delete any topics in their forums brought up about the issue, lock them or ban the users who bring it up. I recommend instead to bring this issue up in all forums where they will allow the discussion and you can inform people of how prefetching works and why CCleaner should have the "Old Prefetch data" option removed.
Update, August 12, 2006:
CCleaner v1.32.345 has moved the "Old Prefetch data" option to the advanced section and now it is not selected by default. However there should still be a warning added when you select it. And of course it is still not recommended to use this option for any reason as it is still useless and will do nothing but slow down your system. But at least this is an improvement and should prevent many users from unknowningly slowing there system down everytime they run CCleaner.