From: "J. Bruce Fields" <bfields@fieldses.org>
To: Jeff Layton <jlayton@redhat.com>
Cc: Sachin Prabhu <sprabhu@redhat.com>,
linux-nfs <linux-nfs@vger.kernel.org>
Subject: Re: Should we be aggressively invalidating cache when using -onolock?
Date: Sun, 19 Sep 2010 14:53:18 -0400 [thread overview]
Message-ID: <20100919185318.GE32071@fieldses.org> (raw)
In-Reply-To: <20100918070932.1c1bb700@corrin.poochiereds.net>
On Sat, Sep 18, 2010 at 07:09:32AM -0400, Jeff Layton wrote:
> On Fri, 17 Sep 2010 13:46:44 -0400
> "J. Bruce Fields" <bfields@fieldses.org> wrote:
>
> > On Fri, Sep 17, 2010 at 08:26:39AM -0400, Sachin Prabhu wrote:
> > > We came across an issue where the performance of an application using flocks on RHEL 4(2.6.9 kernel) was far better when compared to the performance of the same application on RHEL 5(2.6.18 kernel). The nfs client behavior when performing flocks on RHEL 4 and RHEL 5 differ. To ensure we had a level playing field, we repeated the tests using the mount option -o nolock.
> > >
> > > The performance on RHEL 5 improved slightly but was still pretty bad when compared to performance on RHEL 4. On closer observation, it was seen that there are a large number of READ requests on RHEL 5 while on RHEL 4 there were hardly any. This difference in behavior was caused by the code which invalidates the cache in the do_setlk() function and results in the RHEL 5 client performing a large number of READ requests.
> > >
> > > In this case, the files were only being accessed by one client. This is why the nolock mount option was used. When running such workloads, the aggressive invalidation of the cache is unnecessary. This patch improves the performance in such a scenario.
> >
> > Makes sense to me.
> >
>
> Agreed. This is potentially a huge performance win for some workloads.
>
> > (Is it possible that somebody might depend on lock/unlock to keep their
> > meaning of "invalidate cache/flush changes" even when they don't care
> > bout checking for inter-client lock conflicts? That sounds like an odd
> > use case to me.)
> >
>
> Aye, there's the rub. It might cause anyone doing this to regress. My
> gut feeling is that those people are a minority if any exist at all.
> The consequences of such a change for them could be pretty ugly but I'm
> not sure we owe them any consistency guarantees in such a case.
Yeah, I haven't seen any documentation of the
revalidate-caches-but-don't-lock mode that has been accidentally
implemented here, and I don't think anyone could sensibly depend on it.
--b.
next prev parent reply other threads:[~2010-09-19 18:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1103741.22.1284726314119.JavaMail.sprabhu@dhcp-1-233.fab.redhat.com>
2010-09-17 12:26 ` Should we be aggressively invalidating cache when using -onolock? Sachin Prabhu
2010-09-17 17:46 ` J. Bruce Fields
2010-09-18 11:09 ` Jeff Layton
2010-09-19 18:53 ` J. Bruce Fields [this message]
2010-09-20 14:41 ` Chuck Lever
2010-09-20 18:25 ` J. Bruce Fields
2010-10-05 14:27 ` Jeff Layton
2010-10-05 15:19 ` Suresh Jayaraman
[not found] ` <20101005102752.67b75416-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-10-20 10:42 ` Sachin Prabhu
[not found] <14128115.54.1284995685991.JavaMail.sprabhu@dhcp-1-233.fab.redhat.com>
2010-09-20 15:15 ` Sachin Prabhu
2010-09-20 15:19 ` Chuck Lever
2010-09-20 15:34 ` Sachin Prabhu
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=20100919185318.GE32071@fieldses.org \
--to=bfields@fieldses.org \
--cc=jlayton@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=sprabhu@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).