Project

General

Profile

Bug #5034

ARC's buf_hash_table is too small

Added by Matthew Ahrens about 5 years ago. Updated about 5 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

The ARC puts all (non-anonymous) arc_buf_hdr_t's in a hash table, which is
created at system boot time. The hash table is sized such that if all of
physical memory was filled with 64K blocks, the hash chain length would average
<1.0. However, on our system the typical block size is 8k, which can lead to
long hash chain lengths. I've observed average length ~6.5, theoretically it
could be up to 16 (because evicted "ghost" entries are also in the hashtable).

By increasing the hash table size to have enough entries for average length 1.0
when memory is filled with 8k blocks, we can obtain a 18% performance
improvement on cached reads. (680MB/s -> 805MB/s)

The hash table size should also be tunable, rather than hard coded.

History

#1

Updated by Electric Monk about 5 years ago

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

git commit 63e911b6fce0acc8e2a1d31ebdaf0c4c12580a14

commit  63e911b6fce0acc8e2a1d31ebdaf0c4c12580a14
Author: Matthew Ahrens <mahrens@delphix.com>
Date:   2014-07-28T05:25:02.000Z

    5034 ARC's buf_hash_table is too small
    Reviewed by: Christopher Siden <christopher.siden@delphix.com>
    Reviewed by: George Wilson <george.wilson@delphix.com>
    Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com>
    Reviewed by: Richard Elling <richard.elling@gmail.com>
    Approved by: Gordon Ross <gwr@nexenta.com>

Also available in: Atom PDF