From owner-freebsd-current@freebsd.org  Fri Mar 26 12:41:12 2021
Return-Path: <owner-freebsd-current@freebsd.org>
Delivered-To: freebsd-current@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5CE795BE39A
 for <freebsd-current@mailman.nyi.freebsd.org>;
 Fri, 26 Mar 2021 12:41:12 +0000 (UTC)
 (envelope-from mchouque@thi.eu.com)
Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::50:13])
 by mx1.freebsd.org (Postfix) with ESMTP id 4F6M601Tw9z4cwC
 for <freebsd-current@freebsd.org>; Fri, 26 Mar 2021 12:41:12 +0000 (UTC)
 (envelope-from mchouque@thi.eu.com)
Received: by mailman.nyi.freebsd.org (Postfix)
 id 312C75BE2B1; Fri, 26 Mar 2021 12:41:12 +0000 (UTC)
Delivered-To: current@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 30E205BE26A;
 Fri, 26 Mar 2021 12:41:12 +0000 (UTC)
 (envelope-from mchouque@thi.eu.com)
Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net
 [217.70.183.195])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 4F6M5z62wpz4d1v;
 Fri, 26 Mar 2021 12:41:11 +0000 (UTC)
 (envelope-from mchouque@thi.eu.com)
X-Originating-IP: 62.210.143.248
Received: from weirdfishes.localdomain (62-210-143-248.rev.poneytelecom.eu
 [62.210.143.248]) (Authenticated sender: m@thi.eu.com)
 by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 9959860002;
 Fri, 26 Mar 2021 12:41:08 +0000 (UTC)
Received: by weirdfishes.localdomain (Postfix, from userid 1000)
 id 48BB17203B9D5; Fri, 26 Mar 2021 13:41:08 +0100 (CET)
Date: Fri, 26 Mar 2021 13:41:08 +0100
From: Mathieu Chouquet-Stringer <me+freebsd@mathieu.digital>
To: Michael Gmelin <freebsd@grem.de>
Cc: Matt Churchyard <matt.churchyard@userve.net>,
 "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>, current@freebsd.org
Subject: Re: Scrub incredibly slow with 13.0-RC3 (as well as RC1 & 2)
Message-ID: <YF3WZAbSp4oOJl/u@weirdfishes>
References: <YFhuxr0qRzchA7x8@weirdfishes>
 <202103221515.12MFFHRK015188@higson.cam.lispworks.com>
 <YFi6Lwh3ISn8UMvS@weirdfishes> <YFk11A/j7URClN/l@weirdfishes>
 <YFm3BTK/J9XY/mCN@weirdfishes>
 <202103241230.12OCUqur030001@higson.cam.lispworks.com>
 <YFs3jFT7sEaGeQCe@weirdfishes>
 <33eb78e2de404a77b271880dbee4c22e@SERVER.ad.usd-group.com>
 <YF2raxOUeN8Y23eT@weirdfishes>
 <20210326132945.3274687e@bsd64.grem.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20210326132945.3274687e@bsd64.grem.de>
X-Rspamd-Queue-Id: 4F6M5z62wpz4d1v
X-Spamd-Bar: ----
Authentication-Results: mx1.freebsd.org;
	none
X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_FROM(0.00)[freebsd];
 REPLY(-4.00)[]
X-BeenThere: freebsd-current@freebsd.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: Discussions about the use of FreeBSD-current
 <freebsd-current.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-current>, 
 <mailto:freebsd-current-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-current/>
List-Post: <mailto:freebsd-current@freebsd.org>
List-Help: <mailto:freebsd-current-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-current>, 
 <mailto:freebsd-current-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 26 Mar 2021 12:41:12 -0000

On Fri, Mar 26, 2021 at 01:29:45PM +0100, Michael Gmelin wrote:
> Does tuning of
> 
> - vfs.zfs.scrub_delay
> - vfs.zfs.resilver_min_time_ms
> - vfs.zfs.resilver_delay
> 
> make a difference?

Only vfs.zfs.resilver_min_time_ms exists in 13 it seems.

The default values is 3000 but doubling it to 6000 doesn't change
anything. And that could make sense because it seems I'm often cpu bound
as I see the following in top (-SH):

  PID USERNAME    PRI NICE   SIZE    RES STATE    C   TIME    WCPU COMMAND
   31 root         -8    -     0B  3984K CPU12   12 758:07  99.65% zfskern{dsl_scan_iss_0}

And that's on an Intel(R) Xeon(R) CPU E5-2696 v2 @ 2.50GHz with a
turbo @ 3.50GHz...

Disks are busy roughly between 30 to 50% of the time:
                        extended device statistics  
device       r/s     w/s     kr/s     kw/s  ms/r  ms/w  ms/o  ms/t qlen  %b  
da2         1520       0  34974.1      0.0     0     0     0     0    1  31 
da3         1469       0  35030.3      0.0     0     0     0     0    0  32 
da4         1317       0  35106.6      0.0     0     0     0     0    0  42 
da6         1293       0  35094.5      0.0     0     0     0     0    0  36 
da7         1466       0  35032.3      0.0     0     0     0     0    0  31 
da8            0    1303      0.0  34917.9     0     0     0     0    0  43 
da9         1396       0  35046.4      0.0     0     0     0     0    1  34 
da10        1393       0  35062.4      0.0     0     0     0     0    0  32 

da8 is the disk being resilvered.

-- 
Mathieu Chouquet-Stringer
            The sun itself sees not till heaven clears.
	             -- William Shakespeare --