SSD Caching with read/write

Questions about SNMP, Power, System, Logs, disk, & RAID.
CommonSenseAl
Starting out
Posts: 11
Joined: Thu May 09, 2019 3:11 am

SSD Caching with read/write

Post by CommonSenseAl » Thu May 09, 2019 3:23 am

I have an extra bay in my TS-453mini that I put an Intel 545s SSD in there to try SSD caching.

Well... I'm bummed. I want a read/write cache but it warned me about data loss if I used a single SSD as a write cache.

Well, I thought, no big deal as long as it flushes the write cache when the system goes idle... plus Intel SSDs should be reliable enough and the SMART data should help warn me when the SSD is going to fail.

BUT.... there is no indication of how and when it flushes the data from the write cache to the RAID array... and I see no config options to control how this is done.

I would definitely use SSD caching if the NAS would frequently flush any write data to the RAID array (like when it went mostly idle). I don't want the data sitting on the SSD for hours or days or weeks without being flushed.

So...

1. When does it flush the write cache data?
2. Do I have any control over flushing the write cache?
3. Will it leave write-cached data on the SSD for hours and/or days and/or weeks without flushing?

UPDATE: Also see:
viewtopic.php?f=24&t=148431
Last edited by CommonSenseAl on Thu May 09, 2019 10:26 pm, edited 1 time in total.

User avatar
storageman
Experience counts
Posts: 4927
Joined: Thu Sep 22, 2011 10:57 pm

Re: SSD Caching with read/write

Post by storageman » Thu May 09, 2019 7:17 pm

Irrelevant, whether it leaves it in cache for 2 mins to 2 days, you can still get data corruption if it fails.
Hence need for two.

CommonSenseAl
Starting out
Posts: 11
Joined: Thu May 09, 2019 3:11 am

Re: SSD Caching with read/write

Post by CommonSenseAl » Thu May 09, 2019 10:15 pm

storageman wrote:
Thu May 09, 2019 7:17 pm
Irrelevant, whether it leaves it in cache for 2 mins to 2 days, you can still get data corruption if it fails.
Hence need for two.
You can still get data corruption with two should they both fail.

User avatar
storageman
Experience counts
Posts: 4927
Joined: Thu Sep 22, 2011 10:57 pm

Re: SSD Caching with read/write

Post by storageman » Thu May 09, 2019 10:18 pm

CommonSenseAl wrote:
Thu May 09, 2019 10:15 pm
storageman wrote:
Thu May 09, 2019 7:17 pm
Irrelevant, whether it leaves it in cache for 2 mins to 2 days, you can still get data corruption if it fails.
Hence need for two.
You can still get data corruption with two should they both fail.
Well hopefully they don't fail together and you swopout the first one that fails before the second one does!
It's all your decision.

CommonSenseAl
Starting out
Posts: 11
Joined: Thu May 09, 2019 3:11 am

Re: SSD Caching with read/write

Post by CommonSenseAl » Thu May 09, 2019 10:21 pm

storageman wrote:
Thu May 09, 2019 10:18 pm
Well hopefully they don't fail together and you swopout the first one that fails before the second one does!
It's all your decision.
Yes, it's my decision.

And I want to use one SSD and have it flush frequently enough so that data does not stay only in the cache for hours or days or weeks... that is an acceptable risk to me. So back to my original question.

UPDATE: Also see:
viewtopic.php?f=24&t=148431

User avatar
storageman
Experience counts
Posts: 4927
Joined: Thu Sep 22, 2011 10:57 pm

Re: SSD Caching with read/write

Post by storageman » Thu May 09, 2019 10:31 pm

You can't - system decides.

And I can't see Qnap changing that.

If you want to force a flush run "Check File System" - that would do it, but also take your volume offline temporarily so not something to do lightly.
Last edited by storageman on Thu May 09, 2019 10:36 pm, edited 1 time in total.

