System prefetch skills

Source: Internet
Author: User
Tags prefetch

To improve system performance and speed up system startup and file reading, the pre-read function is added to Windows XP/Server 2003. The Windows \ prefetch folder on the Windows XP/Server 2003 system disk is the folder where pre-reading is located and there are many files with the PF extension in the prefetch folder, this is the pre-read file generated by the system. However, if this function is not used well and takes a long time, it will generate a large number of pre-read files, occupying valuable hard disk space, resulting in a longer system search time and increasing the burden on the system search, this slows down the system. Therefore, only by managing and making good use of these pre-read files can the system always be optimized to make the system run faster and smoother.

 

Prefetch
Windows Vista superfetch is built on a technology introduced by Windows XP called prefetch, so before learning about superfetch and EMD, we 'd better talk about it first. First, prefetch is the process of importing key data and code segments from the disk to the memory before the actual needs of the operating system. With this in mind, we can get a general idea of how prefetch works.
To improve the performance of the entire prefetch operation, the Windows XP cache manager can import various applications during system startup, monitors the movement of data between disks and Ram and between RAM and virtual memory. When the cache Manager monitors these events, it constructs mappings between directories and all files referenced by each application or process. These mappings are saved to files with the \ windows \ prefetch folder extension. Pf.
After these ing files are created, the cache manager will use them when the system starts and imports applications to improve efficiency. More specifically, the cache manager intercepts every process or application that will be imported and checks the \ windows \ prefetch folder to determine whether the corresponding ing exists. If yes, the cache Manager assigns the file system to immediately access the directory or file reference in the ing. Then the cache manager will warn the Memory Manager and tell it to use the information in the ing file to import data or code to the memory. After the prefetch is completed, the cache Manager allows the application or process to continue importing data. During this process, the application or process will find that most of the required files and data already exist in the memory, this reduces disk access and allows applications or processes to import or respond more quickly.
To further improve the efficiency of this prefetch operation, Windows XP periodically analyzes the content of the ing file, edits a directory and file list, and organizes them in the import order, save the information in the \ windows \ prefetch folder named layout. INI file. It then arranges the disk fragment program to run regularly and uses the information in the layout. ini file to redeploy all directory files so that they are arranged in the adjacent area of the disk.

Superfetch
Now that you know how Windows XP's prefetch technology works, you know 70% of how Windows Vista's superfetch technology works. As the next version of Windows XP prefetch, superfetch includes all the features of prefetch and does more.
First, superfetch overcomes a major disadvantage in Windows XP prefetch. As I explained earlier, prefetch allows faster access to most files or data required by an application or process in the memory by importing them. However, because these files and data exist in the memory, they are governed by rules that control the virtual memory. In other words, when other applications need to access the memory, any prefetch data will be removed from the page file on the hard disk. When you need it again, you must move it back to the memory from the page file, which of course offset the performance enhancement.
Superfetch further ensures that you get the most effective performance enhancement. In addition to constructing the ing file I mentioned earlier, superfetch also constructs the description file of the application you are using, including the information such as when you use and how often you use it. Superfetch then tracks the application in the description file and records when any prefetch data is removed to the page file. Superfetch will monitor the application description files that cause the prefetch data to be removed from the page files. Once the application completes, it will retrieve the prefetch data back to the memory. So when you access the application, the prefetch data will be available again in the memory and the application will respond quickly.

