Service provider takeaway: Learn how ReadyBoost allows you to add "memory" to your customer systems and SuperFetch improves memory management. Learn about these performance enhancers in this chapter excerpt titled "System Recovery and Diagnostic Tricks" from the book Tricks of the Microsoft Windows Vista Masters.
Download the .pdf of the "System Recovery and Diagnostic Tricks" chapter here.
We've talked enough about discovering performance inhibitors; now let's get into the performance enhancers: ReadyBoost and SuperFetch.
Every Microsoft Engineer knows the one magic trick Microsoft encourages toward better performance and a stable OS is more RAM. Logically, this is not always an easy thing to achieve. Sometimes, for example, you might find yourself as one tech did (whom we shall name Charlie), needing more memory to install a virtual server on his system. He needed the memory immediately but couldn't get it where he was (in the middle-of-nowhere Florida visiting parents). ReadyBoost could have been Charlie's solution if he were running Vista, but he wasn't. Sorry Charlie.
ReadyBoost allows you to add "memory" to your system by adding a USB 2.0 keychain drive (you can use SD cards, too) to your system. You might be wondering why we used quotation marks back there: You are not actually adding memory to your system; in actuality you use memory from your flash drive and allow it to work like a virtual cache for your hard disk. Vista can use some or all of that drive as added memory. Although hard disks are faster for large sequential I/O, ReadyBoost improves performance on the smaller random I/O.
No doubt you have questions, as many did when this was first released. Tom Archer posted a list of Q&A with Matt Ayers (the program manager in the Microsoft Windows Client Performance Group, which basically owns the ReadyBoost feature) at http://blogs.msdn.com/tomarcher/archive/2006/06/02/615199.aspx.
You can read the entire discussion at the site, but here are the highlights (and we'd like to thank Tom Archer for sharing them with the world):
First, you should know that not all USB devices will work (which you may have already discovered if you tried using ReadyBoost with your keychain USB). Performance-wise, Matt Ayers says you need 2.5MB/sec throughput for 4KB random reads and 1.75MB/sec throughput for 512KB random writes. You can use up to 4GB of flash with ReadyBoost (which turns out to be 8GB of cache thanks to the compression). The reason for the 4GB limit is that FAT32 is being used. The smallest size is 256MB, but the recommendation is that you use at least a 1:1 ratio with your system's memory, with 2.5:1 being the high end.
It's good to note trends in the vernacular of computer geeks over the years. In recent years with storage becoming a central player, we heard words like ubiquitous and heterogeneous. The word for 2007 seems to be heuristic. Instead of using it in the wrong context or nodding in agreement when it's tossed out in conversation, let's just put a definition on it. One online dictionary defines it this way: "A computational method that uses trial and error methods to approximate a solution for computationally difficult problems."
Sounds a little iffy for a solution to a computer speed problem, right? Well, it's not a perfect science. It's what you might call an educated guess about what you're going to use. Suse Linux kernel developer Andrea Arcangeli says, "In many cases, preloading new memory means flushing away an existing cache." So it's not a risk-free, perfect arrangement.
If you remove the drive, nothing bad happens. Because all pages on the device are also on disk, nothing is lost. As for security, everything is AES-128 encrypted.
Make sure your drive is ReadyBoost capable; otherwise, you will find yourself frustrated that it doesn't work like you hoped.
Improving performance requires getting over the disk I/O bottleneck. Windows XP has a technology called Prefetch, and this is the next generation of that feature -- hence the name SuperFetch. These technologies improve memory management by keeping track of which applications you use most often and keeping them ready to load in memory. It also reorganizes data and applications on your hard disk to make them more available for loading into memory if it notes the need.
Jim Allchin, co-president of the Platform and Services Division, says, "We redesigned the memory manager in Windows Vista so that if you give the system more memory, it uses that memory much more efficiently than previous operating systems via a technique called SuperFetch -- part of Windows Vista's intelligent heuristic memory management system."
SuperFetch uses an intelligent prioritization scheme that not only determines which applications you use most often, but also the time of day you use them. So, if every morning you start with your Firefox browser, that is preloaded in the morning for you. If you go to lunch at noon every day and start work again at 1 p.m., SuperFetch can have your applications ready for you at that time. This solves one of the problems we always had in previous Windows versions -- the fact that leaving the OS idle for any period of time made the OS think it should just begin working on its background processes. But with SuperFetch, it knows to keep your applications ready.
To truly understand this technology, it would be good to ask "why" our post-lunch XP boxes were so sluggish. With an OS that uses demand paged virtual memory, when more physical RAM is needed, data gets flushed to the pagefile. So, when a person goes to lunch and another process starts to run on the machine during that time, all the person's applications and data are pushed to the paging file. So, we understand why it's pushed out, but when those other processes finish, nothing automatically calls that information back. When you sit down and start working, the system is sluggish because it's being forced to swap the data back into physical memory. SuperFetch foresees this problem and tries to be proactive about putting the applications you need back into physical memory.
You don't configure SuperFetch; it works all on its own. A folder called Prefetch is located under the C:Windows directory, and some have suggested making changes to this folder, but read the following note.
Where Is My Memory?
One of the complaints users have with SuperFetch (due to a lack of understanding) is that they remember how much available memory they had under XP's memory manager, and now in Vista, when they check out their available or free memory, it's next to nothing. Why is that?
Mythbuster: It's not often you can crush a myth that has been propagating for years (no, we aren't talking about the whole Bill Gates will give you thousands if you respond to this email myth). What we are talking about is the myth that you can clear out your Prefetch folder (in XP or Vista) or add a Registry key that enables SuperFetch for XP. The biggest advocate against this myth is tech guru Ed Bott, and you can read his tirade against it in his archives at www.edbott.com.
At C:windowsprefetch, you see a set of files with names that are related to your programs and with a .pf extension. This information was used and is used by Windows in fetching technology to improve performance. Some have said clearing this out improves performance. The basic answer is this: Don't clean out the Prefetch folder because it will not improve performance, even though some tips on the Web say otherwise. Windows manages the folder just fine and will only cause more work because Windows will just replace that information. As for adding a Registry key to XP, from the highest sources, this is not accurate.
Jeff Atwood addresses this on this site www.codinghorror.com. He explains the need to consider your memory as a cache, not as a resource. A cache that is empty isn't doing you any good, so Vista is trying to fill it with as much preemptive material as it sees fit using SuperFetch. Jeff says, "The less free memory I have, the better; every byte of memory should be actively working on my behalf at all times."
At the same time, Jeff makes a good comment in his article that one downside involves gaming. Some games rely on free memory that SuperFetch sees as available and takes. There are different opinions on whether all this is true, with arguments on both sides, but for us, we just want to know if we can disable SuperFetch if we want to.
Fortunately, SuperFetch can be disabled in a couple of ways. The easiest is to go into the Services tab through Administrative Tools and disable or temporarily stop the SuperFetch service.
You can also disable this in the Registry. Open the Regedit and check the value of EnablePrefetcher and EnableSuperfetch in the Registry under the HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerMemoryManagementPrefetchParameters Registry key.
Here are the descriptions of these values:0 = Disabled
1 = Application launch prefetching enabled
2 = Boot prefetching enabled
3 = Prefetch everything enabled (optimal and default)
The recommendation is that you ensure that it's set to 3 and leave this alone…but tweakers love to tweak.
Tricks of the Microsoft Windows Vista Masters
System Recovery and Diagnostic Tricks: Backup and Restore Center
System Recovery and Diagnostic Tricks: The System Rating
System Recovery and Diagnostic Tricks: Windows System Assessment Tool
System Recovery and Diagnostic Tricks: Problem Reports and Solutions
System Recovery and Diagnostic Tricks: Reliability and Performance Monitor
System Recovery and Diagnostic Tricks: Memory Diagnostics Tool
System Recovery and Diagnostic Tricks: ReadyBoost and SuperFetch
System Recovery and Diagnostic Tricks: Vista Recovery: Advanced Boot Options, WinRE, and WinPE
About the author
J. Peter Bruzzese is an independent consultant and trainer for a variety of clients, including New Horizons and ONLC.com. Over the past 10 years, Peter has worked for and with Goldman Sachs, CommVault Systems and Microsoft, among other companies. He focuses on corporate training. Peter is the author of Tricks of the Microsoft Windows Vista Masters and writes for Redmond Magazine. He travels frequently to speak at conferences and has been an MCT since 1998.