Project

General

Profile

Bug #7531

Assign correct flags to prefetched buffers

Added by Ben RUBSON almost 3 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2016-11-03
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Hello,

As discussed (same subject) on developer[at]lists.open-zfs.org :
I found that some buffers that could be L2ARC eligible are not flagged such, leading to some performance impact.

As a test I ran the same IO workload 10 times in a raw.
It is a metadata only workload (files listing).
l2arc_noprefetch=0.

Here is the activity of my pool disks during this test :


the first scale is in %, not in ms

We can see that the first files' listing takes about 3 hours, during which the SSD cache is fed.
The other runs take about 35 minutes each, read IOs are made from SSD cache but also from HDD disks, cache is no more fed.

After some debugging, I found that the buffers which are not L2-backed are metadata buffers, as the ones which are in the cache, but are not ARC_FLAG_L2CACHE flagged.
I then quickly modified ZFS code to add ARC_FLAG_L2CACHE to each header, and here is the result :


the first scale is in %, not in ms

All IOs now come from the cache, leading to a nice performance improvement. Perfect.

A PR will be proposed soon to correct this issue.

Thank you,

Ben

History

#3

Updated by Prakash Surya almost 2 years ago

  • Subject changed from Buffers not L2 flagged, performance impact to Assign correct flags to prefetched buffers
#4

Updated by Electric Monk almost 2 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 272952165423c254ad7708f1b3fe2ff0a6ce408b

commit  272952165423c254ad7708f1b3fe2ff0a6ce408b
Author: benrubson <ben.rubson@gmail.com>
Date:   2017-11-09T15:09:45.000Z

    7531 Assign correct flags to prefetched buffers
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Prakash Surya <prakash.surya@delphix.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF