SuperFetch: How it Works & Myths

SuperFetch is a technology in Windows Vista and onwards that is often misunderstood. I decided to delve into this technology to see what it is all about, and to dispel some of the myths surrounding this feature.

Very succinctly put, SuperFetch is a technology which allows Windows to manage the amount of random access memory in the machine it runs on more efficiently. SuperFetch is part of Windows’ memory manager; a less capable version, called PreFetcher, is included in Windows XP. SuperFetch tries to make sure often-accessed data can be read from the fast RAM instead of the slow hard drive.

SuperFetch’ goals

SuperFetch has two goals: it decreases boot time, and makes sure applications that you use the most load more efficiently. SuperFetch also takes timing into account, in that it will adapt itself to your usage patterns.

Let’s focus on decreasing boot times first. During the Windows boot process, the same files need to be accessed at different times. SuperFetch records which data and files need to be accessed at which times, and stores this data in a trace file. During subsequent boots, this information is used to make the loading of said data/files more efficient, resulting in shorter boot times.

SuperFetch performs more tasks to make the boot process more efficient. It also interacts with the defragmenter to make sure that the files accessed during the boot process are stored on the disk in the order they are accessed in. It performs this as a routine task every three days; the specific file layout is stored in /Windows/Prefetch/Layout.ini.

SuperFetch’ second goal is to make applications launch faster. SuperFetch does this by pre-loading your most often used applications in your main memory, based on not only usage patterns, but also on when you use them. For instance, if you have the same routine every morning (Chrome – Mail – Miranda – blu), SuperFetch will pre-load these into memory in the morning. If your evening routine is different (for instance, it includes Word, Excel, and Super Awesome Garden Designer), SuperFetch will adapt, and load those in memory instead during the evening.

SuperFetch for applications basically operates in the same way as the boot variant; it traces what files are accessed by an application during the first ten seconds of said application’s startup, which can then be used to load the proper data in memory at appropriate times. SuperFetch data for applications is stored in /Windows/Prefetch (the various .pf files).

Windows has always included a built-in caching mechanism, but this one is quite limited. All it basically does is keep application data in memory after its termination, which allows applications to be loaded faster right after quitting them. This caching mechanism is helpful, but limited – for instance, a reboot obviously flushes all data in RAM. In addition, cached data will eventually drop out of RAM if other applications push it out of RAM.

SuperFetch also has other advantages, Mark Russinovich details some of them.

SuperFetch myths

There are a lot of myths going around about SuperFetch, the most predominant probably having to do with how Task Manager reports memory statistics. If you open Task Manager (in Windows 7), it’ll tell you Total, Cached, Available, and Free. The problems arise from the “Cached” figure, since this figure is generally substantially higher than the “Free” figure.

When people look at the Task Manager, and they see the figure for “Cached” compared to the number of “Free”, people assume that only very little of their memory is available for the applications they are about to launch. What they forget is that the Cache filled by SuperFetch and the standard caching mechanism runs on a lower priority; in other words, memory requests by applications will always supersede SuperFetch.

In other words, whatever you see in the “Cached” figure is actually accessible to applications.

And this brings us to the question of what to do with RAM. I have 4GB of main memory in my main desktop machine, and I would find it a total waste if the operating system did not use it to make my computing experience smoother. Isn’t that why I got 4GB of top-quality RAM in the first place? To make my machine faster?

This is exactly what SuperFetch does. It’s an intelligent mechanism that uses the RAM in a machine to its fullest potential to make computing a smoother experience. The fact that SuperFetch (and its related technology, ReadyBoost) actually works, has already been confirmed by Tom’s Hardware. The key here is that the more RAM you have, the bigger the benefit SuperFetch delivers; according to Tom’s Hardware, Vista’s sweet spot was about 2GB of RAM, but even at 1GB they noticed a positive difference.

Contrary to what many Windows tweaking guides on the internet tell you, SuperFetch does not impact your every day computing experience in a negative way. SuperFetch makes often-used applications load fast – it doesn’t make other applications load any slower. As such, turning it off, as some guides advise you to do, can only result in a slowdown, not a speed up.

