From: Mark Fasheh <mark.fasheh@oracle.com>
To: Daniel Phillips <phillips@google.com>
Cc: Andi Kleen <ak@suse.de>, Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com
Subject: Re: [Ocfs2-devel] Ocfs2 performance
Date: Thu, 9 Mar 2006 16:21:21 -0800 [thread overview]
Message-ID: <20060310002121.GJ27280@ca-server1.us.oracle.com> (raw)
In-Reply-To: <440FCA81.7090608@google.com>
E-mail subject line change, because the old one has worn thin ;)
On Wed, Mar 08, 2006 at 10:26:09PM -0800, Daniel Phillips wrote:
> I don't know how you got your statistics, but I went to the bother of
> writing a proc interface to dump the bucket counts.
The initial set of numbers I posted was collected by hacking the dlm to dump
bucket lengths at about 20,000 locks. I have since written some user space
code to model the dlm hash and output chain lengths. This allowed me to test
hash distributions at a rapid rate. As a data set, I used debugfs.ocfs2 to
collect lock names from a file system with a fully untarred kernel tree. The
program outputs in a format suitable for import into gnuplot. If interested,
you can get the program and a sample data set from:
http://oss.oracle.com/~mfasheh/dlm_hash/distribution_modeling/
Standard disclaimers apply - that code is a hack and wasn't edited to be
particularly performant, error resistant or pretty. It's also clearly not
intended for testing the actual performance of the hash (just distribution
output). Anyway, it turns out that full_name_hash() didn't have the severe
spikes in distribution that my original hack to compare only the last parts
of a lockres name had. This makes it inappropriate for general use, even
though it resulted in a performance gain on our micro-benchmark.
> So if we improve the hash function, 128K buckets (512K table size) is
> the right number, given a steady-state number of hash resources around
> 128K. This is pretty much independent of load: if you run light loads
> long enough, you will eventually fill up the hash table.
Your hash sizes are still ridiculously large. All my data shows that we need
to increase the hash size by much much less. At the following location you
will find a series of files detailing the results of 10 untar runs with
various hash allocations. The short story is that we really only need
an allocation on the order of a few pages.
http://oss.oracle.com/~mfasheh/dlm_hash/untar_timings/
If you average up the untar times you'll get something close to this:
1 page: 23 seconds
2 pages: 18 seconds
4 pages: 16 seconds
6 pages: 15 seconds
8 pages: 14 seconds
16 pages: 14 seconds
32 pages: 14 seconds
64 pages: 14 seconds
PAGE_SIZE on this system is 4096
So our largest performance gain is by just adding a page, and things seem to
top out at 6-8 pages. I will likely have a patch in the next few days or so
which will allocate a small array of pages at dlm startup. The bottom line
is that the default is extremely likely to be on the order of a few pages.
Eventually this will also be user configurable.
> Of course, if we take a critical look at your locking strategy we might
> find some fat to cut there too. Could I possibly interest you in writing
> up a tech note on your global locking strategy?
Sure, but it'll take a while. I've already got one OCFS2 related paper to
write. Perhaps I'll be able to kill two birds with one stone.
By the way, an interesting thing happened when I recently switched disk
arrays - the fluctuations in untar times disappeared. The new array is much
nicer, while the old one was basically Just A Bunch Of Disks. Also, sync
times dropped dramatically.
--Mark
--
Mark Fasheh
Senior Software Developer, Oracle
mark.fasheh@oracle.com
next prev parent reply other threads:[~2006-03-10 0:21 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-03 22:27 Ocfs2 performance bugs of doom Daniel Phillips
2006-03-04 0:53 ` Mark Fasheh
2006-03-04 3:42 ` Daniel Phillips
2006-03-04 7:36 ` Andrew Morton
2006-03-05 19:22 ` Mark Fasheh
2006-03-06 1:28 ` Daniel Phillips
2006-03-06 2:58 ` [Ocfs2-devel] " Mark Fasheh
2006-03-06 4:59 ` Daniel Phillips
2006-03-06 19:51 ` Mark Fasheh
2006-03-07 3:34 ` Andi Kleen
2006-03-07 4:58 ` Mark Fasheh
2006-03-07 6:56 ` [Ocfs2-devel] " Daniel Phillips
2006-03-09 6:26 ` Daniel Phillips
2006-03-09 7:26 ` Nick Piggin
2006-03-09 7:43 ` Nick Piggin
2006-03-09 4:19 ` Andi Kleen
2006-03-09 12:30 ` Nick Piggin
2006-03-10 5:14 ` Nick Piggin
2006-03-10 0:21 ` Mark Fasheh [this message]
2006-03-10 1:14 ` [Ocfs2-devel] Ocfs2 performance Bernd Eckenfels
2006-03-10 7:10 ` Joel Becker
2006-03-11 1:09 ` Mark Fasheh
2006-03-11 1:57 ` Bernd Eckenfels
2006-03-10 11:17 ` Daniel Phillips
2006-03-10 18:23 ` Zach Brown
2006-03-10 21:13 ` Daniel Phillips
2006-03-10 21:13 ` Daniel Phillips
2006-03-10 2:33 ` [Ocfs2-devel] Ocfs2 performance bugs of doom J. Bruce Fields
2006-03-10 10:27 ` Daniel Phillips
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=20060310002121.GJ27280@ca-server1.us.oracle.com \
--to=mark.fasheh@oracle.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ocfs2-devel@oss.oracle.com \
--cc=phillips@google.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