Superfetch + Readyboost explained. *LONG*

BD2003

Lifer
Oct 9, 1999
16,815
1
81
There is a LOT of confusion about readyboost and superfetch. Let me try and clear this up once and for all. I'll assume complete unfamiliarity with memory management and caching.

Memory is king - it has stupendously fast read/writes, sequentially and random. In a perfect scenario, *everything* would be in memory, but its quite expensive.

Hard disks are cheap, mass storage. They have decent sequential transfer rates, and horrendously slow random transfer rates, due to their mechanical nature. In a perfect scenario, HD's would only be used for storing files that are rarely accessed. The HD is a massive bottleneck to overall system performance, and has not kept up with the advances to the rest of the PC.

Flash memory (including USB sticks) are cheap, but relatively low capacity. They have fairly slow sequential speeds, but random speeds are dozens of times faster than hard disks. In the perfect scenario, only tiny (measured in kb) files, that are often, randomly accessed, should be on it.

Using all three together, Vista is trying to do it's best to maintain those perfect scenarios, where the data always comes the fastest, most appropriate place possible.


First, the XP/2000 way of doing things:

RAM <-> Disk

In RAM, you have active program code, and "free" memory consists of the disk cache. The cache contains the most recently accessed files, no matter what they are - first in, first out. If you access data stored in the cache, it's there for you essentially immediately.

The retroactive nature of the XP disk cache severely limits it's usefulness - the cache speeds up load times dramatically - but the program was already just loaded, or else it wouldnt be in the cache in the first place! But if you frequently use the same data/applications, that data should always be in the cache. But ANYTHING can take over this cache, even things you normally wouldnt want cached - running a virus scanner, a large bitorrent download etc, will completely wipe it out, filling it with useless data, *no matter how much memory you have*, putting you back at ground zero, having to load everything from the slow hard drive. This is a less than ideal situation.

RAM is a finite resource, and when its filled to capacity with code, not only is there no longer room for a decent disk cache, the hard disk gets used as spare RAM, via the "page file". The lack of cache is bad, but using a HD as RAM is worse.

A HD is so much slower than RAM, that it makes a very bad substitute. Worse yet, in the typical one drive scenario, the same hard drive has to read the new files being written into RAM at the same time it is writing files to disk OUT of ram, and this is a complete disaster, and slows the system down to a crawl.

Preventing these bad situations from ever occuring is pretty much the *sole* reason you want as much RAM as possible - in XP. But even with several GB of RAM, you will still have to hit the HD for files that arent preloaded, and that cache can still contain useless data, wasting a valuable resource.


The point of SF and RB in Vista is to change all that:

RAM <-> Flash <-> Disk
^
|
Disk

The first, most crucial change, is to proactively cache data in RAM, instead of waiting for the user to load it first - this is what superfetch is all about.

On just about any given system, the same applications and data is accessed over and over. Often at different times of the day, or on different days of the week. Ideally, the programs would already be in memory before you open them up.

So instead of a dumb cache, superfetch is a smart cache, constantly managing your memory to make sure what you need is already in memory *before* you use it. So rather than waiting for you to load a program/file off of the hard drive before caching it, superfetch analyzes which programs you use most often, and when you use them. It will use this information to manage and preload the cache behind the scenes, so hopefully what you need is already there. And remember, it's not *hogging* your memory by doing so - disk cache is still considered "free" space.

And it works really, really well - I can confirm this from personal experience. During the day, I primarily do email/office work...but at night I game. Every morning, every program I use is already precached. Even the images from websites I visit often are cached. And at night, when I fire up COD2, it comes straight from memory, and loads damn fast. Not only that - since I'm always playing on the same multiplayer maps, even THOSE are precached. The difference is night and day - as long as you have enough memory, the HD is significantly less of a bottleneck.

Just as important as preloading the cache is properly maintaining what's in it - so superfetch ignores the data you *don't* want cached - such as the activity of a virus scanner or disk defragmenter. Putting the right things in is important, but keeping them there is just as important.

So in essence, even though any new OS will naturally use more memory than the older ones, Vista manages that memory so much better than not only is that less of an issue, but overall system responsivness is much improved.

Furthermore, there is much more to gain in Vista by adding a ton of memory. Rather than sit idle and useless as it often would in XP - ALL your memory can be put to a good use, at all times.

But it still can't completely take the hard drive out of the equation. Memory is still a finite resource, and no matter how smart the cache is, there will still be files that it doesnt know to preload, and memory can still be consumed by running programs. Readyboost is the second part of that equation.

