Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jul 2014 07:13:03 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
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
Message-ID:  <201407290713.s6T7D34Q004177@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <christopher.siden@delphix.com>
  Reviewed by: George Wilson <george.wilson@delphix.com>
  Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com>
  Reviewed by: Richard Elling <richard.elling@gmail.com>
  Approved by: Gordon Ross <gwr@nexenta.com>
  
  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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407290713.s6T7D34Q004177>