0

I found this in a few different places around the 'net - hopefully it's helpful:

Clean Your Prefetch to Improve Performance

This is a unique technique for WinXP. We know that it is necessary to scrub registry and TEMP files for Win9X/ME/2000 periodically. Prefetch is a new and very useful technique in Windows XP. However, after using XP some time, the prefetch directory can get full of junk and obsolete links in the Prefetch catalog, which can slow down your computer noticeably.

  • Open C(system drive):/windows/prefetch, delete those junk and obsolete files, reboot. It is recommended that you do this every month.
10
Contributors
22
Replies
23
Views
13 Years
Discussion Span
Last Post by The Dude
0

hi dani,

how to distinguish those junk and obsolete files from what files that are really needed or am i just gonna delete all the files inside the prefetch folder?

pls advise, thanks.
jaycckan

I found this in a few different places around the 'net - hopefully it's helpful:

Clean Your Prefetch to Improve Performance

This is a unique technique for WinXP. We know that it is necessary to scrub registry and TEMP files for Win9X/ME/2000 periodically. Prefetch is a new and very useful technique in Windows XP. However, after using XP some time, the prefetch directory can get full of junk and obsolete links in the Prefetch catalog, which can slow down your computer noticeably.

  • Open C(system drive):/windows/prefetch, delete those junk and obsolete files, reboot. It is recommended that you do this every month.
0

hi dani,

how to distinguish those junk and obsolete files from what files that are really needed or am i just gonna delete all the files inside the prefetch folder?

pls advise, thanks.
jaycckan

This post by Dani is inaccurate. Obsolete entries do NOT slow your system down in ANY way. They do nothing but take up a ridiculously small amount of disk space. Do NOT clean the folder, it is self cleaning at 128 entries. I have spoken to Microsoft Engineers on the Windows Client Performance Team who have confirmed this. Please read the following link and the sources:


http://mywebpages.comcast.net/SupportCD/XPMyths.html

0

I feel the need to go into detail about this....
The prefetch, is used in conjunction with Page Filing (Virtual Memory). Anybody who has spent any time with a computer, knows one simple truth. Hard-drives (even the fastest ones ever made) are still horribly slow. Regardless of what kind of drive... Raptors in raid0, SCSI, even solid state drives are the slowest part and the biggest bottle-neck of a computer system. So, there are typically only two reasons why accessing the hard-disk is done. One is when the application specifically demands it.... such as to open a file, or save the data. The second is called a hard fault. This happens when a program wants to access memory that has been written to the disk via Virtual Memory (paged), and it needs to be paged back into ram.

Programs often use dependency files, like DLL's, which contain a bunch of functions the program can use. In order for the EXE to run properly (or in some cases, even at all) the required DLL's must be loaded into memory. The Prefetcher tracks what code pages are used by an application, and the next time that application loads, it loads those pages in advance as soon as it's got some idle time, instead of waiting for a hard fault to happen when the program needs to use the DLL.

I don't personally use Page Filing (Virtual Memory) because I have enough RAM that I don't need to use my hard-drive (and take up space on it) for some extra Ram space.... consequently XP doesn't generate any prefetch files (I don't even have the prefetch folder). My point here is that prefetch has no effect (and in fact could SLOW DOWN) system performance on SOME machines. While most machines, (with default xp installations) will certainly gain speed from the prefetch, this isn't always the case.

Beyond that, on systems that use Page Filing, cleaning out the prefetch folder, will in fact, slow down system performance, because not only will XP not be able to load the required page files ahead of time, it will also take the time to write these prefetch files back to the hard-drive (the slowest part of a system). Windows also removes the .pf files after 128 of them, true. However, I've found that some file system errors have been fixed by cleaning out the prefetch.... but overall system performance will take a minor hit by removing the prefetch files.

0

Programs often use dependency files, like DLL's, which contain a bunch of functions the program can use. In order for the EXE to run properly (or in some cases, even at all) the required DLL's must be loaded into memory. The Prefetcher tracks what code pages are used by an application, and the next time that application loads, it loads those pages in advance as soon as it's got some idle time, instead of waiting for a hard fault to happen when the program needs to use the DLL.

This is not completely correct. The Prefetcher does track the first ten seconds of an application launch from a cold start of that application and then creates a Prefetch Trace file which includes a list of all the files that the application launched in those first ten seconds. Thus the second time you launch the same application from a cold start it will reference the Prefetch Trace File for that application and use the list to load all those files into memory asynchronously. By default an application would load these files in a much less optimal manner. It does not do this at system idle time. What it does do at system idle time is a second prefetch optimization: it uses the disk defragmenter to arrange all the files referenced in the prefetch trace files to the same location on the HD to further reduce disk seeks.

