System Performance Tweaks - Clean the Windows XP Prefetch

This is a unique technique for Windows XP operating system. Following is a definition given by Microsoft on prefetching technique.

Windows XP monitors the files that are used when computer starts and also when you start applications. By monitoring these files, Windows XP can prefetch them. Prefetching data is the process whereby data that is expected to be requested is read ahead into the cache. Prefetching boot files and applications decreases the time needed to start Windows XP and start applications.

This information is logged and stored on your hard drive taking up space and requires a process to be kept running monitoring which applications are being run often. This has a performance impact on your PC. Disabling the prefetch function or atleast only enabling it for the boot files will allow you to free up some system resources and preserve some disk space.

Here is how you change the prefetch:

  1. Open the Registry Editor click on the Start button on your taskbar, then click on Run and type "regedit" and click on OK to start the regedit utility.
     
  2. Expand HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters\EnablePrefetcher (see picture 1).
     
    Picture 1
  3. Set the value to either 0-Disable, 1-App launch prefetch, 2-Boot Prefetch, 3-Both ("3" is recommended).
     
  4. The modifications you made will be in effect after you reboot your PC.

However, it is recommended to clear your prefetch directory often at least monthly once. You could use the following VBScript or manually go and empty the contents of c:\windows\prefetch. If you are using the script, you can add it to your task scheduler.

[clearprefetch.vbs]

Dim fso
Set fso = Createobject("Scripting.FileSystemObject")
Dim MyVar
MyVar = MsgBox ("Deleting C:\WINDOWS\Prefetch. This is a typical maintenance job, does not affect the stability of the system", 0, "Note: Deleting Prefetch")
fso.DeleteFile("C:\WINDOWS\Prefetch\*.*")

Click here to download the script.

 


Author:

Lex van der Horst

Date Added:

06-11-2004

Last Reviewed:

06-11-2004