CommonSenseAl
Starting out
Posts: 11
Joined: Thu May 09, 2019 3:11 am

Re: SSD Caching with read/write

Post by CommonSenseAl » Thu May 09, 2019 10:36 pm

storageman wrote:
Thu May 09, 2019 10:31 pm
You can't - system decides.

And I can't see Qnap changing that
Thanks.

Do you have any idea how the system decides?

User avatar
storageman
Experience counts
Posts: 4927
Joined: Thu Sep 22, 2011 10:57 pm

Re: SSD Caching with read/write

Post by storageman » Thu May 09, 2019 10:37 pm


CommonSenseAl
Starting out
Posts: 11
Joined: Thu May 09, 2019 3:11 am

Re: SSD Caching with read/write

Post by CommonSenseAl » Fri May 10, 2019 5:39 am

Well... until I get more clarification on this I'm just going to use the SSD as a read-only cache... it's a bummer... it could be so much better with better write caching support when only one SSD is used.

bokr71
Know my way around
Posts: 241
Joined: Sun Jan 24, 2016 8:13 pm

Re: SSD Caching with read/write

Post by bokr71 » Sat May 18, 2019 4:01 am

Until reading this thread, I was under the impression that the Write cache was indeed flushed "all the time", at least when the system was idle. That is not the case? Someone must know what the flushing parameters are???
Apple: nMP 3.5GHz 6C/64GB/1TB/D700 - 2 x ATD - Echo Express 1TB Accelsior/2x500GB Sonnet Tempo - MBP 13" 4c i7/16GB/512GB - MBA 13" 2c i7/8GB/250GB - MB 12" 4c i7/16GB/512GB - MMI 6c i5/8GB/500GB - 2 x TC 3TB - iPhone Xs - iPad Mini - iPad Pro - 2 x HomePod - 42mm Apple Watch

Primary NAS: QNAP TVS-872XT 6x10TB + 2x512GB NVMe SSD. BackUp NAS: ReadyNAS Pioneer Pro 6x4TB

Network: 2 x HP2915 - LinkSys Velop AC6600

User avatar
Don
Guru
Posts: 11967
Joined: Thu Jan 03, 2008 4:56 am
Location: Long Island, New York
Contact:

Re: SSD Caching with read/write

Post by Don » Sat May 18, 2019 4:41 am

bokr71 wrote:
Sat May 18, 2019 4:01 am
Until reading this thread, I was under the impression that the Write cache was indeed flushed "all the time", at least when the system was idle. That is not the case? Someone must know what the flushing parameters are???
Yeah someone does. It’s QNAP. Open a ticket and ask them and then report back here.
Read the Online Manuals and use the forum search feature before posting.

It is a recommended to use RAID and have external backups. RAID will protect you from disk failure, keep your system running, and data accessible while the disk is replaced and the RAID rebuilt. Backups will allow you to recover data that is lost or corrupted, or from system failure. One does not replace the other.

Submit bugs and feature requests to QNAP via their Helpdesk app.

NAS: TVS-882BR | F/W: 4.3.6.0895 | 40GB | 2 x M.2 SATA RAID 1 (System/VMs) | 4 x M.2 NMVe QM2-4P-384A RAID 5 (Cache) | 5 x 4TB HDD RAID 6 (Data) | 1 x Blu-ray
NAS: TVS-663 | F/W: 4.3.6.0993 | 16GB | 2 x M.2 NMVe QM2-2P RAID 1 (Cache) | 4 x 4TB RAID 5
Apps: Boinc, Squid, DNSMasq, PLEX, iDrive, QVPN, QLMS, MP3fs, HBS, Entware, DLstation, +others

CommonSenseAl
Starting out
Posts: 11
Joined: Thu May 09, 2019 3:11 am

Re: SSD Caching with read/write

Post by CommonSenseAl » Sat May 18, 2019 5:25 am

The "answer" I got from QNAP was:
The SSD write cache flushes to the disk when the RAM is available.

