I have a simple ZFS setup at home, four disks mirrored, 8GB ram and 120GB Intel X25-M SSD for L2ARC. I ran zpool add poolname cache cXtXdX then generated load and eagerly tracked the warming process by running zpool iostat -v mypool. A few hours later, the L2ARC is full, but what exactly has been cached?

Can I peek in and see what's in my ARC/L2ARC? I understand that certain blocks would map to multiple filesystems (due to snapshots, cloning or dedup) but I'd still like to sample the statistics like these:

  • Type of block cached: metadata. iSCSI, data. etc.
  • Age: How long has each block been in the L2ARC
  • Which files: directories that have some of their contents cached
  • Filesystem breakdown: GB cached per filesystem
  • Location of non-volatile copies of blocks (which drive/vdev)

I'd imagine zdb and/or dtrace would be the tools de jour, but don't really know where to start.

  • 3
    There is a excellent blog entry by Brendan Gregg that answers some of your points.
    – user9517
    Jan 30, 2011 at 9:17
  • Check the script linked in my answer.
    – ewwhite
    Jan 7, 2012 at 0:19
  • The blog entry by Brendan Gregg has moved: ZFS L2ARC
    – Marco
    Jul 13, 2013 at 15:30

2 Answers 2


Here's a script that's been updated to reflect the data in L2ARC.

See: http://blog.harschsystems.com/2010/09/08/arcstat-pl-updated-for-l2arc-statistics/

Source available here: https://github.com/mharsch/arcstat


I would probably argue that you should care not about what's in the cache, but whether the most effective things have been cached. Ie, is the ARC cache being used to its maximum efficiency?

I run a small-scale (9TB) ZFS implementation at work and I find Ben Rockwood's tool arc_summary.pl, and Sun's arcstat.pl, both detailed in this cuddletech blog post, to be immensely useful.

I know it doesn't answer your question directly about what exactly is in the ARC cache, but these should give you some solid data about how your cache is being used, and whether you're in need of more memory/SSD space.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .