ZFS FreeBSD ZFS L2ARC header size calculation

I have been searching for some time and cannot find any official documentation on how to calculate the memory consumption for the L2ARC headers. I did find one person claiming that each header consumed 70 bytes and that each ZFS record required a header. C
 
While not directly answering your question (which seems to be incomplete?), take a look at the great theory block in sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c.
 
I do see:
Code:
 * ARC operation:
*
* Every block that is in the ARC is tracked by an arc_buf_hdr_t structure.
* This structure can point either to a block that is still in the cache or to
* one that is only accessible in an L2 ARC device, or it can provide
* information about a block that was recently evicted. If a block is
* only accessible in the L2ARC, then the arc_buf_hdr_t only has enough
* information to retrieve it from the L2ARC device. This information is
* stored in the l2arc_buf_hdr_t sub-structure of the arc_buf_hdr_t. A block
* that is in this state cannot access the data directly.
But skimming the code is a bit over my head though it seems well documented.
 
Back
Top