I don't personally use Page Filing (Virtual Memory) because I have enough RAM that I don't need to use my hard-drive (and take up space on it) for some extra Ram space.... consequently XP doesn't generate any prefetch files (I don't even have the prefetch folder). My point here is that prefetch has no effect (and in fact could SLOW DOWN) system performance on SOME machines. While most machines, (with default xp installations) will certainly gain speed from the prefetch, this isn't always the case.

Virtual Memory is always in use and you cannot disable it. Disabling the Page File is a bad idea and will slow down application performance in a multitasking environment. Windows will create one even if you set the page file to disabled only it will be ridiculously small and cause alot of unnecessary paging due to the limited size. Prefetching does improve performance, why do you think Windows XP boots so much faster than 2000? How much it improves performance is based on a number of factors including the speed of your HD, how much RAM is in your system, how many applications load at startup and how large the application is that you are loading. Anyone who claims otherwise has never properly tested it. If you do not have a Prefetch folder that means you have it disabled. You can reenable it with the Prefetch Fix located here.
In no way whatsoever can Prefetching slow your system down on a properly functioning PC. Even on high end machines, prefetching will improve performance on large applications such as Adobe Photoshop and high end games but it will not reduce performance. Here is a simple test to irrefutably prove this:

Testing Boot Prefetching:

The following on a default installation of Windows will be done by Windows automatically at some point, however to confirm that the Prefetcher is enabled and Windows is optimized on a system where it might have been disabled these steps are necessary for uniformity in testing. You must be using a default install of Windows and not one that used Nlite which can permanently break the prefetcher

1. Make sure the following Services are set to Automatic:
-Task Scheduler (It is by default but many people and bad tweaking programs disable it)
-COM+ Event System

2. Make sure the following Registry Key is set to 3: (Again it is by default but many people and bad tweaking programs disable it)

Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Session Manager\Memory Management\PrefetchParameters
Name: EnablePrefetcher
Type: REG_DWORD
Value: 3

3. Reboot and make sure in the \Windows\Prefetch folder the following files are present:
-NTOSBOOT-B00DFAAD.PF
-Layout.ini

4. Reboot Windows 3 more times and DO NOT install or change anything that would load during Windows Startup during any of this. This will insure that prefetching is 100% complete.

5. Download and install Bootvis. (Without using Bootvis you would have to wait 3 or more days for this optimization to happen automatically.)

6. In the menu go to "Trace", select "Next Boot and Driver Delays". A "Trace Repetitions" screen will appear, select "Ok" and Reboot. Upon reboot, BootVis will automatically start, analyze and log your system's boot process. When it's done, in the menu go to "Trace" and select "Optimize System" and Reboot. This time when your system comes up, wait until you see the "Optimizing System" box appear, continue to wait until the process is complete.

Now your Boot time is optimized and Prefetching should be properly enabled.

7. Time Windows boot with complete accuracy using Bootvis. Run another Trace and reboot. Now when Windows finishes loading the Bootvis tool you will see a time at the top of the Window that represent your optimized Boot time. Write this down.

8. Delete the contents of the \Windows\Prefetch folder. (This is never recommended except for these tests)

9. Time Windows boot again using Bootvis. Run another Trace and reboot. Now when Windows finishs loading the Bootvis tool you will see a time at the top of the Window that represent your unoptimized Boot time. Write this down.

10. Compare the times.

Anyone can easily test this themselves and see for themselves how important the Windows Prefetcher really is. Again you must be using a default non Nlite installation of Windows. Using programs like Nlite can permanently break the Windows Prefetcher.

Like I said I have personally talked to Microsoft Engineers on the Windows Client Performance Team about this and have tested it extensively. The final conclusion: Windows Prefetching is enabled by default, it is already configured optimally, it should not be disabled and the folder should not be cleaned (it is auto cleaning). Windows Prefetching only improves performance.

Don't get me wrong you can disable it and clean the folder if you want Windows to boot slower and your applications to load slower, be my guest.

0

Strange.... my benchmarks show a significant improvement on system speed with page filing disabled..... I wonder why that is.... I can't imagine any time that reading to and writing from the hard-drive is going to INCREASE speed over the same information being kept in RAM....

You can read the same basic information I posted previously from Ryan Meyers, A developer on Microsoft’s Windows Client Performance Team: http://blogs.msdn.com/ryanmy/archive/2005/05/25/421882.aspx

0

Strange.... my benchmarks show a significant improvement on system speed with page filing disabled..... I wonder why that is.... I can't imagine any time that reading to and writing from the hard-drive is going to INCREASE speed over the same information being kept in RAM....

