From 01ff0d7540b21c461c19b90b1e715df26cba3ff2 Mon Sep 17 00:00:00 2001 From: Alek P Date: Fri, 29 Sep 2017 15:58:52 -0700 Subject: [PATCH] Update the default for zfs_txg_history It's often useful to have access to txg history for debugging purposes. This patch changes the default from 0 to 100 TXGs worth of history preserved. Reviewed by: Matthew Ahrens Reviewed-by: Giuseppe Di Natale Reviewed-by: Brian Behlendorf Reviewed by: Richard Elling Reviewed by: Prakash Surya Reviewed-by: George Melikov Signed-off-by: Alek Pinchuk Closes #6691 --- man/man5/zfs-module-parameters.5 | 4 ++-- module/zfs/spa_stats.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/man/man5/zfs-module-parameters.5 b/man/man5/zfs-module-parameters.5 index 6e04b4977d..19ecde4f46 100644 --- a/man/man5/zfs-module-parameters.5 +++ b/man/man5/zfs-module-parameters.5 @@ -12,7 +12,7 @@ .\" CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your .\" own identifying information: .\" Portions Copyright [yyyy] [name of copyright owner] -.TH ZFS-MODULE-PARAMETERS 5 "Nov 16, 2013" +.TH ZFS-MODULE-PARAMETERS 5 "Sept 28, 2017" .SH NAME zfs\-module\-parameters \- ZFS module parameters .SH DESCRIPTION @@ -1766,7 +1766,7 @@ Default value: \fB32\fR. Historical statistics for the last N txgs will be available in \fB/proc/spl/kstat/zfs//txgs\fR .sp -Default value: \fB0\fR. +Default value: \fB100\fR. .RE .sp diff --git a/module/zfs/spa_stats.c b/module/zfs/spa_stats.c index 8c4dba29e2..3eeb83a50b 100644 --- a/module/zfs/spa_stats.c +++ b/module/zfs/spa_stats.c @@ -34,9 +34,9 @@ int zfs_read_history = 0; int zfs_read_history_hits = 0; /* - * Keeps stats on the last N txgs, disabled by default. + * Keeps stats on the last 100 txgs by default. */ -int zfs_txg_history = 0; +int zfs_txg_history = 100; /* * Keeps stats on the last N MMP updates, disabled by default.