ZFS Cache / L2ARC adding as reduced size

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
We have started seeing people use quite large NVMe drives for L2ARC / Cache devices. Even 1TByte ones.

Some people may have them handy. Others select them with the philosophy as more is better. Many don't know the 5 times RAM size guideline.

So, I am thinking that as part of adding a L2ARC / Cache device, the GUI should prompt the user for maximum size. Perhaps limiting it to 10 times RAM size but suggesting 5 times RAM size. Then, partition the NVMe, (or SATA SSD...), as appropriate.

Obviously if the supplied device size falls close to the 5 times RAM size guideline, no prompt is needed.

Perhaps adding another advanced checkbox option when a user has less than 64GBytes of RAM. (Or perhaps 32GBytes of RAM.)


What do you think?
Worthy of a feature request Jira ticket?
 

probain

Patron
Joined
Feb 25, 2023
Messages
211
I wasn't aware of any such "guidline", and was/am firmly in a belief of "more bigger is more better"..Well, I'm off to try and find some good reading, even if I'm within 5x. It still would be good to know where such guidline come from.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Bigger is not strictly better, because L2ARC consumes ARC space to hold the pointers to stuff that is in L2ARC.
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
The 5x RAM guideline is a holdover from a much older era of Sun/Oracle ZFS - the new L2ARC headers are much smaller (96 bytes/record) and as such that guidance can generally be relaxed - by quite a bit if you're working with large records.

What it won't magically do though is make an overly-large L2ARC automatically capture good/valid data. 1T of L2ARC on a system with only 32G of RAM will take a lot longer to populate and provide good results from than a system with a value closer to the "old rule" like 256G.
 

Etorix

Wizard
Joined
Dec 30, 2020
Messages
2,134
Even without checkboxes, warnings if RAM<64GB or L2ARC>10*RAM would be a good idea.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
The 5x RAM guideline is a holdover from a much older era of Sun/Oracle ZFS - the new L2ARC headers are much smaller (96 bytes/record) and as such that guidance can generally be relaxed - by quite a bit if you're working with large records.
...
I had forgotten about that. Good catch.

Even without checkboxes, warnings if RAM<64GB or L2ARC>10*RAM would be a good idea.
Yes, perhaps that is the answer. A simple warning when adding L2ARC devices when either of those conditions are met. People that are hesitant or new to ZFS, might stop and research the issue. While those that understand the process can simply ignore the warning, click through and add their L2ARC device.

Further, we can have a information button just to the right of "Cache VDEVs" that pulls up the same from the device listing;

snap0000.png
 
Top