-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
L2ARC with metadata and MFU only #16343
Comments
I think we really need to rethink what information are we writing into L2ARC and how. That area got no significant love for decade probably. L2ARC from the beginning was made to write metadata and MFU first. But I think it may got affected by introduction of multilists in ARC. We may also recheck interaction of L2ARC with prefetch -- we may not want to write to L2ARC data that are successfully prefetched from the main pool. We could also redesign write boost there not based on ARC being warm, but on L2ARC being above certain fill percent, that combined with the above preference should result in writes of more usable data. |
Just as a side-note a method to make failures of special vdev non-fatal is in the works: #16185 |
Fixes openzfs#16343 `l2arc_mfuonly` was added to avoid wasting L2 ARC on read-once MRU data and metadata. However it can be useful to cache as much metadata as possible while, at the same time, restricting data cache to MFU buffers only. This patch allow for such behavior by setting `l2arc_mfuonly` to 2 (or higher). The list of possibile value/behavior is the following: 0: cache both MRU and MFU for both data and metadata; 1: cache only MFU for both data and metadata; 2: cache both MRU and MFU for metadata, but only MFU for data. Signed-off-by: Gionatan Danti <[email protected]>
Fixes openzfs#16343 `l2arc_mfuonly` was added to avoid wasting L2 ARC on read-once MRU data and metadata. However it can be useful to cache as much metadata as possible while, at the same time, restricting data cache to MFU buffers only. This patch allow for such behavior by setting `l2arc_mfuonly` to 2 (or higher). The list of possible values is the following: 0: cache both MRU and MFU for both data and metadata; 1: cache only MFU for both data and metadata; 2: cache both MRU and MFU for metadata, but only MFU for data. Signed-off-by: Gionatan Danti <[email protected]>
Fixes openzfs#16343 `l2arc_mfuonly` was added to avoid wasting L2 ARC on read-once MRU data and metadata. However it can be useful to cache as much metadata as possible while, at the same time, restricting data cache to MFU buffers only. This patch allow for such behavior by setting `l2arc_mfuonly` to 2 (or higher). The list of possible values is the following: 0: cache both MRU and MFU for both data and metadata; 1: cache only MFU for both data and metadata; 2: cache both MRU and MFU for metadata, but only MFU for data. Signed-off-by: Gionatan Danti <[email protected]>
I submitted #16402 which should enable what asked in this issue: L2 cache of all metadata but MFU data only. I used the already defined |
Fixes openzfs#16343 `l2arc_mfuonly` was added to avoid wasting L2 ARC on read-once MRU data and metadata. However it can be useful to cache as much metadata as possible while, at the same time, restricting data cache to MFU buffers only. This patch allow for such behavior by setting `l2arc_mfuonly` to 2 (or higher). The list of possible values is the following: 0: cache both MRU and MFU for both data and metadata; 1: cache only MFU for both data and metadata; 2: cache both MRU and MFU for metadata, but only MFU for data. Signed-off-by: Gionatan Danti <[email protected]>
Fixes openzfs#16343 `l2arc_mfuonly` was added to avoid wasting L2 ARC on read-once MRU data and metadata. However it can be useful to cache as much metadata as possible while, at the same time, restricting data cache to MFU buffers only. This patch allow for such behavior by setting `l2arc_mfuonly` to 2 (or higher). The list of possible values is the following: 0: cache both MRU and MFU for both data and metadata; 1: cache only MFU for both data and metadata; 2: cache both MRU and MFU for metadata, but only MFU for data. Signed-off-by: Gionatan Danti <[email protected]>
Describe the feature would like to see added to OpenZFS
Option to store only metadata (all metadata) and MFU (both metadata and data) in L2ARC
How will this feature improve OpenZFS?
This feature should be the default and would make a perfect L2ARC for home users. Most metadata and most frequently used data would eventually get stored in the L2ARC!! This would be the perfect tiered storage system.
Of course, this is currently possible by using metadata special vdev together with l2arc_mfuonly L2ARC. But a special vdev introduces another risk if damaged without enough redundancy. For RAIDZ2 of home users, it's not easy to have 3 nvme's as special vdev because most mainboards only have 2 nvme slots.
Additional context
Currently
primarycache
andsecondarycache
ZFS properties only allowall
,none
, andmetadata
. Perhaps this feature could be added as a new setting, i.e.metaandmfu
, forprimarycache
andsecondarycache
.The text was updated successfully, but these errors were encountered: