svn commit: r269224 - vendor-sys/illumos/dist/uts/common/fs/zfs

Xin LI delphij at FreeBSD.org
Tue Jul 29 07:13:03 UTC 2014


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 at delphix.com>
  Reviewed by: George Wilson <george.wilson at delphix.com>
  Reviewed by: Saso Kiselkov <skiselkov.ml at gmail.com>
  Reviewed by: Richard Elling <richard.elling at gmail.com>
  Approved by: Gordon Ross <gwr at nexenta.com>
  
  illumos/illumos-gate at 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;


More information about the svn-src-all mailing list