From owner-freebsd-bugs@FreeBSD.ORG Wed Apr 28 09:50:04 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA5101065672 for ; Wed, 28 Apr 2010 09:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6AEDC8FC20 for ; Wed, 28 Apr 2010 09:50:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o3S9o4Ot026002 for ; Wed, 28 Apr 2010 09:50:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o3S9o4FO026001; Wed, 28 Apr 2010 09:50:04 GMT (envelope-from gnats) Resent-Date: Wed, 28 Apr 2010 09:50:04 GMT Resent-Message-Id: <201004280950.o3S9o4FO026001@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Martin Matuska Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 972CD1065670 for ; Wed, 28 Apr 2010 09:47:01 +0000 (UTC) (envelope-from mm@mail2.vx.sk) Received: from mail2.vx.sk (neo.vx.sk [188.40.111.84]) by mx1.freebsd.org (Postfix) with ESMTP id 595708FC26 for ; Wed, 28 Apr 2010 09:47:01 +0000 (UTC) Received: from neo.vx.sk (localhost [127.0.0.1]) by mail2.vx.sk (Postfix) with ESMTP id 607913A0CE for ; Wed, 28 Apr 2010 11:47:00 +0200 (CEST) Received: from mail2.vx.sk ([127.0.0.1]) by neo.vx.sk (neo.vx.sk [127.0.0.1]) (amavisd-new, port 10024) with LMTP id w2Gv9etI0NBS for ; Wed, 28 Apr 2010 11:46:55 +0200 (CEST) Received: by mail2.vx.sk (Postfix, from userid 1001) id 869FA3A0C5; Wed, 28 Apr 2010 11:46:55 +0200 (CEST) Message-Id: <20100428094655.869FA3A0C5@mail2.vx.sk> Date: Wed, 28 Apr 2010 11:46:55 +0200 (CEST) From: Martin Matuska To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/146108: [zfs] [patch] write throttling bugfix (onnv 9366) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Martin Matuska List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2010 09:50:04 -0000 >Number: 146108 >Category: kern >Synopsis: [zfs] [patch] write throttling bugfix (onnv 9366) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Apr 28 09:50:04 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Martin Matuska >Release: FreeBSD 8.0-STABLE amd64 >Organization: >Environment: System: FreeBSD neo.vx.sk 8.0-STABLE FreeBSD 8.0-STABLE #10 r207271M: Tue Apr 27 21:36:49 CEST 2010 root@neo.vx.sk:/usr/obj/stable/sys/NEO amd64 >Description: - fix improper pool write throughput calculation [1] - make vfs.zfs.write_limit_override tunable (like in OpenSolaris) The tunable is in bytes and enables fine-tuning of ZFS write bursts (tradeoff stalls vs. lower write throughput) Discussed with and approved by: pjd@ MFS suggestion: 2 weeks Sources: OpenSolaris bug-id: 6817339 [1] Onnv revision: 9366 [1] >How-To-Repeat: >Fix: Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c =================================================================== --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c (revision 207314) +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c (working copy) @@ -47,6 +47,11 @@ uint64_t zfs_write_limit_override = 0; extern uint64_t zfs_write_limit_min; +SYSCTL_DECL(_vfs_zfs); +TUNABLE_ULONG("vfs.zfs.write_limit_override", &zfs_write_limit_override); +SYSCTL_ULONG(_vfs_zfs, OID_AUTO, write_limit_override, CTLFLAG_RW, &zfs_write_limit_override, 0, + "Override maximum TXG size"); + kmutex_t zfs_write_limit_lock; static pgcnt_t old_physmem = 0; @@ -300,6 +305,7 @@ tx = dmu_tx_create_assigned(dp, txg); dp->dp_read_overhead = 0; + start = gethrtime(); zio = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_MUSTSUCCEED); while (ds = txg_list_remove(&dp->dp_dirty_datasets, txg)) { if (!list_link_active(&ds->ds_synced_link)) @@ -310,7 +316,6 @@ } DTRACE_PROBE(pool_sync__1setup); - start = gethrtime(); err = zio_wait(zio); write_time = gethrtime() - start; ASSERT(err == 0); >Release-Note: >Audit-Trail: >Unformatted: