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

Re: SSD Caching with read/write

Post by CommonSenseAl »

bokr71 wrote: 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...
Yes... something is going on. I'd just like a clear/good answer... which I haven't been able to get yet.
stettler
Starting out
Posts: 12
Joined: Thu May 08, 2008 11:50 pm

Re: SSD Caching with read/write

Post by stettler »

QNAP is using the flashcache linux kernel module from Facebook.

Dirty blocks (blocks that are in cache only) are synchronized to disk after 15 minutes of inactivity (no read/write of the block for 15 mins) or when 60% of the cache is used by dirty blocks.
dev.flashcache.CG0.fallow_delay = 900
dev.flashcache.CG0.dirty_thresh_pct = 60

Block are not synchronized at reboot/shutdown:
dev.flashcache.CG0.shutdown_fast_remove = 1

You can get info about the cache with:
more /proc/flashcache/CG0/flashcache_stats
dmsetup status CG0ssddev

To sync dirty blocks manually, set dev.flashcache.CG0.do_sync to 1:
sysctl -w dev.flashcache.CG0.do_sync=1

To enable sync at shutdown:
sysctl -w dev.flashcache.CG0.shutdown_fast_remove=0

(CG0 is the cache device name)
bokr71
Been there, done that
Posts: 605
Joined: Sun Jan 24, 2016 8:13 pm

Re: SSD Caching with read/write

Post by bokr71 »

Did anyone ever get to a real answered on the question "when is SSD caching written to RAM and then to disk"? As CommonSenseAI mentioned, cache flushing takes ffoorreevveerr - literally on the 30th minute right now flushing my 1TB NVMe SSD cache...
Apple: MS M1 Max 10c/32c/16c/64GB/2TB - MP 3.2GHz 16c/192GB/2TB/2xRadeon Pro - nMP 3.5GHz 6C/64GB/1TB/D700 - Echo Express 1TB Accelsior/4x500GB NVMe Sonnet/Sonnet Solo10G PCIe - MBP 13" 4c i7/16GB/512GB - MBP 14" M1 Pro/16GB/512GB - MB 12" 4c i7/16GB/512GB - MMI 6c i5/8GB/500GB - 2 x TC 3TB - HomePods - iPhones, iPads and Apple Watches...

Primary NAS: QNAP TVS-872XT 7x10TB + 2x512GB NVMe SSD. BackUp: Cloud iDrive - Locally QNAP TR-004 4x12TB

Network: ISP Gtateway - TP-Link Deco - QNAP QSW-M408-4C
Post Reply

Return to “System & Disk Volume Management”