SuperFetch: Windows Memory-Caching Gets Intelligent

One of the demonstrations Microsoft performed at Professional Developers Conference (PDC) 2005 last month caught my eye, mostly because of its improbability. Jim Allchin, Microsoft's co-president of the Platform Products & Services Division, demonstrated how a feature called SuperFetch would more intelligently cache memory in Windows Vista and Longhorn Server, leading to vastly improved performance and efficiency when compared with today's Windows versions. Why do I think this is improbable? He also demonstrated how inserting a standard USB memory stick in a Vista or Longhorn Server-based PC would effectively extend the amount of virtual memory available to the system, further increasing performance. Chicanery, I thought.

Maybe not. In a recent briefing with Gabriel Aul, a group program manager in the Windows Division at Microsoft, I learned that SuperFetch is a potential paradigm shift, if you'll excuse my use of that tired word, which will extend the life of aging corporate PCs and notebooks and improve performance for virtually all Windows users.

In today's versions of Windows, a technology called the Windows Prefetcher performs simple memory caching in a bid to improve overall system performance. The Prefetcher uses available system RAM to cache, or prefetch, memory pages that it believes the user will need in the future. The goal is to reduce unnecessary disk access because random disk I/O is one of the most obvious performance bottlenecks on a typical PC. "To get the disk out of the way," Aul told me, "the Prefetcher precaches the data it thinks you will need. That way, the disk read operation won't be necessary."

Windows XP's Prefetcher performs this service for a wide variety of file types, including Windows Explorer, the Windows boot files, and others. But Prefetcher has some limitations. If you run several memory-intensive tasks (e.g., games, graphics editing, video editing) all of those cached memory pages will be pushed out to the disk-based page file. So when you go back to a cached task, the system has to read them back from disk, thus obviating any performance benefit.

Logically speaking, Vista's SuperFetch is the next version of the Windows Prefetcher. Like its predecessor, SuperFetch caches often-used files so that you can access them more quickly in the course of a typical work session. But SuperFetch is more efficient than Prefetcher. First, it tracks how often you access certain memory pages and over time will develop profiles of the applications you use. "These profiles include fairly complex patterns," Aul told me. "It learns that you can use different applications on weekdays and weekend days, for example, and tracks \[PC\] job and computer use changes." The net result is that when a memory-intensive task pushes cached memory pages out, SuperFetch will monitor operations and pull the pages back in as soon as possible to avoid a disk-intensive slowdown when you go back to using more commonly accessed applications.

Consider a typical scenario: Perhaps your IT department schedules automated tasks to run when you're not working, such as at lunchtime or overnight. These tasks won't typically be cached but could push the memory pages of your cached applications to disk. When you return to work, things aren't as snappy as they were. But with SuperFetch, you won't notice any difference. Your PC, effectively, will be as snappy as ever, as often as possible.

And what about that USB memory stick demonstration? Aul tells me that the company will let people use virtually any USB 2.0-based flash drive as a scratch buffer between your main system RAM and the hard disk. "We're not extending your system RAM with a flash drive," Aul said, "and it's not increasing virtual memory. Instead, we're creating dedicated scratch space for SuperFetch." Here's the theory: Although a typical USB flash disk isn't as fast as system RAM, it's many times faster than your hard disk, especially for random I/O (Aul tells me that it can be 20 times faster in a worst case scenario).

When you first plug a USB flash disk into a Vista PC, the system will ask whether you'd like to dedicate part of its memory space to SuperFetch (this feature isn't available in the current September 2005 Community Technical Preview--CTP--build, but will be included in the next public release, due this month). The memory you allocate to SuperFetch will be compressed and encrypted so it's secure and can't be used on other machines. And it's double-buffered to disk, so there are no reliability problems. "You can pull it right out and use it like a typical USB stick on another PC if you'd like," Aul noted.

Microsoft sees the USB flash drive solution as being a key benefit to notebook users, road warriors, and anyone who has a PC to which they can't easily add RAM. "You can use one or two USB keys on a notebook and get a massive performance improvement, even if you aren't able to upgrade the RAM," Aul said. But it's also a great desktop PC enhancement because you can get an instant speed boost by using a device that would otherwise go unused when you were at the desk. Just plug it in and get an instant performance boost.

The technology has a few limitations. You can't use one key in two or more PCs: Once you've partnered the USB flash drive with a PC, it's locked to that PC. That means you can't use a single USB flash drive for both a desktop and a notebook PC. Also, the benefits are most obvious in the 512MB to 1GB of system RAM range. If you have more than that amount, SuperFetch will simply use your faster system RAM to cache application memory pages. If you have less RAM than that, you probably shouldn't be running Vista anyway.

I'm eager to give SuperFetch and the USB flash drive feature a test drive. In the meantime, it seems like an exciting new addition to the ever-increasing Windows feature set. I'll let you know how it works in the real world when I see the next CTP build.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.