l2arc_write_buffers: reduce headroom value

FreeBSD has ARC_BUFC_NUMMETADATALISTS metadata lists and ARC_BUFC_NUMDATALISTS
data lists (currently both are 16) while illumos has just a single list
of each kind.

headroom determines how much data is scanned on a single list
during each run of the l2arc feed thread.
Because FreeBSD has more lists we proportionally decrease the limit.

Reviewed by:	Brendan Gregg (earlier version)
MFC after:	2 weeks
Sponsored by:	HybridCluster
This commit is contained in:
Andriy Gapon 2014-10-07 16:08:21 +00:00
parent 9f96723ec5
commit c3d1d2e104

View File

@ -5047,7 +5047,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint64_t target_sz,
if (ab == NULL)
ARCSTAT_BUMP(arcstat_l2_write_buffer_list_null_iter);
headroom = target_sz * l2arc_headroom;
headroom = target_sz * l2arc_headroom * 2 / ARC_BUFC_NUMLISTS;
if (do_headroom_boost)
headroom = (headroom * l2arc_headroom_boost) / 100;