943,693 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Mar 13th, 2004
0

Clean Your Prefetch to Improve Performance

Expand Post »
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.
Last edited by cscgal; Jun 11th, 2004 at 5:55 pm.
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Jul 1st, 2006
0

Re: Clean Your Prefetch to Improve Performance

This is actually a Myth and will reduce performance:

XP Myths
Reputation Points: 13
Solved Threads: 0
Light Poster
Mastertech is offline Offline
25 posts
since Jan 2005
Jul 11th, 2006
0

Re: Clean Your Prefetch to Improve Performance

Quote originally posted by Mastertech ...
This is actually a Myth and will reduce performance:

XP Myths
Yep.
Reputation Points: 11
Solved Threads: 1
Junior Poster
vicec64 is offline Offline
136 posts
since Aug 2004
Aug 28th, 2006
0

Re: Clean Your Prefetch to Improve Performance

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

Click to Expand / Collapse  Quote originally posted by cscgal ...
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jaycckan is offline Offline
11 posts
since Aug 2006
Aug 28th, 2006
0

Re: Clean Your Prefetch to Improve Performance

Click to Expand / Collapse  Quote originally posted by jaycckan ...
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
Reputation Points: 13
Solved Threads: 0
Light Poster
Mastertech is offline Offline
25 posts
since Jan 2005
Aug 28th, 2006
0

Re: Clean Your Prefetch to Improve Performance

Yes, Mastertech is corrret on this issue.
Team Colleague
Reputation Points: 222
Solved Threads: 105
Lapsed Skeptic
'Stein is offline Offline
1,605 posts
since Jan 2006
Aug 28th, 2006
0

Re: Clean Your Prefetch to Improve Performance

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.
Last edited by Comatose; Aug 28th, 2006 at 11:40 pm.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Aug 29th, 2006
0

Re: Clean Your Prefetch to Improve Performance

Click to Expand / Collapse  Quote originally posted by Comatose ...
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.

Click to Expand / Collapse  Quote originally posted by Comatose ...
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.
Reputation Points: 13
Solved Threads: 0
Light Poster
Mastertech is offline Offline
25 posts
since Jan 2005
Aug 29th, 2006
0

Re: Clean Your Prefetch to Improve Performance

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...25/421882.aspx
Last edited by Comatose; Aug 29th, 2006 at 12:20 am.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Aug 29th, 2006
0

Re: Clean Your Prefetch to Improve Performance

Click to Expand / Collapse  Quote originally posted by Comatose ...
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.
Reputation Points: 13
Solved Threads: 0
Light Poster
Mastertech is offline Offline
25 posts
since Jan 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Windows tips 'n' tweaks Forum Timeline: Cruel Trick
Next Thread in Windows tips 'n' tweaks Forum Timeline: Creating 'App paths'...





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC