Page 1 of 1

SSD Cache - How to select / check actual mode?

Posted: 03 Aug 2020, 17:43
by seba22
Hello,
It's my first time of using TOS.

I just enabled SSD cache for my F5-422.
I would like use it as write cache (I have backup UPS).
Screenshot 2020-08-03 at 11.40.04.png
How to tell what mode cache is enabled?
I would like use fast IO + speed of SSD and later write to HDD main storage - i think it's called write-back.

Regards

Re: SSD Cache - How to select / check actual mode?

Posted: 03 Aug 2020, 21:25
by DiscoSi
Hi,

If you're comfortable using a shell login to the NAS, type the command:

Code: Select all

dmsetup table
This will show the current status of the SSD cache when enabled. The cache type in use by TOS is called "flashcache", more info and bedtime reading here: https://delightlylinux.wordpress.com/20 ... lashcache/.

On my system I get:

Code: Select all

[root@TNAS-xxxxxx ~]# dmsetup table
vg0-lv0: 0 23421558784 linear 9:0 768
fc0: 0 23421558784 flashcache conf:
ssd dev (/dev/sdf1), disk dev (/dev/vg0/lv0) cache mode(WRITE_AROUND)
capacity(20480M), associativity(512), data block size(4K)
disk assoc(0K)
skip sequential thresh(0K)
total blocks(5242880), cached blocks(3441156), cache percent(65)
nr_queued(0)
Size Hist: 4096:320316996
From the above you can see the cache mode is WRITE_AROUND (which is not optimal in my opinion but that's another discussion). Interestingly the cache is only configured to be 20GB in size so regardless of your SSD capacity it's not using it all, again that's probably not optimal either.

More pertinent is that flashcache is no longer actively maintained as a project and also is no longer supported in newer Linux Kernel versions. The one advantage that is does have is that it can be easily turned on and off without the need to rebuild the storage volume which other cache projects require.

If the admins read this, are there any plans to move TOS on to a more recent and configurable SSD cache mechanism?

Re: SSD Cache - How to select / check actual mode?

Posted: 04 Aug 2020, 22:36
by TMroy
You are right, the cache mode been set to writearound by default. it plan to be selectable by user in near future.

Re: SSD Cache - How to select / check actual mode?

Posted: 06 Aug 2020, 03:40
by seba22
Sadly You are correct - that is not a good news for me.
Hope for future updates.

Thank You for both replies,