If you are using Windows XP, pay attention to disk fragmentation. 1. why do I need to organize the file layout on the disk to seriously affect I/O performance, and severely fragmented or scattered files and directories on the disk will damage performance, although Windows XP will automatically relocate some files to improve performance, this is not a common requirement of the system, and usually only contains a small part of files on the disk. In this regard, the complete disk fragmentation should be performed immediately after the system installation is complete. By default, WindowsXP performs Partial Fragment once every three days, and adjusts the physical location of the file on the disk according to the usage of the day. The moved file is written to layout. INI file. This is the physical location of the file on the disk that Windows XP considers to be arranged in this order. The path of the file is c: \ windows \ prefetch. The system automatically sorts out disk fragments when idle, and reads layout first. the content in the INI file, and partial fragment of the files involved in it, which is also the basis for the disk sorting program to transfer the file location. 2. a deep understanding of the prefetch directory in Windows XP and later operating systems has added the pre-read function (also known as "pre-load"), which can improve the system performance, speed up system startup and file reading. These pre-read files are saved in the % SystemRoot % \ prefetch directory *. PF is the extension *. the PF file contains the detailed information about the file to be loaded and the loading sequence. Each application, including the Windows XP startup process, will leave the corresponding pre-read files in the prefetch directory. The pre-read files describe the loading sequence of each module during the application or startup, the naming method is based on the name of the executable file of the application, plus a hexadecimal value that describes the complete path of the executable file, plus the file extension. PF, e.g. QQ.EX-0065A2A1. PF. Every time you start a program, a record is automatically left in the *. pf file corresponding to the prefetch directory. However, the preread file started by Windows XP is always the same name, that is, the NTOSBOOT-B00DFAAD.PF, which contains records of the file loaded at startup. When a system is started or a program is running, Windows loads all the files recorded in the *. pf file into the memory instead of loading files one by one based on commands. In addition, Windows will use the *. pf file of the startup program or program to develop an optimal disk allocation scheme. Information about this scheme is stored in the lyaout. ini file. 3. Do not allow the system to automatically sort disk fragments. Sometimes, you may feel that the local fragment function is boring, because the disk fragment will also perform some operations on the hard disk. It seems rational that some tips are circulating on the Internet to disable local fragment by modifying the registry key value, but in fact these so-called tricks are completely ineffective. In fact, even if you delete all files in the c: \ windows \ prefetch \ directory, the layout is automatically created after the system is restarted. INI files, the automatic part sorting function will be re-activated once every three days. The correct method is to use NotePad to open layout. INI file, delete all the content in it, and set this file as a read-only attribute, so Windows XP cannot activate the automatic Partial Fragment function. Of course, you don't have to worry about C: \ windows \ prefetch \ will become larger and larger. 4. For further discussion, we often see tips on modifying the registry key value on the Internet to increase the startup speed of Windows XP. Are these skills really effective? Next, let's take a further look at the disk fragment instances: Question 1: Why can't c disks be fragled? Windows XP system, in the C disk fragment, the prompt is caused by c: \ windows \ prefetch \ WMIPRVSE.EXE-28F301A9.PF File Corruption, scan cannot continue. C: \ windows \ prefetch \ is the pre-read folder of Windows XP. Windows XP stores frequently-used data in the pre-read folder, which can greatly speed up reading when the data needs to be used again, but as time goes on, the head of this folder will become larger and larger, and there may be some dead chain files. At this time, if you perform fragment, the above error may occur, the solution is to clear the folder and sort the fragments. Question 2: Can fragments be sorted at startup? Windows XP can fragment during startup so that files necessary for startup can be arranged adjacent to each other to increase the speed at next startup, however, this function is disabled by default. The activation method is to open the Registry Editor, find hkey_local_mahcine \ Software \ dfrg \ bootoptimizefunetion, double-click the enable key in the right pane, and change the key value from the default "N" to "Y. Question 3: Can pre-read prohibition improve the system startup speed? There is a skill on improving the startup speed of windsws XP on the network, you can modify the enableprefeteher sub-key in the HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ Memory Management \ prefetchparameters directory in the Registry to assign the key value "1 ". This reduces the number of pre-read files and the wait time of the progress bar. The result is that the log-on screen is displayed when the progress bar is circled. The Microsoft technical documentation explains the meaning given by enableprefetcher to different values: 0: cancel the pre-read function; 1: Only pre-read applications; 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 value is set to 1, it can indeed reduce the number of pre-read files, but the system initialization of the kernel is a very complex process, at this time, we need to load many underlying drivers, startup subsystems, and related services. Even when we see the welcome screen, we cannot think that the system has been started, because the system will continue to initialize the loading of those unfinished drivers in the background, although the number of scroll bar actions is greatly reduced, the black screen process before the welcome screen is displayed has increased, therefore, the overall system time has not changed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.