No, there won't be any options or function to flush the cache to the disk. This is all done automatically the NAS.
I am not even sure what that really means so if anyone can get a better answer then please post here!

I am still using my SSD as a read-only cache for now (until I get some answers anyway).

But I did upgrade the RAM on my TS-453mini from 2GB to 8GB... hoping that would help. Cost me a little over $50.

bokr71
Know my way around
Posts: 241
Joined: Sun Jan 24, 2016 8:13 pm

Re: SSD Caching with read/write

Post by bokr71 » Sat May 18, 2019 7:01 am

Actually that answer does make sense. It basically means that you'll be writing to the SSD cache, and it will stay there until it can be offloaded to RAM, which in turn means it will be written to the data volume ASAP. So the process is; Computer -> SSD Cache -> RAM -> Data Vol.

Of course as you usually have a lot less RAM in your NAS than you possibly do SSD Caching, it can take a bit of time, but time here is seconds.
Apple: nMP 3.5GHz 6C/64GB/1TB/D700 - 2 x ATD - Echo Express 1TB Accelsior/2x500GB Sonnet Tempo - MBP 13" 4c i7/16GB/512GB - MBA 13" 2c i7/8GB/250GB - MB 12" 4c i7/16GB/512GB - MMI 6c i5/8GB/500GB - 2 x TC 3TB - iPhone Xs - iPad Mini - iPad Pro - 2 x HomePod - 42mm Apple Watch

Primary NAS: QNAP TVS-872XT 6x10TB + 2x512GB NVMe SSD. BackUp NAS: ReadyNAS Pioneer Pro 6x4TB

Network: 2 x HP2915 - LinkSys Velop AC6600

CommonSenseAl
Starting out
Posts: 11
Joined: Thu May 09, 2019 3:11 am

Re: SSD Caching with read/write

Post by CommonSenseAl » Sat May 18, 2019 9:07 am

bokr71 wrote:
Sat May 18, 2019 7:01 am
Actually that answer does make sense. It basically means that you'll be writing to the SSD cache, and it will stay there until it can be offloaded to RAM, which in turn means it will be written to the data volume ASAP. So the process is; Computer -> SSD Cache -> RAM -> Data Vol.

Of course as you usually have a lot less RAM in your NAS than you possibly do SSD Caching, it can take a bit of time, but time here is seconds.
Interesting... well, when I decided to remove the SSD write cache, it took awhile to remove (turn off) while it seemingly wrote/flushed to disk.... so if it writes ASAP then why did it seem to work for awhile flushing the write cache when I turned it off? My NAS is just for home use and it's not very busy at all so if it was flushing constantly then I would think that turning off the SSD cache would be very quick because no flushing would be needed (since it would have been flushed already).

bokr71
Know my way around
Posts: 241
Joined: Sun Jan 24, 2016 8:13 pm

Re: SSD Caching with read/write

Post by bokr71 » Sat May 18, 2019 11:02 am

I am not saying this is how it works. I am saying this is what the message from QNAP means. I also have seen it take a decent amount of time to turn caching off, which it says is due to the flushing of the write cache. But I think there is more than that going on...
Apple: nMP 3.5GHz 6C/64GB/1TB/D700 - 2 x ATD - Echo Express 1TB Accelsior/2x500GB Sonnet Tempo - MBP 13" 4c i7/16GB/512GB - MBA 13" 2c i7/8GB/250GB - MB 12" 4c i7/16GB/512GB - MMI 6c i5/8GB/500GB - 2 x TC 3TB - iPhone Xs - iPad Mini - iPad Pro - 2 x HomePod - 42mm Apple Watch

Primary NAS: QNAP TVS-872XT 6x10TB + 2x512GB NVMe SSD. BackUp NAS: ReadyNAS Pioneer Pro 6x4TB

Network: 2 x HP2915 - LinkSys Velop AC6600

Post Reply

Return to “System & Disk Volume Management”