Register | Login  
blog
You must be logged in and have permission to create or edit a blog.

Thinking Beyond > Blog

Vista Memory Management - Super Fetch

I think Microsoft has been doing serious thinking in the area of OS performance and they better be as they add complex features which eat up performance. This is evident in the latest super cool feature called Super Fetch which is touted to bring in a lot of performance gains.

It essentially predicts which pages should be brought to memory by evaluating (through time) the user's disk access behaviour for that computer. Typically say when you go out for a coffee, a service runs or an autoupdate program runs or a virus tool runs. In that time, these background programs based on the files it accesses replace existing pages and bring in new pages into memory. After your coffee session is over, you start working and you find the computer is slow - this is because the files which were important just before you went for your coffee are no more in memory and is lying in the disk to be fetched again and placed in the memory.

Suppose if the OS restores the memory state similar to what it was before you went for a Coffee or atleast keeps the files in memory which you think you will be accessing or working on after your Coffee break, how cool it would be?

This is exactly what Super Fecth tries to do by understanding user's presence and user disk access behaviour. It figures out what memory pages you would be interested in future though they are not currently demanded by any program and brings them to memory before hand. When the future happens magically the data page is already in memory and need not be fetched from the disk! Hence your file open is done so fast!! Ofcourse the fetching of these futiristic forecasted pages will be done during idle time with idle I/O priority.

They also have feature called Ready Boost/Drive which uses a flash drive or a USB key drive to be used as an intermediatary memory layer for the disk drive. So you could mimize disk access by inserting a flash drive which acts as intermediate non volatile storage area. As the flash drive access time will be much lower than disk access time this intermediatary storage layer is a boost for data access performance.

When you complain of performance issues, typically the sysadmin says, please run the defragmenter. Now this is very tedious task as the defragmenting a 80 GB disk is a laborious process and takes lot of time. But then is there any use in compacting file fragments of files which you never access? This is where superfetch gives clues to a mini defragmenter as to which of the files it needs to defragment. As the files of interest would be a very small subset compared to all the files in the disk, the defragmentation process takes very little time. As we would only need to access these predicted files of interest during our day to day operation and that set is defragmented regularly and quickly, the overall disk movement is reduced in fetching relevant files, thus increasing the disk access performance to a great extent.

Till now we were fetching and placing in memory more data than what is demanded by forecasting demands. But let us look at what happens when computer hibernates. The whole memory state needs to be captured in the disk and restored when we wake up from hibernation. Suppose we had a 2GB RAM, that would be a lot of Disk Access to store everything into Disk and here Vista does an intelligent prediction of what subset we need when we come back and only stores those memory pages in the disk. This way, the time taken to Hibernate and wake up is reduced and at the same time it does not comprome on future access speeds after waking up as it would have stored the most needed data.

Think about other side effects - Longevity of Disks as super fetch reduces disk activity and less power consumption...

Isnt this cool??? Do you want to listen to the Architect who was behind this - click the below link...

http://channel9.msdn.com/Showpost.aspx?postid=242429

Posted by: sridhar  on 7/19/2007 11:50 PM
Copyright 2010 iLink Systems, Inc. Privacy Policy | Disclaimer