Enable ZFS metadata-only cache

Hi community,

QTS hero has the option for “SSD cache”. Under the hood, this uses what is commonly called L2arc of ZFS.

Here, just imagine a HDD pool supported by a single SSD for read cache.

You can choose between “All I/O” and “Random I/O”. If you choose Random I/O there is a threshold. If the requested size is above a certain kB count, it is read from HDD, otherwise SSD.

Why is there no option to utilize the “metadata only” flag of ZFS?

What it does:

Instead of caching the full content of the files, it only caches ZFS/file metadata. Your browsing of e.g. a folder structure would be fully provided by the SSD. If you open a file, the SSD will have the information where on the HDD is the data and the HDD will only deliver the actual data.

As metadata lookups are small random IO, they benefit a lot from metadata caching.

If you don’t attempt caching actual data, you save a lot of space for the storage disk. SSD cache can be factor 100 smaller than full pool size. It is still enough to hold the full metadata of the pool. Also the SSD wearout goes down as the system does not write data. Because the SSD will be never full, “old” but still valid cache is never dropped. You can still browse the directory you haven’t touched for a long time quickly.

The feature is already working for your systems. You can manually switch the L2ARC to metadata only and it works just fine.

Any opinions on this one?

BR

Florian Aigner

Thanks for your suggestion! I’ll forward this request to our internal team to look into.