Compared to the HD, flash still beats it out in random I/O speed due to access times; accessing randomly placed, *small* files quickly.

This is important in two scenarios:

1) It a good secondary disk cache. For instance: browser caches, bitorrent files, web servers, email, game files, etc.

Many of these things are rarely accessed, so they won't be precached by superfetch - so no matter how much memory you have, there is still a use for readyboost. At it's heart, this is ALL readboost really does - but your disk doesnt just contain data files, it's also spare memory in times of need.

2) Most page file activity is small and random - just what the USB stick is good at. So even though technically, it does not serve as a substitute for memory, by serving as a cache for disk, which contains that page file, it can help out quite a bit.

But flash is *nowhere near* the speed of memory for random I/O. But its at least a dozen times faster than a hard disk. And the more it can read from flash, the less it has to swing that head around. It doesnt completely alleviate the nightmare swapping situation, but it's still a vast improvement.

And adding a usb stick is cheap, easy, and ANYONE could do it, no matter how much of a noob they are. So while anyone can get some benefit from RB, the most benefit is going to be seen by those with low memory, and those who can't or won't upgrade memory - And they're often the same people. They have little ram disk cache, and a LOT of page file activity.

But there's still a few issues here to be addressed:

1) HD's are faster than flash for sequential I/O. And RB is aware of this - it will get out of the way and let the HD do it's thing if the HD can do it better.

2) USB sticks can be pulled out at any time - And again, RB is ready for this. Everything that is written to RB is either already on disk or in memory (since that where it came from), or written first (page file). You won't lose any data from cached files, your system won't crash from the loss of cached memory pages. Although since it can be pulled out while the computer is off, it can't rely on it being there when it boots or comes back from standby - so the cache will have to be rebuilt.

On top of that, all of the data cached on the stick is encrypted - so you don't have to worry about someone stealing your stick and going through the cached files.

And not only is it encrypted, it's also compressed. The benefit of this is twofold - first, you can fit more cached data on the stick. Second - compressed data is smaller, and can be transferred to memory faster.

So that's how it stands right now - the two technologies combined go a lot way towards taking the HD out of the equation, and they do it intelligently and safely. Any overhead consumed by them is far outweighed by it's benefits except in the most obscure applications. It's a vast improvement that is difficult to measure. But thats just the beginning, it is going to get even better in the near future:

1) Since one of the primary uses of flash is digital camera storage, which is entirely sequential in nature, most flash cards, and many USb sticks are tuned for seq speed, not random speed, which is inappropriate for readyboost, so a new class of USB sticks is emerging, that is tuned for random I/O, just for RB. So if you want to buy a stick exclusively for RB, right now, here is the one to get:

http://www.newegg.com/Product/Product.asp?Item=N82E16820233043

2) But it doesnt *have* to be external! Better than even the most well tuned USB stick would be an internal drive. A large, fast SATA flash drive would be good. Flash right on the motherboard, with direct memory access - even better. And they're coming *very* soon. They'll be tuned for random access, with less overhead since they won't need USB or encryption. And since they aren't going anywhere, they can cache across boots and standby. They'll put the best USB sticks to shame.

3) Superfetch works good managed automatically, but in the future, you'll have the option to customize it somewhat. This will be of great use to gamers - since games are often linear in nature, superfetch as it stands wouldnt cache them - but if you can tell it in advance, it can cache it in advance, and load times can be drastically reduced even more, with enough memory.
 

Lemon law

Lifer
Nov 6, 2005
20,984
3
0
Would it not better to either superfetch or ready boost the entire vista OS on a flashdrive as read only memory---and then use any remaining space to cache frequently loaded programs---again as read only.

And then use a hard drive to store data---and if a virus ever struck---with the only thing that could be corrupted being data.
 

BD2003

Lifer
Oct 9, 1999
16,815
1
81
Originally posted by: Lemon law
Would it not better to either superfetch or ready boost the entire vista OS on a flashdrive as read only memory---and then use any remaining space to cache frequently loaded programs---again as read only.

And then use a hard drive to store data---and if a virus ever struck---with the only thing that could be corrupted being data.

Nah, that would be unreasonable. There's still plenty of sequential I/O that is better coming off the hard drive, and theres no point in caching the entire OS - it only makes sense to cache that which you actually use.
 

Puffnstuff

Lifer
Mar 9, 2005
16,148
4,848
136
I already ordered that usb drive earlier today for that express purpose. I'm hoping that it will speed me up even more and I plan on adding one of those to each of my vista machines.
 

AsianriceX

Golden Member
Dec 30, 2001
1,318
1
0
One point some may wonder about is how long a flash device can last when used as part of ReadyBoost. A quick google picks up this.

