Project

General

Profile

Actions

Bug #13766

closed

Restore ARC MFU/MRU pressure

Added by Jason King about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

From OpenZFS #10548 and #10618:

The arc_adapt() function tunes LRU/MLU balance according to 4 types of
cache hits (which is passed as state agrument): ghost LRU, LRU, MRU,
ghost MRU. If this function is called with wrong cache hit (state),
adaptation will be sub-optimal and performance will suffer.

Some time ago upstream received this commit:

6950 ARC should cache compressed data) in arc_read() do next
sequence (access to ghost buffer)

Before this commit, hit to any ghost list was passed arc_adapt() before
call to arc_access() which revive element in cache and change state from
ghost to real hit.

After this commit, the order of calls was reverted and arc_adapt() is
now called only with «real» hits even if hit was in one of two ghost
lists, which renders ghost lists useless and breaks the ARC algorithm.

FreeBSD fixed this problem locally in Change D19094 / Commit r348772.

This change is an adaptation of the above commit to the current arc
code.

Reviewed-by: Brian Behlendorf <>
Signed-off-by: Matt Macy <>


Related issues

Related to illumos gate - Feature #6950: ARC should cache compressed dataClosedGeorge Wilson2016-05-04

Actions
Actions #1

Updated by Jason King about 2 years ago

  • Related to Feature #6950: ARC should cache compressed data added
Actions #2

Updated by Electric Monk about 2 years ago

  • Gerrit CR set to 1455
Actions #3

Updated by Jason King about 2 years ago

To test, I ran the zfs test suite, and the only failures were tests with known issues (and bugs filed).

Actions #4

Updated by Jason King about 2 years ago

Also, the FreeBSD for the equivalent change is here: https://reviews.freebsd.org/D19094

Actions #5

Updated by Electric Monk about 2 years ago

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

git commit 9facd51aead02cdbd00e66663a6c34c9254ed0e7

commit  9facd51aead02cdbd00e66663a6c34c9254ed0e7
Author: Matthew Macy <mmacy@freebsd.org>
Date:   2021-05-07T05:11:55.000Z

    13766 Restore ARC MFU/MRU pressure
    Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Dan McDonald <danmcd@joyent.com>
    Reviewed by: Andy Fiddaman <Andy@omnios.org>
    Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@tintri.com>
    Approved by: Gordon Ross <gordon.w.ross@gmail.com>

Actions

Also available in: Atom PDF