mharsch / arcstat

uses Perl to extract, format, and display kstats from the ZFS ARC
67 stars 31 forks source link

broken on Oracle Solaris 11 #4

Open mharsch opened 12 years ago

mharsch commented 12 years ago

It has been reported that changes to L2ARC kstats in Oracle Solaris 11 have caused this script to break.

mharsch commented 12 years ago

Oracle Solaris 11 has removed the following statistics from zfs:0:arcstats: evict_l2_cached evict_l2_eligible evict_l2_ineligible evict_skip hdr_size l2_free_on_write l2_size recycle_miss

and added the following to zfs:0:arcstats: buf_size meta_limit meta_max meta_used

Since we reference evict_skip, recycle_miss, and l2_size: we fail on Oracle Solaris 11 like this:

$ ./arcstat.pl time read miss miss% dmis dm% pmis pm% mmis mm% arcsz c Use of uninitialized value in division (/) at ./arcstat.pl line 307. Use of uninitialized value in division (/) at ./arcstat.pl line 308.

The source code for Oracle Solaris 11 has not been released, so I'm not sure what to make of the new statistics (and if they somehow map to some of the removed ones). You could certainly get this script working by removing references to the statistics mentioned above, though you would lose some functionality.

mharsch commented 12 years ago

Coincidentally, the statistic we currently use to test for L2ARC support is l2_size. So, we fail in another way if any L2ARC fields are specified on the command line:

$ ./arcstat.pl -f time,l2size No L2ARC here Incompatible field specified -- l2size

mharsch commented 12 years ago

I've been told: A.) the new 'buf_size' == the old 'hdrsize' B.) the new 'meta*' stats refer to metadata overhead in the ARC and C.) removing 'l2size' was an oversight that may be corrected in a future update

richardelling commented 12 years ago

the kernel variables for meta* are:

tcreswick commented 12 years ago

Hi Mike, we're looking at using this on some Solaris 11 boxes (SunOS solaris 5.11 11.0 i86pc i386 i86pc) but seeing this issue.

Was it ever resolved or should I just remove those references?

mharsch commented 12 years ago

Hello. I haven't 'fixed' this yet, since it would require maintaining a separate version for Oracle Solaris. I would welcome contributions from someone at Oracle who has access to the source and can document the changes and explain how to interpret the stats.

You can certainly get the script to run by removing the stats mentioned above (plus any that are derived from them). If you're trying to measure something that hasn't changed, then this would be your best option.

mharsch commented 12 years ago

@tcreswick: I've created a new branch 'osol' and modified that version to run on Oracle Solaris 11 by removing refs to the missing kstats. Please test this and let me know if it works for you. FYI: L2ARC stats are still broken. Feel free to fork the 'osol' version for your project.

mlsorensen commented 12 years ago

for what it's worth, if I force l2exist to 1 I at least get the l2 hit/miss numbers, just not the size.