http://blogs.msdn.com/tomarcher/archive/2006/06/02/615199.aspx

Q: Won't this wear out the drive?
A: Nope. We're aware of the lifecycle issues with flash drives and are smart about how and when we do our writes to the device. Our research shows that we will get at least 10+ years out of flash devices that we support.

I wonder what the average lifespan would be in real world testing.
 

lxskllr

No Lifer
Nov 30, 2004
57,990
8,225
126
Originally posted by: AsianriceX
One point some may wonder about is how long a flash device can last when used as part of ReadyBoost. A quick google picks up this.

http://blogs.msdn.com/tomarcher/archive/2006/06/02/615199.aspx

Q: Won't this wear out the drive?
A: Nope. We're aware of the lifecycle issues with flash drives and are smart about how and when we do our writes to the device. Our research shows that we will get at least 10+ years out of flash devices that we support.

I wonder what the average lifespan would be in real world testing.

I don't think it matters one way or another. I'm using a 2gb compact flash card that I payed $10 for after rebate. Lets say Vista really chews up flash memory and it wears out in a year. I can live with $10 a year for better performance. In reality I'm sure the flash memory will outlive the system it's used in.
 

Skeeedunt

Platinum Member
Oct 7, 2005
2,777
3
76
Interesting read, thanks for posting. I kept reading about ReadyBoost, but never really paid any attention to SuperFetch... which sounds much more interesting. Did I read correctly that superfetch data is never stored on readyboost drives?

And I've been wondering what will happen when a readyboost drive does start to fail. I would assume that there's some kind of parity/error checking going on, and that you won't start BSOD'ing and corrupting files...?
 

makken

Golden Member
Aug 28, 2004
1,476
0
76
so about readyboost..

what would be more benefitical for it, faster read / write speeds on the media, or more of it? for example, if you had a choice between a USB stick with X memory and 2Y read / write speed vs. one with 2X memory and Y read / write speed, which would be the better choice for a readyboost drive?
 

Dulanic

Diamond Member
Oct 27, 2000
9,951
570
136
Is there any reviews showing or benchmarking the difference readyboost could make?
 

Mem

Lifer
Apr 23, 2000
21,476
13
81
Originally posted by: Dulanic
Is there any reviews showing or benchmarking the difference readyboost could make?

Anandtech's homepage has a nice Vista guide on ReadyBoost etc...link.
 

SickNic

Member
Sep 29, 2006
53
0
0
Very informative read. I've been reading up on hybrid hard drives that use gigs of flash memory in conjunction with the hard drives with platters. They've already started to put flash hard drives in laptops to reduce power consumption. I can't wait until flash hard drives and hybrid drives hit the market for consumers.
 

InlineFive

Diamond Member
Sep 20, 2003
9,599
2
0
Originally posted by: SickNic
Very informative read. I've been reading up on hybrid hard drives that use gigs of flash memory in conjunction with the hard drives with platters. They've already started to put flash hard drives in laptops to reduce power consumption. I can't wait until flash hard drives and hybrid drives hit the market for consumers.

I am very excited about those. If they continue to use SATA we should be able to use them in our current laptops.

OP: Nice write up, you convinced me to buy that 1GB TurboFlash drive in addition to another 1GB of memory. Retailers rejoice!
 

BD2003

Lifer
Oct 9, 1999
16,815
1
81
Originally posted by: Skeeedunt
Interesting read, thanks for posting. I kept reading about ReadyBoost, but never really paid any attention to SuperFetch... which sounds much more interesting. Did I read correctly that superfetch data is never stored on readyboost drives?

Well, data is data. The truth is, I dont know exactly *how* the readyboost cache is filled - I just cant find that information. Whether its a smart cache like superfetch, caching only useful stuff, or it just caches everything...don't know for sure. I do know there is a synergy between the two.

And I've been wondering what will happen when a readyboost drive does start to fail. I would assume that there's some kind of parity/error checking going on, and that you won't start BSOD'ing and corrupting files...?

I dont know for sure, but being that everything on the RB drive is redundant, there shouldnt be a problem.

what would be more benefitical for it, faster read / write speeds on the media, or more of it? for example, if you had a choice between a USB stick with X memory and 2Y read / write speed vs. one with 2X memory and Y read / write speed, which would be the better choice for a readyboost drive?

That would depend on your application I suppose - if you're running a server etc, and you have huge amounts of files, the bigger stick might be better, even though its slower, just cause it caches more.

But for a gaming system or general usage, I'd go with the faster one over the larger one.