Another oft-made claim is that SuperFetch will make your boot times considerably longer, and that any advantages in application launch times are nullified by an increase in boot times. Not only is this very debatable (since SuperFetch also works for booting the operating system), you also have to ask yourself: what action do I perform more often, booting, or launching applications?

Even if there was a trade-off, it’s probably a worthwhile one. Reducing application load times will have a more positive impact at the end of the day than reducing boot times would.

Conclusion

SuperFetch is something all operating systems should have. I didn’t buy 4GB of top-notch RAM just to have it sit there doing nothing during times of low memory requirements. SuperFetch makes my applications load faster, which is really important to me – I come from a BeOS world, and I like it when my applications load instantly.

SuperFetch’ design makes sure that it does not impact the system negatively, but only makes the system smoother. Because it runs at a low-priority, its cache doesn’t take away memory from the applications you’re running.

79 Comments

  1. 2009-05-11 8:54 pm
    • 2009-05-11 9:04 pm
      • 2009-05-12 12:21 am
  2. 2009-05-11 8:56 pm
    • 2009-05-11 9:30 pm
      • 2009-05-12 4:56 am
        • 2009-05-12 6:33 am
          • 2009-05-12 4:45 pm
    • 2009-05-12 2:34 am
      • 2009-05-12 4:41 am
        • 2009-05-12 4:55 am
        • 2009-05-12 10:36 am
          • 2009-05-12 4:59 pm
  3. 2009-05-11 9:04 pm
  4. 2009-05-11 9:17 pm
    • 2009-05-11 9:40 pm
    • 2009-05-11 10:01 pm
      • 2009-05-12 10:38 am
      • 2009-05-12 12:31 pm
      • 2009-05-16 5:16 am
    • 2009-05-11 10:42 pm
    • 2009-05-11 10:43 pm
      • 2009-05-12 11:25 am
    • 2009-05-13 4:09 pm
  5. 2009-05-11 9:17 pm
  6. 2009-05-11 9:46 pm
    • 2009-05-11 9:50 pm
    • 2009-05-12 5:33 am
      • 2009-05-12 12:33 pm
      • 2009-05-12 3:43 pm
        • 2009-05-12 4:10 pm
  7. 2009-05-12 12:23 am
    • 2009-05-12 7:49 am
    • 2009-05-12 10:02 am
      • 2009-05-12 10:50 am
        • 2009-05-12 11:10 am
          • 2009-05-12 11:21 am
          • 2009-05-12 12:31 pm
    • 2009-05-12 10:10 am
      • 2009-05-12 10:22 am
        • 2009-05-12 11:02 am
          • 2009-05-12 11:11 am
      • 2009-05-12 11:38 am
      • 2009-05-12 5:34 pm
        • 2009-05-16 6:24 am
      • 2009-05-12 8:57 pm
        • 2009-05-13 6:27 am
        • 2009-05-13 9:04 am
  8. 2009-05-12 12:32 am
  9. 2009-05-12 1:21 am
    • 2009-05-12 7:10 am
  10. 2009-05-12 3:29 am
    • 2009-05-12 3:40 am
  11. 2009-05-12 3:35 am
  12. 2009-05-12 6:55 am
    • 2009-05-12 7:15 am
      • 2009-05-12 8:31 am
  13. 2009-05-12 7:24 am
  14. 2009-05-12 7:54 am
  15. 2009-05-12 7:54 am
    • 2009-05-12 7:56 am
    • 2009-05-12 8:08 am
    • 2009-05-12 11:37 am
  16. 2009-05-12 8:01 am
  17. 2009-05-12 8:44 am
    • 2009-05-12 8:54 am
      • 2009-05-12 9:23 am
        • 2009-05-12 9:25 am
          • 2009-05-12 10:54 am
        • 2009-05-12 9:27 am
  18. 2009-05-12 9:36 am
  19. 2009-05-12 10:51 am
  20. 2009-05-12 5:17 pm
    • 2009-05-16 8:20 pm
  21. 2009-05-12 5:42 pm
  22. 2009-05-13 3:49 am
    • 2009-05-16 1:41 am
  23. 2009-05-15 8:18 am