HOME

TheInfoList



OR:

The Prefetcher is a component of
Microsoft Windows Windows is a group of several Proprietary software, proprietary graphical user interface, graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, W ...
which was introduced in
Windows XP Windows XP is a major release of Microsoft's Windows NT operating system. It was release to manufacturing, released to manufacturing on August 24, 2001, and later to retail on October 25, 2001. It is a direct upgrade to its predecessors, Wind ...
. It is a component of the Memory Manager that can speed up the Windows
boot A boot is a type of footwear. Most boots mainly cover the foot and the ankle, while some also cover some part of the lower calf. Some boots extend up the leg, sometimes as far as the knee or even the hip. Most boots have a heel that is clear ...
process A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic. Things called a process include: Business and management * Business process, activities that produce a specific s ...
and shorten the amount of time it takes to start up programs. It accomplishes this by caching files that are needed by an application to RAM as the application is launched, thus consolidating disk reads and reducing disk seeks. This feature was covered by US patent 6,633,968. Since
Windows Vista Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years before, at the time being the longest time span between successive releases of ...
, the Prefetcher has been extended by SuperFetch and
ReadyBoost ReadyBoost (codenamed EMD) is a disk caching software component developed by Microsoft for Windows Vista and included in later versions of Windows. ReadyBoost enables NAND memory mass storage CompactFlash, SD card, and USB flash drive devices ...
. SuperFetch attempts to accelerate application launch times by monitoring and adapting to application usage patterns over periods of time, and caching the majority of the files and data needed by them into memory in advance so that they can be accessed very quickly when needed. ReadyBoost (when enabled) uses external memory like a USB flash drive to extend the system cache beyond the amount of RAM installed in the computer. ReadyBoost also has a component called ReadyBoot that replaces the Prefetcher for the boot process if the system has 700 MB or more of RAM.


Overview

When a Windows system boots, components of many files need to be read into memory and processed. Often different parts of the same file (e.g. Registry hives) are loaded at different times. As a result, a significant amount of time is spent 'jumping' from file to file and back again multiple times, even though a single access would be more efficient. The prefetcher works by watching what data is accessed during the boot process (including data read from the
NTFS New Technology File System (NTFS) is a proprietary journaling file system developed by Microsoft. Starting with Windows NT 3.1, it is the default file system of the Windows NT family. It superseded File Allocation Table (FAT) as the preferred f ...
Master File Table), and recording a trace file of this activity. The boot fetcher will continue to watch for such activity until 30 seconds after the user's shell has started, or until 60 seconds after all services have finished initializing, or until 120 seconds after the system has booted, whichever elapses first. Future boots can then use the information recorded in this trace file to load code and data in a more efficient fashion (i.e. by re-ordering disk reads to minimise or eliminate the need to access the same file multiple times thus minimising disk head movements). Application prefetching works in a similar fashion, but is instead localized to a single application's startup. Only the first 10 seconds of activity are monitored. The prefetcher stores its trace files in the "Prefetch" folder inside the Windows folder (typically C:\Windows\Prefetch). The name of the boot trace file is always NTOSBOOT-B00DFAAD.PF, and application trace files are a concatenation of the application's executable name, a hyphen, a hexadecimal representation of the hash of the path the file resides in, and a ".pf" extension. Applications that host other components (i.e.
Microsoft Management Console Microsoft Management Console (MMC) is a component of Microsoft Windows that provides system administrators and advanced users an interface for configuring and monitoring the system. It was first introduced in 1998 with the Option Pack for Wind ...
or Dllhost) have the name of the loaded component included in the computed hash as well; this results in different trace files being created for each component. Note that the Task Scheduler is the process responsible for parsing the trace data collected by the prefetcher and writing files to the prefetcher directory. As a result, the prefetcher will not operate correctly if the Task Scheduler service is not started. To further improve access times, the Task Scheduler calls Windows Disk Defragmenter every three days. When the machine is idle, the lists of files and directories that were referenced during the boot process and application startups is processed. The processed result is stored in Layout.ini in the Prefetch directory, and is subsequently passed to the Disk Defragmenter, instructing it to re-order those files into sequential positions on the physical hard drive. This will further improve performance by minimising the distance that the hard drive's heads have to be moved from one file to the next. It is possible to trigger this re-ordering (by running "Defrag.exe %systemdrive% -b" from the command line) without running a full defragmentation. If the system is installed on a
solid-state drive A solid-state drive (SSD) is a solid-state storage device that uses integrated circuit assemblies to store data persistently, typically using flash memory, and functioning as secondary storage in the hierarchy of computer storage. It ...
, ReadyBoost is disabled.


Configuration

The Prefetcher's configuration is stored in the
Windows Registry The Windows Registry is a hierarchical database that stores low-level settings for the Microsoft Windows operating system and for applications that opt to use the registry. The kernel, device drivers, services, Security Accounts Manager, and ...
at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters. The EnablePrefetcher value can set to be one of the following: * 0 = Disabled * 1 = Application prefetching enabled * 2 = Boot prefetching enabled (default on Windows Server 2003 only). * 3 = Application and Boot prefetching enabled (default). The recommended value is 3. Values higher than 3 do not increase performance, and changing the value to 2 will not make Windows boot faster. The EnablePrefetcher value does not affect Superfetch.


Incorrect tweaking of the prefetcher

Often found on the Internet is the "/prefetch:1" application tweak, which is a valid but misunderstood switch. It is used to distinguish between different operating modes of an executable in case those different modes would have significantly different prefetch traces. A second myth is that the user should delete the prefetch folder contents to speed up the computer. If this is done, Windows will need to re-create all the prefetch files again, thereby slowing down Windows during boot and program starts until the prefetch files are created—unless the prefetcher is disabled. Windows maintains prefetch files in the Prefetch folder for up to the 128 most recently launched programs.


See also

* Windows ReadyBoost *
Windows Vista I/O technologies Windows Vista introduced a number of new I/O functions to the Microsoft Windows line of operating systems. They are intended to shorten the time taken to boot the system, improve the responsiveness of the system, and improve the reliability of dat ...
*
List of Microsoft Windows components The following is a list of Microsoft Windows components. Configuration and maintenance User interface Applications and utilities Windows Server components File systems Core components Services This list is not all-inclusi ...
* Features new to Windows XP * readahead – the equivalent
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, whic ...
technology * Link prefetching - the equivalent for websites *
Cache prefetching Cache prefetching is a technique used by computer processors to boost execution performance by fetching instructions or data from their original storage in slower memory to a faster local memory before it is actually needed (hence the term 'prefetc ...


References

{{Reflist, 30em


External links


The Windows Prefetcher Guide



Windows Prefetch Parser
Free tool that can be run on Windows, Linux or Mac OS-X. Memory management software Preloading and prebinding Windows components Windows XP