FancyCache Demo - Reduces Writes to Solid-State Drives
Solid-state drives (SSDs) offer improved performance, more power efficient and noise reductions, compared with traditional rotating hard disk drives (HDDs). However SSDs have the limited life expectancy of erase/write cycles, after which they no longer perform reliably. Now with the help of FancyCache's Defer Write function, writes to SSDs can be reduced in three aspects.
Consolidates the multiple writes on the same address
When Defer Write function is on, the multiple writes which target the same address are consolidated into one write, thus reducing a lot of redundant writes. Below is a simple experiment to show the effect.
Test Platform:
HDD (disk #1): ST31000528AS
SSD (disk #2): OCZ Vertex SataII 32GB (Volume Q: NTFS file system)
OS: Microsoft Windows 7 Ultimate (32bit)
FancyCache Settings:
Enable FancyCache on volume Q: which belongs to SSD. Set Cache Size to 1024MB and enable Defer Write. Here we set the write latency to 1 hour in order to simplify the demonstration.
Now turn on the statistics monitor and do the following steps.
Step 1. Copy a file from disk #1 to volume Q:. Here the file size is 300MB. From the statistics monitor, we can see the Write Bytes (Total) increases about 300MB.
Step 2. Copy and overwrite the same file from disk# to volume Q: again. Repeat this step N times. As expected, the Write Bytes (Total) increases about (N * 300) MB.
Step 3. Click "Flush Write" button to flush all the deferred data to the disk. We'll see that the final write bytes to the disk which indicated by Write Bytes (Deferred) is about 300MB only, instead of ((N + 1) * 300) MB
Note: When Defer Write is on, Write Bytes (Total) refers to the total write bytes received from the file system and required to be written to the disk, And Write Bytes (Deferred) refers to the total bytes written to the disk.
Supports TRIM command to avoid writing deleted data
TRIM command was introduced for SSDs to facilitate garbage collection. Originally TRIM command can't prevent the data which will be deleted later from being written. However now it becomes possible with FancyCache's Defer Write function. FancyCache handles TRIM command and removes the corresponding writes in the cache, thus avoid writing redundant data. Below is the experiment. The test platform and the FancyCache settings are same as the previous experiment.
Step 1. Turn on the statistics monitor. Copy a file to volume Q:. Here the file size is 300MB. In the statistics monitor, the Write Bytes (Total) increases about 300MB. This means there are 300MB data received and waiting to be written to SSD. If the Defer Write is off, these 300MB data will be written to SSD immediately.
Step 2. Permanently delete this file. Wait about 30 seconds after which Windows will issue TRIM command. Soon, the statistics monitor shows the Trimmed Blocks (Total)which means the number of deferred blocks trimmed.
Step 3. Click "Flush Write" button to flush all the deferred data to the disk. We'll see that the final write bytes to the disk is about 100KB only instead of 300MB!
Note: Windows, excepts Windows 7 and Windows Server 2008 R2, doesn't support TRIM, so this scenario applies to Windows 7 or 2008R2 only and requires NTFS file system.
Aligns and combines small writes to the SSD's block size
FancyCache detects the SSD's block size and tries to align and combine small writes to the block size as possible while writing the deferred data. This helps to improve SSD's write efficiency and reduce write cycles. Please refer to the comment #3 in the Iometer testings.
Conclusion
With Defer Write function, FancyCache can avoid the redundant writes and reduce the writes to the SSD, thus prolonging the lifespan of the SSD. Of course, users are expected to know that a power outage might result in data loss or corruption when Defer Write is on.
E-mail To:




