ARC should cache more metadata
Once arc_no_grow is set, whenever we read a block from disk, we evict a block
from memory to make room for it. We evict from the ARC list that we will be
adding to. The list is based on whether the block is data vs metadata. So if
we are reading metadata, we will evict metadata. Therefore, the split of data
vs metadata in the ARC will stay more or less static, all else being equal.
This may be very detrimental to performance, if the working set size of
metadata is more than the amount of metadata currently in the ARC.
We have seen this problem on an NFS server where "zfs list" may need to cache
~100MB of metadata, but is unable to. Therefore every "zfs list" must read data off disk which is very slow.
The fix we propose is to evict approximately the oldest block, regardless of it
is data vs metadata, while respecting the arc_meta_limit. To do this
efficiently, we will determine which (data vs metadata) list's oldest entry is
older, and evict from that list. However, if we are
over the arc_meta_limit, we will evict metadata.
Updated by Electric Monk over 5 years ago
- % Done changed from 0 to 100
- Status changed from New to Closed
commit 3a5286a1cffceafcd8cf79c4156fad605129bf50 Author: Matthew Ahrens <firstname.lastname@example.org> Date: 2014-12-02T08:35:23.000Z 5368 ARC should cache more metadata Reviewed by: Alex Reece <email@example.com> Reviewed by: Christopher Siden <firstname.lastname@example.org> Reviewed by: George Wilson <email@example.com> Reviewed by: Richard Elling <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>