What benchmarks? Windows only pages when necessary it does not page just to increase disk writes.

0

(Read Edit To Prior Post)

In spite of the name 'virtual memory' the paging file is really just a chunk of reserved hard drive space where data may be written and retrieved as needed. Since the paging file and operating system files are by default located on the same drive, concurrent access to both locations is impossible. One or the other has to wait, slowing down overall system performance...

0

The reduction in performance is something you will probably never notice, Keep in mind every time you run an application for the first time windows is creating a .pf file, When the max of 128 .pf files it starts removing the older/unused ones. Which means when you run an app that you haven't ran for a while it will once again recreate the .pf file., So clearing out your prefetch is not going to slow down your computer as detrimentally as some are making it sound.

Im not sure who has ever had this take up 100% of the processor unless its norton or mcafee trying to scan something (choke choke..)

One thing you should definitely clear out is your temp folder

c:\documents and settings\username\local settings\Temp

It is not uncommon that spy ware will run entirely out of the temp folder because it is not automatically cleared like it should be considering its called a temp folder..

This is actually a Myth and will reduce performance:

XP Myths

0

The reduction in performance is something you will probably never notice, Keep in mind every time you run an application for the first time windows is creating a .pf file, When the max of 128 .pf files it starts removing the older/unused ones. Which means when you run an app that you haven't ran for a while it will once again recreate the .pf file., So clearing out your prefetch is not going to slow down your computer as detrimentally as some are making it sound.

Im not sure who has ever had this take up 100% of the processor unless its norton or mcafee trying to scan something (choke choke..)

One thing you should definitely clear out is your temp folder

c:\documents and settings\username\local settings\Temp

It is not uncommon that spy ware will run entirely out of the temp folder because it is not automatically cleared like it should be considering its called a temp folder..

Don't state nonsense. If Windows now boots in 35 seconds and you delete the prefetch files and it then boots in 60 seconds, you will not notice this? If an application loads in 10 seconds but you delete the prefetch files and it then loads in 20 seconds, you will not notice this? The larger the application and the slower your computer the more "you will notice it". How much you will "notice" is dependent on MANY factors, including the speed of your HD, the HD interface speed, the amount of RAM in your system and the application loading. The fact remains you want your applications to load as quickly as possible and there is NEVER any reason to clean the prefetch folder.

Correction, when the 128 limit is reached, all but the most used 32 prefetch files are flushed. This is based on information stored in the prefetch files. Thus these 32 most used application's performance would NEVER be affected. When you manually delete the folder, you delete ALL of them including the 32 that Windows would leave for your common applications. And yes the file is recreated but BEFORE it is recreated the application loads SLOWER! Why? Because you felt like cleaning the folder for no reason! Leave the folder alone and let windows take care of it.

Clearing out the temp folder is not a way to clean spyware. All modern malware is very resilient to being removed, especially by simplistic suggestions like this. You need to run scans to make sure you are clean. All cleaning the temp files does is increase available disk space.

0

Do you honestly think there is an increase in wait of up to 30 seconds at boot time? The only way you would notice a boot time increase that much by clearing out your prefetch would be if you have alot of extra apps starting up.. Yeah, If you have 15 apps starting up every time you boot your computer, you will notice a difference when you clear your prefetch folder, but most people that are looking for performance don't have alot of startup items, and the boot time would not increase like you say.. I personally have the same boot time results after cleaning out my prefetch folder. I suppose if you have a slower machine or alot of startup apps this would slow down your boot time, However if you run your machine optimally with as little to start with as possible it doesn't matter if your prefetch is full or empty.

I did not state that cleaning out your temp folder is a solution to your spyware problems, I said that it is not uncommon that spyware will run entirely out of the temp folder, While this is true, there is also spyware that runs under the windows, system32, dllcache, restore and various other folder, but I am not going to give advice to people as to start deleting crap out of those folders.. I have seen various cases where a simple piece of spyware is running under the temp folder, commonly with some long name like asfd98uwer.exe.. So, In the case of cleaning the temp folder, yeah, of course it increases disk space, but it also can make a difference on startup time, as the spyware that was running out of the temp folder is no longer loaded, and of course this is not a fix all solution, but for a novice it is a place to start, for someone like me it is the first thing I clear, and the prefetch too, cuz I heard some people are sensitive about that folder..

Truth of the matter is in most cases, if you make sure explorer is loading as your shell, there are no bad bho's, you clear your temp, and clear out any suspicious startup items in safe mode, a good amount of times (not all of course) This will fix the problem. If you have something a little more difficult, like spyaxe (isnt that fun) you will need to do more, but there fortunately hasn't been too much spyware that is designed that well.

