Windows 7 Double Caching

Report bugs or suggestions around FancyCache
Post Reply
laferrierejc
Level 3
Level 3
Posts: 10
Joined: Wed Jul 27, 2011 11:51 pm

Windows 7 Double Caching

Post by laferrierejc »

So...

windows 7 does some caching of it's own, it will use all your available ram to cache stuff...

So? Should I even bother with a read cache?

It's a shame if I can't take advantage of my SSD to do some read caching. (Windows 7 has the same problem as Fancycache, non persistent read caching on reboots!).
Mradr
Level 7
Level 7
Posts: 87
Joined: Sun Mar 25, 2012 1:36 pm

Re: Windows 7 Double Caching

Post by Mradr »

That's where I am stuck on also. Atm, I am using 2 programs for both my read and write to speed up my computer.

Fancycache is nice... but has no persistent caching that's why I made that post below yours about the requested features people want with persistent caching at 1# of the list.

That is also why disabling L1 for just L2 is also on the list at 5# as Window 7 already does a greate job at caching most used data at the reading level.

To answer your question, long as you don't reboot your pc a lot, yes you can get by-by having a smaller L1 and a bigger L2. What I mean by this is to use the following settings:
c:\ drive (or the drive that will be accessed a lot):
Block Size: default
Algorithm: default
Cache Size L1: 128-256MB
Caching Strategy: Read-Only

Enable L2
SSD/Flash/Other Drive: set to the SSD
Algorithm: LBW
Size:5-10GB

If you are like me tho... rebooting once a day in a normal thing =/ At that point you will be stuck into using another program such as Eboostr as they seem to have a persistent caching design for your read caching and using FC as a write cach for the small 4k writes on the hard drive. Once FC gets persistent caching, then I would just use FC instead.
laferrierejc
Level 3
Level 3
Posts: 10
Joined: Wed Jul 27, 2011 11:51 pm

Re: Windows 7 Double Caching

Post by laferrierejc »

Yeah, I was afraid of all that.

I guess a solution would be to disable windows caching and just use fancycache.

I dislike eboostr tremendously. I don't like the way it caches and it will only cache the 1st partition amongst multiple partitions (I have my docs on one partition, programs on another, etc).

I found a way to get my own "persistent cache", which is to enable hibernation :)
Mradr
Level 7
Level 7
Posts: 87
Joined: Sun Mar 25, 2012 1:36 pm

Re: Windows 7 Double Caching

Post by Mradr »

laferrierejc wrote:Yeah, I was afraid of all that.

I guess a solution would be to disable windows caching and just use fancycache.

I dislike eboostr tremendously. I don't like the way it caches and it will only cache the 1st partition amongst multiple partitions (I have my docs on one partition, programs on another, etc).

I found a way to get my own "persistent cache", which is to enable hibernation :)
I would not disable window caching as it allows a better option. For example, windows is always caching data... your 4GB is already full of caching memory, but it still shows that over 4GB is free to use. Why? Well because windows will turn w/e cache it has into working set of memory once it is need and push out the unused cache as the program needs more ram unlike fancycache. FC data will always be there even if the data is not always for that program or not. At least for read anyways.... Write is a different story. Henc why I have two programs (one for read and one for write) untill FC can work out that last issue ^^;
laferrierejc
Level 3
Level 3
Posts: 10
Joined: Wed Jul 27, 2011 11:51 pm

Re: Windows 7 Double Caching

Post by laferrierejc »

Does windows 7 save the cached information during hibernation and/or suspend?

I was relying on windows 7 caching until I realized, that maybe it doesn't bother hibernating the cached data. Damn, why can't MS just buy fancycache.
mabellon
Level 3
Level 3
Posts: 10
Joined: Fri May 25, 2012 5:32 pm

Re: Windows 7 Double Caching

Post by mabellon »

I find your use of the term 'Windows 7 caching' somewhat confusing. Also, I'm not sure what you intend to disable.

1) Superfetch (introduced in Vista) is a prefetcher. It tries to learn your habits on what programs are used, and files touched, so that when you try to run your most commonly used programs the files/data are either already loaded into RAM or are loaded as quickly as possible as the app starts. Obviously when you reboot, 'nothing' is in RAM, and the prefetcher can start to bring things into RAM to hide disk latency. Note: As of Win7 this feature is disabled by default if your main drive is an SSD. (Some SSD tools like those provided by Intel will detect Superfetch and suggest disabling it).

2) (Grossly over simplified) The Windows memory manager loads files off disk and puts them into RAM. The memory is inuse at first. When no longer used, the files are still in RAM, but on the Standby list. When new files are loaded, Windows will use the Free memory (zeros). When the free memory runs out, the Standby list is repurposed based on priority. The 'Standby list' is shown in Resource Monitor, this is also whats labelled as 'Cached' in Win7 task manager. You can't disable this functionality.

A "persistent L1" is basically the equivalent of Superfetch. You want RAM pre-loaded or cached with files before you even use them. The FC L1 basically does the same thing as the Windows memory manager in #2. If FC has something cached, Windows either has it in-use, or probably on the Standby list (that is 2 possible copies wasting memory). The only advantage of FC's L1 seems to be that it will cache unbuffered IO (things where Apps basically opt-out of letting Windows cache things). This makes it seem amazing in benchmarks (they use unbuffered IO to stress the actual disk performance). I'm still looking for any real world test case where the L1 is helpful for reads; write performance is a different story.

*EDIT* Forgot to add:
I was relying on windows 7 caching until I realized, that maybe it doesn't bother hibernating the cached data.
You can test this easily by checking Standby (resmon) or Cached (taskman) before and after hibernate. I just checked my laptop - you are right these pages are not preserved in Windows 7 after hibernate. I think Vista may have actually, but I don't have a system around to verify. But this makes perfect sense, if you have gigabytes of stuff on the Standby list, writing it out to disk during hibernate just means that hibernate will take longer to enter into and get out of. (My Intel SSD is 80MB/s sequential write. That means 12.5secs for each 1GB.) Why write out any of the cached data a second time, its already on the disk. If you have a spinning HDD, when resuming from hibernate there will be a bunch of free memory and Superfetch should kick in to fill it back up. In that case you resume from hibernate much faster (only reads back in the bare minimum) and Superfetch "remembers" what stuff is important and will prefetch that back into RAM silently in the background. If that is something you want with an SSD, see that Superfetch is enabled.
JimF
Level 4
Level 4
Posts: 36
Joined: Sun May 01, 2011 10:13 pm

Re: Windows 7 Double Caching

Post by JimF »

mabellon wrote:I find your use of the term 'Windows 7 caching' somewhat confusing. Also, I'm not sure what you intend to disable.

1) Superfetch (introduced in Vista) is a prefetcher. It tries to learn your habits on what programs are used, and files touched, so that when you try to run your most commonly used programs the files/data are either already loaded into RAM or are loaded as quickly as possible as the app starts.
That is a nice explanation. My problem with Superfetch is that it tries to second-guess you too much, since it thinks you will need a certain program at a certain time of the day on a certain day of the week. I think it is really intended for office workers who load Office at certain times. I have not found it of much use, and it just takes a longer time to boot up. With my SSD, there is not much need for read caching anyway, though I wouldn't turn it down if it only cached what I actually read, not what it thinks I need. (For my needs, write caching is much more important anyway, since I do several distributed computing programs that write a lot to disk.) You are right that the distinction need to be made more clearly.
mabellon
Level 3
Level 3
Posts: 10
Joined: Fri May 25, 2012 5:32 pm

Re: Windows 7 Double Caching

Post by mabellon »

Well Superfetch does 3 distinct things
1) Watches the files touched during boot from startup services and apps. It makes sure these are on the disk to be sequentially read in - fastest for spinning HDDs.
2) Watches the files touched when a particular applications launches (dlls, binaries etc). Same thing as #1.
3) Prefetches things before you use them.

#1 and #2 are based on actual file access patterns, so their is no second guessing here. When you boot, or launch a given app, the files that you definitely will need are read in as fast as possible. The benefit is large with HDDs because random access is so much slower than sequential. With SSDs the benefit would be more difficult to measure.

#3 is predicting the future. If your computer usage pattern is truly completely random then its not going to be as effective for you. Also as you've stated if you've already got an SSD, random reads are so fast that the prefetchers impact is limited, especially if it can never be 100% accurate. According to this source, the prefetcher runs at low priority so it shouldn't have much of a negative impact for disk IO.

Source
http://www.osnews.com/story/21471/Super ... orks_Myths

PS: If you want some limited write caching, enable these: http://support.microsoft.com/kb/324805. Two things to enable if you are feeling risky with your data (or not afraid of power loss). Easily 4x+ faster for 4K random writes.
JimF
Level 4
Level 4
Posts: 36
Joined: Sun May 01, 2011 10:13 pm

Re: Windows 7 Double Caching

Post by JimF »

mabellon wrote:PS: If you want some limited write caching, enable these: http://support.microsoft.com/kb/324805. Two things to enable if you are feeling risky with your data (or not afraid of power loss). Easily 4x+ faster for 4K random writes.
I always have that write-caching enabled; in fact, I think it is enabled by default in Windows. But as I recall that is limited to the cache on the drive itself, which is usually only 8 to 64 MB. However, I need several hundred MB to cache my writes, so I use FC. But you do need a back up power supply in that case, so I use an APC Back-UPS 750, with automatic shutdown via the USB cable in case of a prolonged power outage. Usually, we just get an occasional power glitch of less than a second though, and it rarely shuts down, though it could crash without the UPS.
Post Reply