Project

General

Profile

Feature #4218

Tunable ARC buf hash sizing

Added by Sašo Kiselkov over 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2013-10-16
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

At present the ARC buffer hash table sizing is hard-coded to use 128k for every 1GB of physical memory installed. This originally assumed an average block size of 64k and only buffers in ARC. With smaller block sizes (e.g. 8k are common on zvols) and L2ARC, the ARC hash table can be potentially much more crowded than the original estimates, producing more hash collisions and longer buffer chains in each hash bucket, which reduces performance.
This change bumps the amount of hash table space allocated to 1MB/1GB of physical memory and also includes a tunable (zfs_arc_ht_base_masklen) that allows administrators to increase or decrease hash table size at boot. It also changes the way in which we determine the number of ARC hash locks that are allocated. This used to be hard-coded to 256, but the new method makes this also dynamically dependent on the amount of physical memory and tunable (zfs_arc_ht_lock_shift).
Webrev: http://cr.illumos.org/~webrev/skiselkov/new_buf_hash/

Also available in: Atom PDF