Author: mav
Date: Wed Jul 26 16:30:09 2017
New Revision: 321543
URL: https://svnweb.freebsd.org/changeset/base/321543

Log:
  MFC r318812: MFV r316860: 7545 zdb should disable reference tracking
  
  illumos/illumos-gate@4dd77f9e38ef05b39db128ff7608d926fd3218c6
  
https://github.com/illumos/illumos-gate/commit/4dd77f9e38ef05b39db128ff7608d926fd3218c6
  
  https://www.illumos.org/issues/7545
    When evicting from the ARC, we manipulate some refcount_t's, e.g. arcs_size.
    When using zdb to examine a large amount of data (e.g. zdb -bb on a large 
pool
    with small blocks), the ARC may have a large number of entries. If reference
    tracking is enabled, there will be ~1 reference for each block in the ARC. 
When
    evicting, we decrement the refcount and have to search all the references to
    find the one that we are removing, which is very slow.
    Since zdb is typically used to find problems with the on-disk format, and 
not
    with the code it is running, we should disable reference tracking in zdb.
  
  Reviewed by: Dan Kimmel <dan.kim...@delphix.com>
  Reviewed by: Steve Gonczi <steve.gon...@delphix.com>
  Reviewed by: George Wilson <george.wil...@delphix.com>
  Approved by: Robert Mustacchi <r...@joyent.com>
  Author: Matthew Ahrens <mahr...@delphix.com>

Modified:
  stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c
==============================================================================
--- stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c    Wed Jul 26 16:28:05 
2017        (r321542)
+++ stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c    Wed Jul 26 16:30:09 
2017        (r321543)
@@ -75,10 +75,12 @@
        DMU_OT_ZAP_OTHER : DMU_OT_NUMTYPES))
 
 #ifndef lint
+extern int reference_tracking_enable;
 extern boolean_t zfs_recover;
 extern uint64_t zfs_arc_max, zfs_arc_meta_limit;
 extern int zfs_vdev_async_read_max_active;
 #else
+int reference_tracking_enable;
 boolean_t zfs_recover;
 uint64_t zfs_arc_max, zfs_arc_meta_limit;
 int zfs_vdev_async_read_max_active;
@@ -3695,6 +3697,11 @@ main(int argc, char **argv)
         * For good performance, let several of them be active at once.
         */
        zfs_vdev_async_read_max_active = 10;
+
+       /*
+        * Disable reference tracking for better performance.
+        */
+       reference_tracking_enable = B_FALSE;
 
        kernel_init(FREAD);
        g_zfs = libzfs_init();
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to