mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Dbuf hash table should be sized as is the arc hash table
Commit 49ddb31506 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 <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3721
This commit is contained in:
committed by
Brian Behlendorf
parent
6cde64351e
commit
69de34219a
+4
-3
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user