Don't state nonsense. If Windows now boots in 35 seconds and you delete the prefetch files and it then boots in 60 seconds, you will not notice this? If an application loads in 10 seconds but you delete the prefetch files and it then loads in 20 seconds, you will not notice this? The larger the application and the slower your computer the more "you will notice it". How much you will "notice" is dependent on MANY factors, including the speed of your HD, the HD interface speed, the amount of RAM in your system and the application loading. The fact remains you want your applications to load as quickly as possible and there is NEVER any reason to clean the prefetch folder.

Correction, when the 128 limit is reached, all but the most used 32 prefetch files are flushed. This is based on information stored in the prefetch files. Thus these 32 most used application's performance would NEVER be affected. When you manually delete the folder, you delete ALL of them including the 32 that Windows would leave for your common applications. And yes the file is recreated but BEFORE it is recreated the application loads SLOWER! Why? Because you felt like cleaning the folder for no reason! Leave the folder alone and let windows take care of it.

Clearing out the temp folder is not a way to clean spyware. All modern malware is very resilient to being removed, especially by simplistic suggestions like this. You need to run scans to make sure you are clean. All cleaning the temp files does is increase available disk space.

0

the 30 seconds thing is pretty true as prefetch loads common parts of the XP shell, kernel, services and drivers.

0

Does anyone know how this works? Listen Prefetching does not load ANYTHING that is not already being loaded. What it does is OPTIMALLY load what is ALREADY being loaded. Prefetching is an optimization PROCESS. It is not something that loads more things!!!! So if file A, B and C load during startup with Prefetching enabled A, B and C still load at startup (Nothing more) but they simply load FASTER!

CMN - You HAVE NO IDEA WHAT YOU ARE TALKING ABOUT. Even on slow systems you boot times are improved with Prefetching, irrelevant to how many apps you have loading at startup. The exact amount of time that is changed varies based on MANY FACTORS but it is without a doubt SLOWER when you clean the folder = FACT. I work for a system OEM, have tested this on hundreds of machines of all varying speeds and have consulted fully on this issue with the Microsoft Client Performance Team. You Personally do not know how to properly test this even remotely. Go read up on this before you misinform more people, There is NO REASON TO CLEAN THE PREFETCH FOLDER PERIOD:

Here is some reference material:

Kernel Enhancements for Windows XP
Windows XP: Kernel Improvements Create a More Robust, Powerful, and Scalable OS
Benchmarking on Windows XP

Boot Prefetching
Windows XP speeds up system boot by observing the code and data needed each time the system is booted and prefetching the necessary file contents early in the boot process. This prefetching is not done until the third boot of the system, when sufficient information is available to make the prefetching most effective. The files observed during system boot will be used in the disk layout process mentioned above.

Application-Launch Prefetching
Windows XP also uses prefetching when launching applications. The files and the contents of the files accessed by each new process are observed and recorded. No prefetching can be done for the first launch of an application, so first launches are often considerably slower than subsequent launches. About 85% to 90% of the improvement is realized after just one launch of an application, with the remaining speed improvement coming after the system has had an opportunity to adjust the disk layout with information specific to this application.

One more time: do not clean out your Prefetch folder!
Tip of the day: Don’t clean out the Prefetch folder
Debunking yet another bogus Windows tip
Beware of Bogus XP Advice
Misinformation and the The Prefetch Flag

Anyone claiming any performance improvement from adjusting, tweaking, optimizing, cleaning or changing anything in relation to the default prefetcher registry settings, folder or files has either never tested it or improperly tested it. You will not find any fully documented, reproduceable testing in relation to these "performance" claims anywhere on the Internet

Testing Boot Prefetching:

Setup Requirements - Before beginning with testing you must confirm the following:

- Windows XP/Vista must have been cleanly installed from a non-nlite, lawfully owned, original installation CD.
- Your computer hardware must be in proper working order and properly configured.
- Your computer must not be overclocked.
- Your computer must not be infected with any Malware, Spyware or Viruses.
- Your computer must have a Hard Disk Drive, not a Solid State (flash-based) Drive.
- Prefetching must be enabled and working properly (it is by default).

Failure to meet all of these requirements will result in inaccurate timing results.

The following on a default installation of Windows will be done by Windows automatically at system idle times and roughly every 3 days.

1. Make sure the following Services are set to Automatic:
-Task Scheduler (It is by default but many people and bad tweaking programs disable it)
-COM+ Event System

2. Make sure Prefetching is properly enabled (it is by default) run the Prefetcher Fix: http://mywebpages.comcast.net/SupportCD/OptimizeXP.html#Tweaks

