Replies: 2 comments 3 replies
-
This is helpful! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Is there a way to change this eviction behavior? also does this also mean
would be equivalent to no cache at all? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
TL;DR
When setting
primarycache
andsecondarycache
, unclear doc, no warning, misleading analogue. Shall this most likely misconfigurationdeserves a warning or so?
The Problem
The candidate entry to populate L2ARC is from evicted entries of ARC, but not requested entries of ARC.
This is very different from how L1-L3 CPU cache works by pulling requested entries through high level cache into low level cache, although the name is somewhat suggestive of their comparability.
The configuration, suggesting that you might be caching metadata in ARC, but metadata + data in L2ARC
is practically equal to
because what pops up in ARC is what possibly cached L2ARC.
Quoting from some docs
I just googled
zfs primarycache secondarycache
and look for some trustworthy sourceshttps://docs.oracle.com/cd/E19253-01/819-5461/ghbxt/index.html
No mention of eviction or what can get into L2ARC
https://openzfs.github.io/openzfs-docs/Performance%20and%20Tuning/Workload%20Tuning.html
Mentioned eviction but unclear if
data cached in ARC
==data ever existed transiently in ARC, if any, in order to copy the value
https://youtu.be/ptY6-K78McY?t=1687
I don't think I understand everything here tbh, but seem to explains:
We have an ARC with only metadata entries, so we cannot find a pointer in the ARC that points to a piece of user data in the L2ARC. The title of the talk is "Lecture on OpenZFS read and write code paths", which in my opinion is too much for the purpose of setting this one flag.
Experiment
Conclusion: primarycache=metadata, secondarycache=all is equal to secondarycache=metadata
On background was
ls * | xargs -P 8 -I {} bash -c "cat {} > /dev/null"
wherels *
has 1TB of data with blocksize 1M.Confirmed that only after setting primarycache=all, that we have evicted entries eligible to store in L2ARC.
Whether it opted to store the block or not in such flush is another issue not discussed here, and indeed it populated to 16GB+ after typing this text
Beta Was this translation helpful? Give feedback.
All reactions