And I'd say if you have 512mb memory, bigger might be better than faster, but for a 2gb+ system, don't bother with anything but the fastest you can find.
 

Kalmah

Diamond Member
Oct 2, 2003
3,692
1
76
Great info. Thanks for your time and effort.

Now who wants to donate ~$2000 so I can do an overhaul on my system and buy vista?

When I get vista, I don't want to go into it half-as@. I need money!!

...

Anyone?

 

InlineFive

Diamond Member
Sep 20, 2003
9,599
2
0
Originally posted by: Kalmah
Great info. Thanks for your time and effort.

Now who wants to donate ~$2000 so I can do an overhaul on my system and buy vista?

When I get vista, I don't want to go into it half-as@. I need money!!

...

Anyone?

You're fine as it is. Granted you might want another 1GB and to wait until nVidia gets their act together.
 

MikeyLSU

Platinum Member
Dec 21, 2005
2,747
0
71
Can you explain a couple of more things to me.

How much would this be used in a system with 2GB of RAM? Would you notice a difference? What about for regular applications? Gaming?

My current USB drive does not pass the test and can not be used for this. I'm very close to pulling the trigger on this one. I'm just not sure how much it will help things.
 

InlineFive

Diamond Member
Sep 20, 2003
9,599
2
0
Originally posted by: MikeyLSU
Can you explain a couple of more things to me.

How much would this be used in a system with 2GB of RAM? Would you notice a difference? What about for regular applications? Gaming?

My current USB drive does not pass the test and can not be used for this. I'm very close to pulling the trigger on this one. I'm just not sure how much it will help things.

I've noticed a bit of a positive difference for day-to-day applications. The largest improvement for me was with FPS and MMORPGs. Take a look at the Anandtech article on Vista, they have some benchmarks in there for 512MB, 1GB and 2GB of memory.
 

BD2003

Lifer
Oct 9, 1999
16,815
1
81
Originally posted by: MikeyLSU
Can you explain a couple of more things to me.

How much would this be used in a system with 2GB of RAM? Would you notice a difference? What about for regular applications? Gaming?

My current USB drive does not pass the test and can not be used for this. I'm very close to pulling the trigger on this one. I'm just not sure how much it will help things.

It *will* be used. Much more for the gaming than for the applications. Gaming pushes ram usage more than anything, and although it won't give you higher FPS, it can smooth out some of the bumps and jerks. It's probably not so much something you will notice when it's on, but something you will notice when it's missing.

If you want the fastest system possible, it's $20 well spent.
 

rseiler

Senior member
Apr 17, 2000
200
0
76
How intelligent is Superfetch exactly?

I was watching its behavior recently via the Reliability/Performance monitor, because I started noting my disk on solid red for egregiously long periods (this is a 2GB RAM system).

What was it interested in at the time? A 170MB Nero installer that I'd used recently; you'd think it would realize it was an installer and therefore not something you're apt to run again anytime soon, if ever (UAC can detect installers, why not Superfetch). Far worse, it was also reading an 8GB VM file. Yes, 8GB. And it was reading it (I could even see how many MB/s). And this was happening while I was otherwise using the system (but not that file)--so much for background operation.

So I ask given just these two examples how smart Superfetch actually is and why disabling it wouldn't be a net gain.
 

delco007

Member
Mar 16, 2006
59
0
0
Hi Mark,
I loved the way you have explained the working of primary and secondary memory but it reminded me of a question which has been ringing at the back of my head for a looong time .
I have heard that these features were already present in a certain MAC os , if that is correct then wouldnt it be true that Microsoft has copied their features ? Also i would like to know if Microsoft can be credited for making a good Operating system or its just that they have copied features from here and there and Jumbled them together and named it their new Operating system ???

I would love to know the truth .

Bye for now
Guru .
 

Lemon law

Lifer
Nov 6, 2005
20,984
3
0
I would also assume that superfetch, because it uses ram which is volatile, needs some processor idle time after boot up to load the memory up. So the benefit is not immediate after boot up but only becomes apparent some time after boot up. And the more memory you have, the longer the time it takes load once it learns your habits.

Which then moves onto question two. Namely---how much ram can superfetch use assuming you have the 64 bit version? Is their an end limit or is it almost the sky is the limit? Because I see some folks are now outfitting their computers with 8 gigs of ram.

And I also note that at least one program developer I know of is trying to implement some version of superfetch for XP---and the question is if its possible to do so efficiently--I now have 1.5 gigs of ram in my XP pro computer
due to an very attractive deal I happened to run across---and most of the increased ram just sits unused by win XP.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |