Replies: 3 comments 2 replies
-
things won't make it into L2ARC if they're not first in ARC. L2ARC holds evicted records from ARC. you only have 2GB ARC, i think it's incredible that the L2 has filled up as much as it has. you're using a lot of your ARC just to store the headers for L2. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
More generally, L2ARC does not strictly get filled as soon as something falls out of ARC. ARC fills up, and L2ARC slowly copies things that are likely to get dropped from ARC soon, but it's not a synchronous process where things that fall from ARC always end up in L2ARC - if it were, then you'd bottleneck on freeing things from ARC on your L2ARC speed, among other issues. By default, it fills at a very slow rate, whose value escapes me at the moment but I believe is on the order of 10-20 MB/s at most, and it doubles that rate when it thinks the L2ARC is "warming up". So if your actual ARC is tiny, and your L2ARC is relatively huge compared to it, it would take quite some time and precisely the right patterns of churn for your L2ARC device to contain most, if not all, of the data you care about, as it would often either fall out of ARC faster than L2ARC copies it over, or have the same data in ARC for a long period and then L2ARC has nothing new to copy, more or less. There are tunables you can adjust to change the L2ARC fill rate - (There's also the overhead of L2ARC per-record, which is I think on the order of 70/80b per record? So at 128k records, you'd be occupying 79 MB/90 MB (depending on which estimate is accurate) to keep 144 GiB in the L2ARC. If you filled the 2T device, you'd be occupying 1.09/1.25 GB.) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working with a 262 GB dataset of uncompressable images (they already have DEFLATE compression enabled). Using
cat /proc/spl/kstat/zfs/arcstats | grep l2
I see that my l2arc size is154943145984
or 144.30 GB. My program has already made an entire pass through the dataset, so I would expect the entire dataset would be in the l2arc +- the size of the arc, but I'm not seeing that. My question is: why?My system has 64GB of memory, and
zfs_arc_max
is51539607552
or 48GB.For details my zpool status is:
The main 4 10TB HDDs are setup in a striped mirror, and I have a 2TB NVMe drive as my l2arc cache device.
I have ZFS 2.0.6 on Ubuntu 21.10:
Some details from
arc_summary
:Tunables of the l2arc are still at the defaults
I'm effectively looking to tune my zfs drives such that when my dataset is less than 2TB I effectively get the read speed of the SSD as I sequentially or randomly iterate over it (machine learning on image data). So if there are any further tips in that direction, or if I have a misconception about this being possible, I'd be appreciative the advice.
But again the main question I have is: why is it that my l2arc does not contain the entire dataset, even though I've iterated through every image and loaded all data from each image. From what I understand each image's data must have been fed into arc at some point and then if it ever got evicted it should be on the l2arc. My first thought was that maybe the data was compressed but a delta of 120GB is way to big, the data isn't very compressible. But perhaps I'm misunderstanding something.
Beta Was this translation helpful? Give feedback.
All reactions