Understand the disk defragmentation program to maintain the operating system

  

What do you usually use to organize your system? Is it defragmentation? This is one of the methods that many people will use, but this method is not as you think. So simple, if you use 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 file 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 is considered by Windows XP. 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.In-depth understanding of the Prefetch directory

In the Windows XP and later operating systems, the pre-reading function has been added (also known as “preloaded”), this function Can improve the performance of the system, speed up the 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 load file Information 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 hexadecimal value describing the full path of the executable file, plus the file extension .pf, such as 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 started by windows xp is always the same name, NTOSBOOT-B00DFAAD.PF, which contains the record of the file loaded at startup.

When 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 not activate the local fragment auto-organizing function. Of course, you don't have to worry about C: WindowsPrefetch will become bigger and bigger.

Copyright © Windows knowledge All Rights Reserved