Smart defer write

Report bugs or suggestions around FancyCache
Post Reply
User avatar
RAMbo
Level 6
Level 6
Posts: 73
Joined: Wed May 11, 2011 7:50 am

Smart defer write

Post by RAMbo »

The user configures the cache/buffer size of the hard disk.
Let's assume that size is 16MB.
Defer write should have a setting to write 16MB blocks.
HD buffers are fast and mainly limited by the speed of the interface. SATA-150/300/600
In the example below I assume a 16MB cache, 100MB/s disk speed and a 300MB/s interface speed

When the FC's write buffer is full or the latency period expired data must be written to disk.
If 116MB has to be written to HD the FC flushes with a speed of 300MB/s for the first 16MB and 100MB/s for the remaining 100MB.
FC should take more advantage of that hard disk buffer.
For example by starting to flush the write cache when 95% at the latency time.
And/or when 95% of FC's buffer is full.
FancyCache should become more proactive by trying to keep the buffer at 95% full.

I don't know if the above would work equally well/bad with the volume or disk edition.
Does Windows file buffering mess up the above idea. If yes tehn just switch of the Windows cache :mrgreen:
BikeHelmet
Level 4
Level 4
Posts: 20
Joined: Thu Apr 14, 2011 10:33 am

Re: Smart defer write

Post by BikeHelmet »

I'm not sure if what you're suggesting would do what you wish it to.

But I wouldn't mind a way to configure how large of blocks FancyCache writes. You could shrink the blocks to improve read responsiveness, or increase their size to improve write efficiency. (at the cost of some responsiveness)

HDDs are quite fast now - many average about 120MB/sec, or 120KB/ms. Factor in a 10ms seek and 10-15ms of writes - any modern HDD can probably manage 1-2MB writes at a time, and will only be busy for that 20-25ms. HDDs are getting faster, so a couple years from now we'll be wanting 2-4MB writes. Or if your computer is running off an old drive, you'd want 512KB-1MB writes. And for modern SSDs, you might want 8-64MB writes.

I'd also like a way to tune the number of writes done at once. An SSD can easily do 400 4KB writes without locking up for very long, but for an HDD you would probably only want to do 2-6 or it'd impact responsiveness. Maybe even less for Green drives. I think being able to tune these values would improve the usefulness of features like "Averaging Write Amount".


One other thing I was thinking - I'm not sure if this is outside the scope of the software, but it'd be great to be able to command FancyCache to always cache certain things. I know FancyCache is a block level cache, so I don't know if it's actually possible - but it'd be nice having a way to force it to cache files/folders. My ideal interface would be a Tab similar to HashTab allowing you to indicate which folders should be cached. The info could then be saved to an easy to edit ini file in its folder. I know when I've run low on memory (from opening far too many webpages), sometimes my start menu gets swapped out and is then slow to be accessed. To me a way to stop this from happening would be absolutely invaluable. :D
-BikeHelmet
Post Reply