Deep understanding of WinXP disk defragmentation system

  
                              

If you are using the Windows XP operating system, then please pay attention to the problem of disk defragmentation.

1. Why do you need to defragment

File layout on disk can strongly affect I/O performance, and files and directories that are heavily fragmented or scattered on disk can hurt performance. Although Windows XP will automatically relocate certain files to improve performance, in general, this is not a routine that the system must have, and usually only contains a small portion of the files on the disk.

In this regard, the disk should be completely defragmented immediately after the system is installed. By default, Windows XP performs a local defragmentation every 3 days, and adjusts the physical location of the file on the disk according to the usage of the day. The moved file will be written to the Layout.ini file, which Windows XP thinks. The physical location of the file on disk should be arranged in this order, with the path to C:\\Windows\\Prefetch.

The system will automatically defragment the disk when it is idle. At this time, the contents of the Layout.ini file will be read first, and the files involved in it will be partially defragmented. This is also the location of the defragmenter transfer file. Basis.

2. Deep understanding of the Prefetch directory

In Windows XP and later operating systems, the pre-reading function (also known as "preloading") has been added, which can improve System performance, speed up system startup, file read speed, these read-ahead files are saved in the %systemroot%Prefetch directory, with *.pf as the extension, these *.pf files include the details of the loaded file and Loading order.

Each application, including the Windows XP startup process, will leave a corresponding pre-read file in the PrefetCh directory. The pre-read file describes the loading order of each module when the application or startup is started. The naming method is based on the name of the application's executable file, plus a "-" and a hexadecimal value describing the full path of the executable file, plus the file extension .pf, for example, QQ.EX-0065A2A1. Pf.

Whenever a user launches a program, it automatically leaves a record in the corresponding *.pf file in the Prefetch directory. However, the pre-read file that Windows XP starts is always the same name, NTOSBOOT-B00DFAAD.PF, which contains the record of the file loaded at startup.

The next time you start the system or run a program, Windows will refer to the corresponding *.pf file and load all the files recorded in it into memory instead of loading them one by one as in the previous one. file. In addition, Windows will use the *.pf file of the launcher or program to develop an optimized disk allocation scheme. The information about this scheme is stored in the Lyaout.ini file.

3. Don't let the system automatically defragment the disk

Sometimes, you may feel that the local defragmentation function is very boring, because the defragmentation of the disk will also make some degree to the hard disk. operating. The technique of disabling local defragmentation by modifying registry keys is plausible on the Internet, but in fact, these so-called tricks are completely ineffective.

In fact, even if you delete all the files in the C:\\Windows\\Prefetch directory, the Layout.ini file will be created automatically after restarting the system, and the local fragment automatic finishing function will be performed once every 3 days. Reactivated.

So the correct way is to open the Layout.ini file with Notepad, delete all the contents, and set this file to read-only property, so Windows XP can't activate the local fragment auto-organizing function. Of course, you don't have to worry about C: WindowsPrefetch will become bigger and bigger.

4. Further Discussion

We often see tips on modifying the registry keys to improve the speed of Windows XP startup. Are these techniques really effective? Below, we take a step-by-step discussion with the example of disk defragmentation:

Question 1: Why can't the C drive be defragmented?

Windows XP system, when defragmenting the C drive, the prompt can not continue because the C:\\Window\\sprefetch\\WMIPRVSE.EXE-28F301A9.PF file is damaged.

C: WindowsPrefetch is a Windows XP pre-reading folder. Windows XP stores frequently used data in a pre-reading folder. When you need to use this data again, you can greatly speed up the reading, but with time. The growth of this folder will become bigger and bigger, and there may be some dead chain files. If you perform defragmentation, the above mentioned error may occur. The solution is to empty this folder. And then tidy up the pieces.

Question 2: Can I also defragment at startup?

Windows XP can defragment at startup, so that the files necessary for booting can be arranged next to each other, so that the speed is increased at the next startup, but the function is turned off by default. The activation method is to open the registry editor, find HKEY_LOCAL_MAHCINESOFTWARED\\frgBootOptimizeFunetion, double-click the Enable button in the right pane, and change the key value from the default "N" to "Y".

Question 3: Can the system start speed be improved after pre-reading is prohibited?

There is a trick on the network to improve the startup speed of Windsws XP. The specific method is to change the key value of "1" by modifying the EnablePrefeteher subkey in the HKEY_LOCAL_MACHINESYSTEM\\CurrentControlSetControlSession ManagerMemory ManagementPrefetchParameters directory in the registry. . This can reduce the pre-read file and reduce the wait time of the progress bar. The effect is that the progress bar runs into the login screen after one round.

Microsoft's technical documentation explains the meaning of EnablePrefetcher being given different values:

0: Cancel the pre-read function;

1: Pre-read the application only; Br>

2: Only pre-read Windows system files.

3: Pre-read Windows system files and applications, this is the default value of Windows XP.

Although the EnablePrefetcher key is set to 1, it can reduce the pre-read file, but the system initialization of the kernel is a very complicated process, in which you need to load a lot of underlying drivers, boot subsystem And related services, even when we see the welcome screen, we can not think that the system has been started at this time, because the system will continue to initialize the loading of those unfinished drivers in the background, although the number of actions of the scroll bar is much larger than before. Reduced, but the black screen process before the welcome screen is displayed, but the total system time has not changed.

Copyright © Windows knowledge All Rights Reserved