Difference between Write Cache & Defer-Write

FAQ, getting help, user experience about PrimoCache
Post Reply
redbookQT
Posts: 3
Joined: Sun Mar 24, 2019 1:31 pm

Difference between Write Cache & Defer-Write

Post by redbookQT »

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.

redbookQT
Posts: 3
Joined: Sun Mar 24, 2019 1:31 pm

Re: Difference between Write Cache & Defer-Write

Post by redbookQT »

Oh, how can I make sure a large amount of cache stays open for Defer-Write? I'm using a Intel 1TB SSD. I have most of the whole drive set to be used as cache (leave some unused for over provisioning). I would like the make sure that at any given time it has 100-200GB of Free Cache (L2). Lets say over time, the read and write cache use a lot of the SSD. If I go to make a big write, will it remove other caches in order to continue Defer-Write caching? Meaning, there isn't some limit to how much it can Defer_Write cache? The software will automatically make room as more defer-writes come in?

User avatar
support
Posts: 2702
Joined: Sun Dec 21, 2008 2:42 am

Re: Difference between Write Cache & Defer-Write

Post by support »

redbookQT wrote:
Sun Mar 24, 2019 2:33 pm
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?
Yes, still will be read from SSD as long as requested data is in the cache (even the data has been flushed to the HDD. "flush" just means copy unwritten data in the cache to the target disk).
redbookQT wrote:
Sun Mar 24, 2019 2:33 pm
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.
Yes, defrag software still can work.
Primo Ramdisk | PrimoCache
Romex Software Support

User avatar
support
Posts: 2702
Joined: Sun Dec 21, 2008 2:42 am

Re: Difference between Write Cache & Defer-Write

Post by support »

redbookQT wrote:
Sun Mar 24, 2019 2:39 pm
The software will automatically make room as more defer-writes come in?
Yes, PrimoCache will automatically handle this.
Primo Ramdisk | PrimoCache
Romex Software Support

Post Reply