freebsd-dev/man
Brian Behlendorf 505df8d133 Dynamically size dbuf hash mutex array
Incorrectly sizing the array of hash locks used to protect the
dbuf hash table can lead to contention and reduce performance.
We could unconditionally allocate a larger array for the locks
but it's wasteful, particularly for a low-memory system.
Instead, dynamically allocate the array of locks and scale
it based on total system memory.

Additionally, add a new `dbuf_mutex_cache_shift` module option
which can be used to override the hash lock array size.  This is
disabled by default (dbuf_mutex_hash_shift=0) and can only be
set at module load time.  The minimum target array size is set
to 8192, this matches the current constant value.

Note that the count of the dbuf hash table and count of the
mutex array were added to the /proc/spl/kstat/zfs/dbufstats
kstat.

Finally, this change removes the _KERNEL conditional checks.
These were not required since for the user space build there
is no difference between the kmem and vmem interfaces.

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #13928
2022-09-22 12:59:56 -07:00
..
man1 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
man4 Dynamically size dbuf hash mutex array 2022-09-22 12:59:56 -07:00
man5 Consistentify miscellaneous style on remaining manpages 2021-06-09 14:35:53 -07:00
man7 Use correct mdoc macros for arguments 2022-09-15 14:22:00 -07:00
man8 Add zfs.sync.snapshot_rename 2022-09-02 13:31:19 -07:00
Makefile.am Add Linux namespace delegation support 2022-06-10 09:51:46 -07:00