3. Reboot and make sure in the \Windows\Prefetch folder the following files are present:
-NTOSBOOT-B00DFAAD.PF
-Layout.ini

4. Reboot Windows and wait one full minute at the desktop so Windows can write the NTOSBOOT-B00DFAAD.PF file. Reboot Windows a second time and wait again 1 full minute. DO NOT install or change anything that would load during Windows Startup during any of this.

5. Download and install Bootvis. (Without using Bootvis you would have to wait 3 or more days for this optimization to happen automatically.) http://www.soft32.com/download_19687.html

6. In the menu go to "Trace" and select "Optimize System" and Reboot. This time when your system comes up, wait until you see the "Optimizing System" box appear, continue to wait until the process is complete.

Now your Boot time is optimized and Prefetching should be properly enabled.

7. Time Windows boot with complete accuracy using Bootvis. Run another Trace and reboot. Now when Windows finishes loading the Bootvis tool you will see a time at the top of the Window that represent your optimized Boot time. Write this down.

8. Delete the ntosboot-b00dfaad.pf file in the \Windows\Prefetch folder. (This is never recommended except for these tests)

9. Time Windows boot again using Bootvis. Run another Trace and reboot. Now when Windows finishes loading the Bootvis tool you will see a time at the top of the Window that represent your unoptimized Boot time. Write this down.

10. Compare the times.

0

Listen, I'm not saying that someone should clean their prefetch daily or anything like that, I am saying that My results with the prefetch have been that clearing out the prefetch has not increased MY boot times. In the event that someone does clean out their prefetch and it increases their boot times, it is no big deal, because within 3 reboots they will be back to normal, In the event of someone having a slower boot obviously it would NOT be advisable to keep cleaning the prefetch.

I have done boot speed testing with bootvis before, but I run linux now, and I am not going to dig up my old hd with xp on it for the sake of an argument. So, for this conversation, I am ending saying that I am Not recommending that everyone clear their prefetch, especially on a regular basis. I am saying that doing so did not effect my boot times, and if it effected yours, a few boots later it will be back to normal.

I am not going to post on this topic again, as it is not really that important..

0

Listen, I'm not saying that someone should clean their prefetch daily or anything like that, I am saying that My results with the prefetch have been that clearing out the prefetch has not increased MY boot times. In the event that someone does clean out their prefetch and it increases their boot times, it is no big deal, because within 3 reboots they will be back to normal, In the event of someone having a slower boot obviously it would NOT be advisable to keep cleaning the prefetch.

I have done boot speed testing with bootvis before, but I run linux now, and I am not going to dig up my old hd with xp on it for the sake of an argument. So, for this conversation, I am ending saying that I am Not recommending that everyone clear their prefetch, especially on a regular basis. I am saying that doing so did not effect my boot times, and if it effected yours, a few boots later it will be back to normal.

I am not going to post on this topic again, as it is not really that important..

I am listening and I am telling you it is nonsense. Either Prefetching was broken in some way on your system, never properly optimized before testing or your testing was flawed. I have worked on thousands of Windows systems and tested hundreds in regards to Prefetching EVERY single one benefited from prefetching. You don't even run Windows now and am trying to give advice on something you don't understand. This is dangerous because it gives people who are trying to learn about this incorrect information. I have provided full documentation and proper testing procedures to test it. Don't give advice based on your misunderstanding of something.

0

My XP hangs at startup. I have to delete NTOSBOOT-B00DFAAD.pf in Prefetch folder before starting XP. Is there any better way to solve this problem? thanks.

Hangs is vague but since you already deleted it you need to do the following to optimize your boot time. Turn off your computer and time with a stop watch from when you press the power button to the desktop.

1. Use Autoruns and go to the Logon tab to disable anything you do not need.
2. Reboot Windows XP and wait one full minute after the desktop appears to allow Windows time to fully write to the NTOSBOOT-B00DFAAD.PF file before proceeding
3. Reboot Windows XP a second time and wait one full minute after the desktop appears to allow Windows time to fully write to the NTOSBOOT-B00DFAAD.PF file before proceeding
4. Then 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.
5. When this is finished in the "Run" box Type defrag c: -b and wait until the command prompt window disappears.

Now retime your boot, shut off the computer and time with a stop watch from when you press the power button to the desktop. Even on a fully optimized system some computers will appear to "hang" but the total boot time will be less then ones that do not appear to "hang". On a fully optimized system you may see various parts of the boot process stay on screen for extended lengths do not confuse these visual ques with the overall boot time. You must hand time your boot with a stop watch to be sure. Many people mistakenly try to guess how long there system is loading you cannot.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.