cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Benjamin Marzinski <bmarzins@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH 0/2 v2] readdir cookie patches
Date: Tue, 25 Aug 2015 16:10:21 -0500	[thread overview]
Message-ID: <1440537023-17455-1-git-send-email-bmarzins@redhat.com> (raw)

These two patches change the readdir cookies to format that should last a lot
longer before there are collisions. Unlike my last version, they store the
computed cookie in the gfs2_dirent structure, which keeps their performance on
small directories similar to the old code. After that you start reaching the
point where hash indexes reach the maximum depth, and the new code stops
needing to sort them, and performance of the new code quickly surpasses the old
code. For instance, when I contrived a situation where there were 1000 dirents
with the same hash index, the new code "ls -f" time was a less than a tenth of
the old code, 0.003s vs 0.036s. However, this is a pretty unrealistic size,
since with 131072 hash buckets, you shouldn't expect this many dirents per
average bucket until you have around 130 million files in a directory.

Benjamin Marzinski (2):
  gfs2: keep offset when splitting dir leaf blocks
  gfs2: change gfs2 readdir cookie

 fs/gfs2/dir.c                    | 160 ++++++++++++++++++++++++++++++---------
 fs/gfs2/incore.h                 |   3 +
 fs/gfs2/ops_fstype.c             |   3 +
 fs/gfs2/super.c                  |  12 +++
 include/uapi/linux/gfs2_ondisk.h |   9 ++-
 5 files changed, 148 insertions(+), 39 deletions(-)

-- 
1.8.3.1



             reply	other threads:[~2015-08-25 21:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-25 21:10 Benjamin Marzinski [this message]
2015-08-25 21:10 ` [Cluster-devel] [GFS2 PATCH 1/2 v2] gfs2: keep offset when splitting dir leaf blocks Benjamin Marzinski
2015-08-25 21:10 ` [Cluster-devel] [GFS2 PATCH 2/2 v2] gfs2: change gfs2 readdir cookie Benjamin Marzinski
2015-08-26 10:58   ` Steven Whitehouse
2015-08-26 16:02     ` Benjamin Marzinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1440537023-17455-1-git-send-email-bmarzins@redhat.com \
    --to=bmarzins@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).