I am trying to understand the inner workings of the ZFS ARC. However, I am confused with several things:
-
actual (
zfs:0:arcstats:size
) vs target size (zfs:0:arcstats:c
). I understand that actual size is allocated and stores cached contents. But, what is the target size then? What is the difference between these two? -
mru_size (
zfs:0:arcstats:p
) + mfu_size (zfs:0:arcstats:c
–zfs:0:arcstats:p
) vs data_size (zfs:0:arcstats:data_size
). Shouldn't data_size be the sum of mru_size and mfu_size? What is the correct ARC size breakdown? According to http://lists.freebsd.org/pipermail/freebsd-fs/2012-June/014643.html, it should behdr_size + data_size (mru_size + mfu_size + anon_size) + other_size + l2_hdr_size
, but it doesn't make any sense asmru_size
is usually bigger thandata_size
. -
what is arc memory throttle used for?
Thanks for any answers/pointers.
Best Answer
Well, I am some years late, but I hope that this can help others.
c
is the target ARC size. It is 50% of total RAM by default, but it can shrink on demand if the system is under memory pressuresize
is the current ARC size. Given enough time, it will tend toc
data_size
is the size of cached user data. It does not include metadata (and this is the reason why it can be significantly smaller than MRU and/or MFU when facing metadata-heavy workload)metadata_size
is the size of cached metadatahdr_size
is the size of L2ARC headers stored in main ARCoverhead_size
is the size of various buffer which are allocated when decompressing dentries