HomeFreeBSD

MFC r348764: Allow UMA hash tables to expand faster then 2x in 20 seconds.

Description

MFC r348764: Allow UMA hash tables to expand faster then 2x in 20 seconds.

ZFS ABD allocates tons of 4KB chunks via UMA, requiring huge hash tables.
With initial hash table size of only 32 elements it takes ~20 expansions
or ~400 seconds to adapt to handling 220GB ZFS ARC. During that time not
only the hash table is highly inefficient, but also each of those expan-
sions takes significant time with the lock held, blocking operation.

On my test system with 256GB of RAM and ZFS pool of 28 HDDs this change
reduces time needed to first time read 240GB from ~300-400s, during which
system is quite busy and unresponsive, to only ~150s with light CPU load
and just 5 sub-second CPU spikes to expand the hash table.

Details

Provenance
mavAuthored on
Parents
rS349220: Add wakeup_any(), cheaper wakeup_one() for taskqueue(9).
Branches
Unknown
Tags
Unknown