Question about cache flushing

FAQ, getting help, user experience about FancyCache
Post Reply
Jamix
Level 1
Level 1
Posts: 2
Joined: Sun Apr 14, 2013 11:59 pm

Question about cache flushing

Post by Jamix »

Hi,

I'm new to the forum and just wanted to say thank you for the opportunity to try this very useful software :)

I am caching my 240GB SSD (read & write), with a 2048MB cache size, and a defer write with a latency of 35 seconds.

I chose 35 seconds because (as I understand it as a n00b) windows sends the TRIM command to SSD's every 30s and I want the SSD and the cache to catch it. This should reduce wear on the SSD by trimming some data in-cache.

But my question is about write cache flushing.....

When I shut down the computer normally, the cache is obviously flushed to disk. But what happens when another program, for example an installer that asks to restart the computer, shuts the computer down. Does the cache still get flushed?

Does the write cache flush to disk in ALL shut-down situations (except for a full system crash, obviously)?

Just curious :)

Cheers,
Jamix
User avatar
Support
Support Team
Support Team
Posts: 2966
Joined: Sun Dec 21, 2008 2:42 am

Re: Question about cache flushing

Post by Support »

Jamix wrote:Does the write cache flush to disk in ALL shut-down situations (except for a full system crash, obviously)?
Yes.
dustyny
Level 8
Level 8
Posts: 118
Joined: Sun Sep 02, 2012 12:54 am

Re: Question about cache flushing

Post by dustyny »

I chose 35 seconds because (as I understand it as a n00b) windows sends the TRIM command to SSD's every 30s and I want the SSD and the cache to catch it. This should reduce wear on the SSD by trimming some data in-cache.
Well there are a couple of problems with this approach. You are putting your data more at risk and it doesn't accomplish what you are trying to do. One of my previous posts links to an article that explains why write delay is not always beneficial.

TRIM is simply a OS trigger that sends a signal to the SSD that there is a break in I/O so it can perform a zeroing out of the cell without creating a I/O contention which would slow down R/W operations. Even if your OS doesn't send the TRIM command the SSD will perform garbage collection on a regular schedule, it's just less efficient. However if your SSD isn't all that full the OS will write to a empty cell anyway, so you most likely wouldn't be slowed down by the wipe & write cycle. Not to mention that this all happens so fast that you'll rarely notice it, unless you have a lot of cells to wipe (as in you try to put something very large on the drive).

The write delay is not going to affect how often data is written to the SSD, it controls how data is written to your hard drive. The LV2 cache is only used when the LV1 cache size is exceeded which already reduces write operations to the SSD. So if you have a 2GB cache and you try to write 3GB of data it will first fill 2GB to the RAM and then only 1GB to the SSD.

Finally don't be so concerned about wearing out your SSD this is a 1st/2nd gen issue and has been mostly resolved these days. Baring malfunction or external causes (electrical spike) your SSD will last well beyond its usefulness. I posted a link article to the in a previous post from one of the big tech blogs that outlines just how much data you'd have to write to a drive to wear it out and it is MASSIVE (in the petabyte range I believe). It would require constant writing over months to wear them out and this is not a real world problem, write operations are not constant.

I'd suggest reading through the forums, I've posted a lot of information explaining how this all works.
Post Reply