mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
ARC: Increase parallel eviction batching
Before parallel eviction implementation zfs_arc_evict_batch_limit caused loop exits after evicting 10 headers. The cost of it is not big and well motivated. Now though taskq task exit after the same 10 headers is much more expensive. To cover the context switch overhead of taskq introduce another level of batching, controlled by zfs_arc_evict_batches_limit tunable, used only for parallel eviction. My tests including 36 parallel reads with 4KB recordsize that shown 1.4GB/s (~460K blocks/s) before with heavy arc_evict_lock contention, now show 6.5GB/s (~1.6M blocks/s) without arc_evict_lock contention. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #17970
This commit is contained in:
@@ -771,6 +771,12 @@ Number ARC headers to evict per sub-list before proceeding to another sub-list.
|
||||
This batch-style operation prevents entire sub-lists from being evicted at once
|
||||
but comes at a cost of additional unlocking and locking.
|
||||
.
|
||||
.It Sy zfs_arc_evict_batches_limit Ns = Ns Sy 5 Pq uint
|
||||
Number of
|
||||
.Sy zfs_arc_evict_batch_limit
|
||||
batches to process per parallel eviction task under heavy load to reduce number
|
||||
of context switches.
|
||||
.
|
||||
.It Sy zfs_arc_evict_threads Ns = Ns Sy 0 Pq int
|
||||
Sets the number of ARC eviction threads to be used.
|
||||
.Pp
|
||||
|
||||
Reference in New Issue
Block a user