Project

General

Profile

Feature #7361

Improve L2ARC filling

Added by Ben RUBSON about 3 years ago. Updated 11 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2016-09-04
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Hello,

Here is a ZFS patch which improves performance for workloads which need as much as (meta)data as possible in L2ARC.
I wrote it thinking about file servers which have no such "prefered" data and then need to be as fast as possible with all their metadata.

This patch modifies ZFS so that when it has to evict buffers from ARC, it first chooses buffers which are already in L2ARC.
In the best case, (meta)data is then loaded only once from disks, next times from L2ARC, which is what we want with this patch.

This patch introduces 2 new configuration options :
arc_evict_l2_first (0|1) : first evict buffers from ARC which are in L2ARC
arc_evict_l2_only (0|1) : only evict buffers from ARC which are in L2ARC

Here are some benchmarks using the following find loop :
for i in `seq 1 10`
do
  ls -1 /zpool/ | while read dataset
  do
    time find /zpool/$dataset >/dev/null
  done
done

And the following ZFS configuration :
primarycache=metadata
secondarycache=metadata
vfs.zfs.arc_max=64424509440
vfs.zfs.arc_meta_limit=64424509440
vfs.zfs.l2arc_noprefetch=0
vfs.zfs.l2arc_headroom=128
vfs.zfs.l2arc_feed_min_ms=50

Results :
We can see below that with the patch, ZFS is at its best as soon as it accesses the (meta)data for the second time (run 2), keeping the performance sustained over the time.

Patch :
See PR in the next message.

Of course feel free to comment !

Thank you,

Best regards,

Ben

History

#2

Updated by Ben RUBSON 11 months ago

Results (the hosted results' picture from the original post above expired) :

Also available in: Atom PDF