About defer write (question)

FAQ, getting help, user experience about FancyCache
Post Reply
TylerCiggy
Level 2
Level 2
Posts: 6
Joined: Tue Jul 24, 2012 11:38 am

About defer write (question)

Post by TylerCiggy »

I kinda understand how defer write works... but I have some questions.

The benchmarks that we can see in the main page uses 1h defer write with only 1gb of ram caching with amazing results.

It is supposed that there wont be difference between 10segs or 6000segs unless you activate the option "release after write", but I want to be sure about it.

The other question is:

What if I have 8gb ram L1 caching, the L2 caching into a SSD would help ?
dustyny
Level 8
Level 8
Posts: 118
Joined: Sun Sep 02, 2012 12:54 am

Re: About defer write (question)

Post by dustyny »

Let me warn you that write defer is dangerous to your data and you may experience corruption if your machine crashes or is shut off suddenly. If you have important data that you can't afford to lose, back it up or don't use it with write defer turned on.

Forgive my math the real numbers should be in increments of 1024 but I'm simplifying to 1000 for simplicity sake.

When you have write defer turned on for 10 secs, that means for 10 secs it will hold the data in ram then then after 10 secs it will start to write the data to the disk. So for 10 secs (if you have enough ram assigned) you'll be able to disk at the speed that your ram runs (lets say 1GBs) after that point you're write speed will reduce to the speed of the HDD. If you activate release to write you will flush that data out of your lvl 1 cache before you flush any other data. So you'll lose the benefit of having that data in your RAM if you try to ac.

Lets say I'm working on a Photoshop file. It's a big one at 1GB, I save it from photoshop and it writes to ram in 1 sec (1GB/1GBs = 1sec). Now that file is in the lvl 1 cache and it is queued to write to the HDD which writes at 100MBs, 10 secs goes by and the data in the lvl 1 cache starts to write to the HDD which takes 10 secs (1GBs\100MBs=10). Now the file is still in RAM and if you try to open it again, it will read from the lvl 1 cache at 1GBs instead of off the HDDs at 100MBs. But if release after write is enabled that data will be removed and the next time it is opened it is read from the slow HDD instead of the fast lvl 1 cache.

Now lets say I have 1GB of lvl 1 cache & 1GB of lvl 2 cache, I open the photoshop file and now I increase it's size to 2 GB. Now when I save the file I've exceeded the lvl 1 cache size so it writes 1GB to lvl 1 and 1 GB to the SSDs. Once the write defer time expires it will take the 1GB of lvl 1 data & the 1GB of lvl 2 data and it will write them to the HDDs as a 2GB file.

Finally keep in mind you'll lose the benefit of the cache everytime you reboot (for now). So if you try to run a game or an app it will always pull from the hdd first and then 2nd time you try to access that data it will pull from your cache.
Post Reply