Skip to content

Commit

Permalink
Increase L2ARC write rate and headroom
Browse files Browse the repository at this point in the history
Current L2ARC write rate and headroom parameters are very conservative:
l2arc_write_max=8M and l2arc_headroom=2 (ie: a full L2ARC writes at
8 MB/s, scanning 16/32 MB of ARC tail each time; a warming L2ARC runs
at 2x these rates).

These values were selected 15+ years ago based on then-current SSDs
size, performance and endurance. Todays we have multi-TB, fast and
cheap SSDs which can sustain much higher read/write rates.

For this reason, this patch increases l2arc_write_max to 32M and
l2arc_headroom to 8 (4x increase for both).

Signed-off-by: Gionatan Danti <[email protected]>
  • Loading branch information
shodanshok committed Oct 27, 2023
1 parent 043c6ee commit 21011ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/zfs/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,8 +776,8 @@ uint64_t zfs_crc64_table[256];
* Level 2 ARC
*/

#define L2ARC_WRITE_SIZE (8 * 1024 * 1024) /* initial write max */
#define L2ARC_HEADROOM 2 /* num of writes */
#define L2ARC_WRITE_SIZE (32 * 1024 * 1024) /* initial write max */
#define L2ARC_HEADROOM 8 /* num of writes */

/*
* If we discover during ARC scan any buffers to be compressed, we boost
Expand Down

0 comments on commit 21011ce

Please sign in to comment.