Difference between Write Cache & Defer-Write
Posted: Sun Mar 24, 2019 2:33 pm
Trying to make sure I understand how this works.
My usage case is that I have a large single HDD storage drive that uses shingled technology so the writes speeds are pretty horrendous (50-80MB/s), especially after sustained writes of 100GB+ (4-10MB/s). I am going to use a large SSD to buffer the writes to the HDD.
If I understand the terminology correctly....
Write-Cache: The writes still go to the HDD, but are also mirrored in the SSD, so that if that data has to be retrieved again in the near future you read from the SSD instead of the HDD. This is different from Read-Cache in that it is caching the most recently created data, where as Read-Cache caches the most used (popular) data. Example: You copy a movie to a HDD, then you want to stream the movie. The movie will stream from the SSD since it was recently added. But the movie was physically copied to the HDD at the same time, so transfer speeds were that of the HDD.
Defer-Write: The writes go to the SSD first, and then later are flushed to the HDD as one big sequential write. When transferring data, the write speeds will be that of SSD.
So far in my tests, Write-Cache has almost the same write speed as the HDD (less than 100MB/s). With Defer-Write the write speeds are several hundred megabytes per second, which is what I want.
Question 1: When using Defer-Write, during the time that the data has not been flushed, it acts as Write-Cache? Meaning if the data that was just written to the SSD has not flushed, but is requested, it will read from the SSD? Or does it flush that data to the HDD and then HDD answers the read request?
Question 2: Will the HDD still be defrag'ed over time? Since my usage case is for storing media, I don't foresee fragmentation being an issue, but just wondering if the operation is still able to happen with the cache layer inbetween.
My usage case is that I have a large single HDD storage drive that uses shingled technology so the writes speeds are pretty horrendous (50-80MB/s), especially after sustained writes of 100GB+ (4-10MB/s). I am going to use a large SSD to buffer the writes to the HDD.
If I understand the terminology correctly....
Write-Cache: The writes still go to the HDD, but are also mirrored in the SSD, so that if that data has to be retrieved again in the near future you read from the SSD instead of the HDD. This is different from Read-Cache in that it is caching the most recently created data, where as Read-Cache caches the most used (popular) data. Example: You copy a movie to a HDD, then you want to stream the movie. The movie will stream from the SSD since it was recently added. But the movie was physically copied to the HDD at the same time, so transfer speeds were that of the HDD.
Defer-Write: The writes go to the SSD first, and then later are flushed to the HDD as one big sequential write. When transferring data, the write speeds will be that of SSD.
So far in my tests, Write-Cache has almost the same write speed as the HDD (less than 100MB/s). With Defer-Write the write speeds are several hundred megabytes per second, which is what I want.
Question 1: When using Defer-Write, during the time that the data has not been flushed, it acts as Write-Cache? Meaning if the data that was just written to the SSD has not flushed, but is requested, it will read from the SSD? Or does it flush that data to the HDD and then HDD answers the read request?
Question 2: Will the HDD still be defrag'ed over time? Since my usage case is for storing media, I don't foresee fragmentation being an issue, but just wondering if the operation is still able to happen with the cache layer inbetween.