From nobody Wed Sep 28 01:28:45 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mcf5n44c2z4V2hH; Wed, 28 Sep 2022 01:28:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mcf5n3MCrz3V3J; Wed, 28 Sep 2022 01:28:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664328525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u9aa7yqfVlU8f6d9XzhaScf+JJdFgYNK/dOGAuu/c4E=; b=tg+egDi1WutYEtdXoYyoH/mHRWFzj0WCDqL4t7rRcL5sTqxKrv7hn5zqQ5oDSztcGkBL4G BTw6wcdJaD+Yd+vriB32VP3VSYkJZc0ICs65IYLklEIE1ejqAcEAQfHOLIW8h7AwUTRlxn mmimFtTue15UJV/vt5qKVRV5eiPch6FcTFyFxc+mKgem3/iNN64LGnd+pqTM0AUQig3wDP DbsH1nKu5h4k81hkKIbtHjsq2TljpmYMaV2XCwf+ilzkNvxDTKQkx8ZNaNYgHlpydBeChO tmT8bzBW5OJrluok3ipMmDXjQMJLMaF7INeeB4gxx+VDTSQIHlqWUqUc5A5nLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Mcf5n2PqZzK6d; Wed, 28 Sep 2022 01:28:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 28S1Sji0071060; Wed, 28 Sep 2022 01:28:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28S1Sj10071059; Wed, 28 Sep 2022 01:28:45 GMT (envelope-from git) Date: Wed, 28 Sep 2022 01:28:45 GMT Message-Id: <202209280128.28S1Sj10071059@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: de56ac880999 - main - zfs: bring per_txg_dirty_frees_percent back to 30 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de56ac880999cc5460f68096ff0ad1b58a3433ce Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664328525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u9aa7yqfVlU8f6d9XzhaScf+JJdFgYNK/dOGAuu/c4E=; b=KSO48+/HOofFNV+HZcvmfFVMLuCJHn4kwOXJOgqVHirdwxRrqRvxYhahfs4RxZRHGgxRz2 rh5bu6UG7zRbbnZlKoqpN5T/dCD4kf8FmaP11G7i1DrLj7NLTURvWnJCwmfgrA0xaDjG5U 3HW7qfmIVZIAnR/14nkvTd3MtAkYq5wotMM62irEKFXknNO6ODhkCxlq5tRBZWLj3qoVMz j78q3ykSPxk4dk7fdF6d0IpCxbxSbCNSBB9w79ct1FYNew08L6fGBN8yQEomWEOwiSOiL3 fylUsfudZGG7LfaVYqAVtEFCUHXYXoV/eyoH2U88ZR0vWx8b8THymmYvn/R1OQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664328525; a=rsa-sha256; cv=none; b=rX/NuLSjOfyNGCYftG3q67rJ8lo+jTX/Wit5AhFPtFjuRHjarxyqNMt35hOK8qyDMfml5i PwSSakOvW4eZvdaOshLlRsuU8dDuFU1c7suNAa2AxosB5Nk4LWCnPInxooF75QrHePMAV6 kism5pUzl3CDQAvdv7fuWgLum47eMqptnWXhoOtMcf4JsBDZRq72PU2FQo57ARmsEEciYo YZD/uyHr06ie1HoS+MQsWnB/2Zc47Xzh4qZGxl1jJQoHv66i4q7KwSo4KD8VeS1Z55xb3l ll6+ujGwI/njtZYmQrrp9tt7Xwxae9qza4nTQ7t/Rb34DDmKzslyJH0S5bjMLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=de56ac880999cc5460f68096ff0ad1b58a3433ce commit de56ac880999cc5460f68096ff0ad1b58a3433ce Author: Mateusz Guzik AuthorDate: 2022-09-28 01:26:52 +0000 Commit: Mateusz Guzik CommitDate: 2022-09-28 01:26:52 +0000 zfs: bring per_txg_dirty_frees_percent back to 30 This cherry-picks upstream eb9bec0a5d19abf9404f52081424fbb814e6188a The current value causes significant artificial slowdown during mass parallel file removal, which can be observed both on FreeBSD and Linux when running real workloads. Sample results from Linux doing make -j 96 clean after an allyesconfig modules build: before: 4.14s user 6.79s system 48% cpu 22.631 total after: 4.17s user 6.44s system 153% cpu 6.927 total FreeBSD results in the ticket. See https://github.com/openzfs/zfs/issues/13932 --- sys/contrib/openzfs/man/man4/zfs.4 | 2 +- sys/contrib/openzfs/module/zfs/dmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/contrib/openzfs/man/man4/zfs.4 b/sys/contrib/openzfs/man/man4/zfs.4 index 90a8ca788c78..cc8ff316791c 100644 --- a/sys/contrib/openzfs/man/man4/zfs.4 +++ b/sys/contrib/openzfs/man/man4/zfs.4 @@ -1671,7 +1671,7 @@ prefetched during a pool traversal, like .Nm zfs Cm send or other data crawling operations. . -.It Sy zfs_per_txg_dirty_frees_percent Ns = Ns Sy 5 Ns % Pq ulong +.It Sy zfs_per_txg_dirty_frees_percent Ns = Ns Sy 30 Ns % Pq ulong Control percentage of dirtied indirect blocks from frees allowed into one TXG. After this threshold is crossed, additional frees will wait until the next TXG. .Sy 0 No disables this throttle. diff --git a/sys/contrib/openzfs/module/zfs/dmu.c b/sys/contrib/openzfs/module/zfs/dmu.c index 58c88c7d7854..dc6e87cd19fb 100644 --- a/sys/contrib/openzfs/module/zfs/dmu.c +++ b/sys/contrib/openzfs/module/zfs/dmu.c @@ -70,7 +70,7 @@ static int zfs_nopwrite_enabled = 1; * will wait until the next TXG. * A value of zero will disable this throttle. */ -static unsigned long zfs_per_txg_dirty_frees_percent = 5; +static unsigned long zfs_per_txg_dirty_frees_percent = 30; /* * Enable/disable forcing txg sync when dirty checking for holes with lseek().