From owner-svn-src-all@FreeBSD.ORG Tue Jul 29 07:13:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93895599; Tue, 29 Jul 2014 07:13:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 812A920F6; Tue, 29 Jul 2014 07:13:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s6T7D30S004178; Tue, 29 Jul 2014 07:13:03 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s6T7D34Q004177; Tue, 29 Jul 2014 07:13:03 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201407290713.s6T7D34Q004177@svn.freebsd.org> From: Xin LI Date: Tue, 29 Jul 2014 07:13:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r269224 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jul 2014 07:13:03 -0000 Author: delphij Date: Tue Jul 29 07:13:03 2014 New Revision: 269224 URL: http://svnweb.freebsd.org/changeset/base/269224 Log: 5034 ARC's buf_hash_table is too small Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Saso Kiselkov Reviewed by: Richard Elling Approved by: Gordon Ross illumos/illumos-gate@63e911b6fce0acc8e2a1d31ebdaf0c4c12580a14 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Tue Jul 29 07:08:32 2014 (r269223) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Tue Jul 29 07:13:03 2014 (r269224) @@ -200,6 +200,7 @@ int zfs_arc_grow_retry = 0; int zfs_arc_shrink_shift = 0; int zfs_arc_p_min_shift = 0; int zfs_disable_dup_eviction = 0; +int zfs_arc_average_blocksize = 8 * 1024; /* 8KB */ /* * Note that buffers can be in one of 6 states: @@ -938,10 +939,11 @@ buf_init(void) /* * The hash table is big enough to fill all of physical memory - * with an average 64K block size. The table will take up - * totalmem*sizeof(void*)/64K (eg. 128KB/GB with 8-byte pointers). + * with an average block size of zfs_arc_average_blocksize (default 8K). + * By default, the table will take up + * totalmem * sizeof(void*) / 8K (1MB per GB with 8-byte pointers). */ - while (hsize * 65536 < physmem * PAGESIZE) + while (hsize * zfs_arc_average_blocksize < physmem * PAGESIZE) hsize <<= 1; retry: buf_hash_table.ht_mask = hsize - 1;