diff options
author | Tim Chase <[email protected]> | 2015-08-30 20:59:23 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-09-02 09:33:02 -0700 |
commit | 69de34219af4a4d100cc5ed155a68ab03393fca4 (patch) | |
tree | f02a38e93b7280b54576d045c240ff46a72ad2b1 /module/zfs | |
parent | 6cde64351e236712a17d41c1578d5843a0f006e4 (diff) |
Dbuf hash table should be sized as is the arc hash table
Commit 49ddb315066e372f31bda29a5c546a9eccc8b418 added the
zfs_arc_average_blocksize parameter to allow control over the size of
the arc hash table. The dbuf hash table's size should be determined
similarly.
Signed-off-by: Tim Chase <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #3721
Diffstat (limited to 'module/zfs')
-rw-r--r-- | module/zfs/dbuf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/module/zfs/dbuf.c b/module/zfs/dbuf.c index 3807418c9..bab546c28 100644 --- a/module/zfs/dbuf.c +++ b/module/zfs/dbuf.c @@ -376,10 +376,11 @@ dbuf_init(void) /* * The hash table is big enough to fill all of physical memory - * with an average 4K block size. The table will take up - * totalmem*sizeof(void*)/4K (i.e. 2MB/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 * 4096 < physmem * PAGESIZE) + while (hsize * zfs_arc_average_blocksize < physmem * PAGESIZE) hsize <<= 1; retry: |