|
|
|
ajitkumar
Moderator

Joined: 29 Nov 2005
Posts: 14
Location: hyderabad

|
windows prefetch to improve performance
Discover an XP feature that you can adjust to squeeze more performance out of your workstation.
Computers do what you tell them to do, when you tell them to do it. If you want to start a program, you double-click the icon and the program loads. To help speed up the process, Windows XP tries to predict what you want before you want it. Using its prefetch capabilities, Windows XP tries to load the programs you need before you need them. While this may speed start times, ironically it can also slow down your system. Here's how to work with prefetching to improve system performance.
What's prefetching? When you come home after a long day of tech support, the ideal dog will fetch your slippers, your newspaper, and a refreshing beverage. However, wouldn't it be more efficient if your dog already had all of those things waiting by your chair when you walked in the door? Windows XP works that way. As you boot your workstation or access programs on your workstation, XP's prefetcher copies portions of those files to the Prefetch area of your hard drive. When your workstation boots, XP prefetches portions of the files
you use most frequently and has any application you've recently run waiting and ready to go.
If you're frequently using the same few applications over and over again, prefetching can greatly increase the apparent speed of a system. Rather than waiting for you to click an icon to start a program, and then loading all of the associated files, libraries, and pointers necessary to run the program, XP has all the components of your programs preloaded. When you click an icon to start the program, most of the hard work is already done.
The drawback to prefetching is that XP will prefetch a program even if you use it only once or twice. XP will retain a copy of a portion of it in the Prefetch folder. From there, it will prefetch the program, taking resources from your workstation even though you may have no intention of ever using the program again. If you have enough unused or little-used items prefetching, over time your system will actually run slower than if you never prefetched at all. This is especially evident on systems with limited resources. Viewing what XP is prefetching You can quickly see what Windows XP is prefetching for you. Click Start | My Computer, and double-click the drive that's storing your \WINDOWS directory (normally drive C . Open the Windows folder and open the Prefetch folder to reveal a list of programs that XP prefetches.
This folder may display items that are months old. You can click the Date Modified column to quickly sort the folder by date and see the most recently cached items.
Microsoft Word (WINWORD.EXE-1419152B.pf)
Acrobat Reader (ACRORD32.EXE-20C463C1.pf)
Microsoft Excel (EXCEL.EXE-0208E84D.pf)
Mozilla Firefox (FIREFOX.EXE-28641590.pf)
Don’t be surprised if you check your Prefetch folder and see similar entries but with different numbers after the .EXE. Those numbers are unique and refer to versioning information about the file that's being prefetched.
One common file you may notice is the one highlighted in the figure, Layout.ini. This file contains
prefetch information for XP's disk defragmenter. Information in this file is used by the defragmenter to move programs and files on your workstation's hard drive to a more favorable location, speeding up direct read times.
Cleaning out the folder As you can see, just like the TEMP directory on your system, the Prefetch folder can fill up with lots of unused entries. You can improve system performance by deleting files from this folder.
In doing so, you have two choices: You can selectively delete very old files and files for programs you rarely use, or you can batch-delete all of the entries in the folder. Of the two methods, the mass deletion is probably the most efficient. Windows XP will automatically reprefetch programs when your workstation restarts anyway, so the most frequently used programs will reappear automatically.
To delete all the files, simply select them all in Explorer and press [Delete]. You can also create a batch file that you can run periodically to do the job for you. Just open a command prompt, type copy con killpref.bat, and press [Enter]. Next, type the following commands:
Echo off
del c:\windows\prefetch\*.* /q
Finish by pressing [F6] and then [Enter]. You can then run the killpref.bat file from the command line or Explorer window, or run it as a scheduled task. It will automatically empty your Prefetch folder. When you restart your workstation, it may initially boot a little slower and load programs slowly, but as the prefetching kicks in again, frequently used programs will start quickly again.
Danger! The following section of this article discusses making changes to your server's registry. Before performing the techniques, make sure you have a complete backup of your workstation. If you make a mistake when making changes to your workstation's registry, you may cause your server to become unbootable, which would require a reinstallation of Windows to correct. Proceed with extreme caution.
Modifying and disabling Prefetch settings
As with most Windows XP-related things, you can change the way that Prefetch behaves by making a change in the registry. For low-memory systems, you can even completely disable the feature, which ensures that every last byte of RAM goes toward running current programs, not the ones XP guesses you'll need next.
To change the registry settings for prefetching, start the Registry Editor by selecting Run from the Start menu, typing regedit in the Open text box, and clicking OK. When the Registry Editor window opens, navigate through the left pane until you get to this hive:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory
Management\PrefetchParameters
In the right pane, look for the key named EnablePrefetcher. The value of this key represents how prefetch works on your system. Values you can choose from include:
0—Disable
1—Application Launch Prefetch
2—Boot Prefetch
3—Prefetch everything
To change the value, double-click it. You'll then see the Edit DWORD Value screen. Enter the value representing the level of prefetching you want in the Value Data field. As a general rule, if you're on a low-memory workstation, 128 MB or so, set the value to 0. If your workstation has 512 MB of RAM or more, set it to 3. Otherwise, you can choose the value as best suits your needs and observations.
|
Tue Apr 18, 2006 5:52 pm |
|
|
sri
Moderator

