mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
L2ARC: Write budget fairness for metadata monopolization
Under heavy metadata load, metadata passes can monopolize the write budget every cycle while data passes get nothing written. Track consecutive monopolized cycles per device in l2ad_meta_cycles. After l2arc_meta_cycles (default 2) consecutive cycles where metadata fills the write budget, skip metadata for one cycle to let data run. Reset the counter when nothing is written. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Ameer Hamza <ahamza@ixsystems.com> Closes #18289
This commit is contained in:
committed by
Brian Behlendorf
parent
62ca8f721b
commit
b27a87f399
@@ -469,6 +469,12 @@ typedef struct l2arc_dev {
|
||||
boolean_t l2ad_thread_exit; /* signal thread exit */
|
||||
kmutex_t l2ad_feed_thr_lock; /* thread sleep/wake */
|
||||
kcondvar_t l2ad_feed_cv; /* thread wakeup cv */
|
||||
/*
|
||||
* Consecutive cycles where metadata filled write budget
|
||||
* while data passes got nothing written. Used to detect
|
||||
* monopolization and skip metadata to give data a chance.
|
||||
*/
|
||||
uint64_t l2ad_meta_cycles;
|
||||
} l2arc_dev_t;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user