Joined: 28 Jan 2006
Posts: 381
Location: Hyderabad , India

|
Use XP's Prefetch feature to improve system performance
Computers do what you tell them to do, when you tell them to do it. If you want to start a program, you double-click the icon and the program loads. To help speed up the process, Windows XP tries to predict what you want before you want it. Using its prefetch capabilities, Windows XP tries to load the programs you need before you need them. While this may speed start times, ironically it can also slow down your system. Here's how to work with prefetching to improve system performance.
What's prefetching?
When you come home after a long day of tech support, the ideal dog will fetch your slippers, your newspaper, and a refreshing beverage. However, wouldn't it be more efficient if your dog already had all of those things waiting by your chair when you walked in the door?
Windows XP works that way. As you boot your workstation or access programs on your workstation, XP's prefetcher copies portions of those files to the Prefetch area of your hard drive. When your workstation boots, XP prefetches portions of the files you use most frequently and has any application you've recently run waiting and ready to go.
If you're frequently using the same few applications over and over again, prefetching can greatly increase the apparent speed of a system. Rather than waiting for you to click an icon to start a program, and then loading all of the associated files, libraries, and pointers necessary to run the program, XP has all the components of your programs preloaded. When you click an icon to start the program, most of the hard work is already done.
The drawback to prefetching is that XP will prefetch a program even if you use it only once or twice. XP will retain a copy of a portion of it in the Prefetch folder. From there, it will prefetch the program, taking resources from your workstation even though you may have no intention of ever using the program again. If you have enough unused or little-used items prefetching, over time your system will actually run slower than if you never prefetched at all. This is especially evident on systems with limited resources.
Viewing what XP is prefetching
You can quickly see what Windows XP is prefetching for you. Click Start | My Computer, and double-click the drive that's storing your \WINDOWS directory (normally drive C . Open the Windows folder and open the Prefetch folder to reveal a list of programs that XP prefetches.
This folder may display items that are months old. You can click the Date Modified column to quickly sort the folder by date and see the most recently cached items. You'll then see a screen similar to the one shown in Figure
Cleaning out the folder
As you can see, just like the TEMP directory on your system, the Prefetch folder can fill up with lots of unused entries. You can improve system performance by deleting files from this folder.
In doing so, you have two choices: You can selectively delete very old files and files for programs you rarely use, or you can batch-delete all of the entries in the folder. Of the two methods, the mass deletion is probably the most efficient. Windows XP will automatically reprefetch programs when your workstation restarts anyway, so the most frequently used programs will reappear automatically.
To delete all the files, simply select them all in Explorer and press [Delete]. You can also create a batch file that you can run periodically to do the job for you. Just open a command prompt, type copy con killpref.bat, and press [Enter]. Next, type the following commands:
Echo offdel c:\windows\prefetch\*.* /q
Finish by pressing [F6] and then [Enter]. You can then run the killpref.bat file from the command line or Explorer window, or run it as a scheduled task. It will automatically empty your Prefetch folder. When you restart your workstation, it may initially boot a little slower and load programs slowly, but as the prefetching kicks in again, frequently used programs will start quickly again.
Modifying and disabling Prefetch settings
As with most Windows XP-related things, you can change the way that Prefetch behaves by making a change in the registry. For low-memory systems, you can even completely disable the feature, which ensures that every last byte of RAM goes toward running current programs, not the ones XP guesses you'll need next.
To change the registry settings for prefetching, start the Registry Editor by selecting Run from the Start menu, typing regedit in the Open text box, and clicking OK. When the Registry Editor window opens, navigate through the left pane until you get to this hive:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters
In the right pane, look for the key named EnablePrefetcher. The value of this key represents how prefetch works on your system. Values you can choose from include:
0—Disable
1—Application Launch Prefetch
2—Boot Prefetch
3—Prefetch everything
To change the value, double-click it. You'll then see the Edit DWORD Value screen. Enter the value representing the level of prefetching you want in the Value Data field.
As a general rule, if you're on a low-memory workstation, 128 MB or so, set the value to 0. If your workstation has 512 MB of RAM or more, set it to 3. Otherwise, you can choose the value as best suits your needs and observations.
|
Thu Apr 20, 2006 9:57 am |
|
|
|
| |
|