* OPEN_XOR_DELEGATION performance problems
@ 2024-11-19 11:45 Jeff Layton
2024-11-19 15:09 ` Trond Myklebust
0 siblings, 1 reply; 6+ messages in thread
From: Jeff Layton @ 2024-11-19 11:45 UTC (permalink / raw)
To: Tom Haynes, Trond Myklebust, Mike Snitzer
Cc: Chuck Lever, Anna Schumaker, linux-nfs
We attempted to implement the "delstid" draft for v6.13, but have had
to drop the patches for it. After merge, we got a couple of reports of
a performance issue due to the OPEN_XOR_DELEGATION patch:
https://lore.kernel.org/linux-nfs/202409161645.d44bced5-oliver.sang@intel.com/
Once we enable OPEN_XOR_DELEGATION support, the fsmark "App Overhead"
statistic spikes significantly. The kernel patch for this is very
simple, and doesn't seem likely to cause a performance issue on its
own. My theory is that this test is one that causes the client to
return the delegation, and since it doesn't have an open stateid, it
has to reestablish one during the test run, and that causes the app
overhead stat to spike.
Trond, Tom, Mike -- I know that the HS Anvil has support for
OPEN_XOR_DELEGATION. If you run the fsmark test against it with that
support both enabled and disabled (either on the client or server
side), do you see a similar spike in "App Overhead"?
If so, then I suspect we need to consider limiting the use of that flag
in some cases. I have no idea what heuristic we'd use to decide this
though.
--
Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: OPEN_XOR_DELEGATION performance problems
2024-11-19 11:45 OPEN_XOR_DELEGATION performance problems Jeff Layton
@ 2024-11-19 15:09 ` Trond Myklebust
2024-11-19 16:23 ` Chuck Lever III
0 siblings, 1 reply; 6+ messages in thread
From: Trond Myklebust @ 2024-11-19 15:09 UTC (permalink / raw)
To: snitzer@kernel.org, jlayton@kernel.org, loghyr@gmail.com
Cc: anna@kernel.org, linux-nfs@vger.kernel.org,
chuck.lever@oracle.com
On Tue, 2024-11-19 at 06:45 -0500, Jeff Layton wrote:
> We attempted to implement the "delstid" draft for v6.13, but have had
> to drop the patches for it. After merge, we got a couple of reports
> of
> a performance issue due to the OPEN_XOR_DELEGATION patch:
>
>
> https://lore.kernel.org/linux-nfs/202409161645.d44bced5-oliver.sang@intel.com/
>
> Once we enable OPEN_XOR_DELEGATION support, the fsmark "App Overhead"
> statistic spikes significantly. The kernel patch for this is very
> simple, and doesn't seem likely to cause a performance issue on its
> own. My theory is that this test is one that causes the client to
> return the delegation, and since it doesn't have an open stateid, it
> has to reestablish one during the test run, and that causes the app
> overhead stat to spike.
>
> Trond, Tom, Mike -- I know that the HS Anvil has support for
> OPEN_XOR_DELEGATION. If you run the fsmark test against it with that
> support both enabled and disabled (either on the client or server
> side), do you see a similar spike in "App Overhead"?
>
> If so, then I suspect we need to consider limiting the use of that
> flag
> in some cases. I have no idea what heuristic we'd use to decide this
> though.
As already stated when we discussed this at Bakeathon: the server is
still in charge of heuristics w.r.t. whether or not there may be
contention for the file. The OPEN_XOR_DELEGATION flag changes nothing
in that respect.
Yes, I'm sure you can find tests which cause recalls of delegations,
and those will be marginally slower when the client has to re-establish
an open stateid. However the issue with those tests is that they are
deliberately setting up a situation where the server ideally shouldn't
be handing out a delegation at all.
Furthermore, this is no different than a situation where the client
used a delegation to cache the open (i.e. avoid sending an OPEN call)
after the application closed the file and then later re-opened it.
So the point is that this is not a situation that is unique to
OPEN_XOR_DELEGATION. It is just a consequence of the client's ability
to cache open state.
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: OPEN_XOR_DELEGATION performance problems
2024-11-19 15:09 ` Trond Myklebust
@ 2024-11-19 16:23 ` Chuck Lever III
2024-11-19 16:37 ` Jeff Layton
2024-11-20 7:39 ` Cedric Blancher
0 siblings, 2 replies; 6+ messages in thread
From: Chuck Lever III @ 2024-11-19 16:23 UTC (permalink / raw)
To: Trond Myklebust
Cc: snitzer@kernel.org, jlayton@kernel.org, Tom Haynes,
anna@kernel.org, Linux NFS Mailing List
> On Nov 19, 2024, at 10:09 AM, Trond Myklebust <trondmy@hammerspace.com> wrote:
>
> On Tue, 2024-11-19 at 06:45 -0500, Jeff Layton wrote:
>> We attempted to implement the "delstid" draft for v6.13, but have had
>> to drop the patches for it. After merge, we got a couple of reports
>> of
>> a performance issue due to the OPEN_XOR_DELEGATION patch:
>>
>>
>> https://lore.kernel.org/linux-nfs/202409161645.d44bced5-oliver.sang@intel.com/
>>
>> Once we enable OPEN_XOR_DELEGATION support, the fsmark "App Overhead"
>> statistic spikes significantly. The kernel patch for this is very
>> simple, and doesn't seem likely to cause a performance issue on its
>> own. My theory is that this test is one that causes the client to
>> return the delegation, and since it doesn't have an open stateid, it
>> has to reestablish one during the test run, and that causes the app
>> overhead stat to spike.
>>
>> Trond, Tom, Mike -- I know that the HS Anvil has support for
>> OPEN_XOR_DELEGATION. If you run the fsmark test against it with that
>> support both enabled and disabled (either on the client or server
>> side), do you see a similar spike in "App Overhead"?
>>
>> If so, then I suspect we need to consider limiting the use of that
>> flag
>> in some cases. I have no idea what heuristic we'd use to decide this
>> though.
>
> As already stated when we discussed this at Bakeathon: the server is
> still in charge of heuristics w.r.t. whether or not there may be
> contention for the file. The OPEN_XOR_DELEGATION flag changes nothing
> in that respect.
fsmark is a single-client test. There should be no contention
for any files during this test.
> Yes, I'm sure you can find tests which cause recalls of delegations,
> and those will be marginally slower when the client has to re-establish
> an open stateid.
The fsmark result regressed 92%.
> However the issue with those tests is that they are
> deliberately setting up a situation where the server ideally shouldn't
> be handing out a delegation at all.
>
> Furthermore, this is no different than a situation where the client
> used a delegation to cache the open (i.e. avoid sending an OPEN call)
> after the application closed the file and then later re-opened it.
> So the point is that this is not a situation that is unique to
> OPEN_XOR_DELEGATION. It is just a consequence of the client's ability
> to cache open state.
The regression was bisected to Jeff's XOR patch on two
separate occasions. This does indeed appear to be a
situation that is unique to OPEN_XOR_DELEGATION.
It's possible that our theory of the failure is wrong.
As developers of the only other server implementation of
OPEN_XOR_DELEGATION, can Hammerspace help us troubleshoot
this issue?
--
Chuck Lever
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: OPEN_XOR_DELEGATION performance problems
2024-11-19 16:23 ` Chuck Lever III
@ 2024-11-19 16:37 ` Jeff Layton
2024-11-20 7:39 ` Cedric Blancher
1 sibling, 0 replies; 6+ messages in thread
From: Jeff Layton @ 2024-11-19 16:37 UTC (permalink / raw)
To: Chuck Lever III, Trond Myklebust
Cc: snitzer@kernel.org, Tom Haynes, anna@kernel.org,
Linux NFS Mailing List, Oliver Sang
On Tue, 2024-11-19 at 16:23 +0000, Chuck Lever III wrote:
>
> > On Nov 19, 2024, at 10:09 AM, Trond Myklebust <trondmy@hammerspace.com> wrote:
> >
> > On Tue, 2024-11-19 at 06:45 -0500, Jeff Layton wrote:
> > > We attempted to implement the "delstid" draft for v6.13, but have had
> > > to drop the patches for it. After merge, we got a couple of reports
> > > of
> > > a performance issue due to the OPEN_XOR_DELEGATION patch:
> > >
> > >
> > > https://lore.kernel.org/linux-nfs/202409161645.d44bced5-oliver.sang@intel.com/
> > >
> > > Once we enable OPEN_XOR_DELEGATION support, the fsmark "App Overhead"
> > > statistic spikes significantly. The kernel patch for this is very
> > > simple, and doesn't seem likely to cause a performance issue on its
> > > own. My theory is that this test is one that causes the client to
> > > return the delegation, and since it doesn't have an open stateid, it
> > > has to reestablish one during the test run, and that causes the app
> > > overhead stat to spike.
> > >
> > > Trond, Tom, Mike -- I know that the HS Anvil has support for
> > > OPEN_XOR_DELEGATION. If you run the fsmark test against it with that
> > > support both enabled and disabled (either on the client or server
> > > side), do you see a similar spike in "App Overhead"?
> > >
> > > If so, then I suspect we need to consider limiting the use of that
> > > flag
> > > in some cases. I have no idea what heuristic we'd use to decide this
> > > though.
> >
> > As already stated when we discussed this at Bakeathon: the server is
> > still in charge of heuristics w.r.t. whether or not there may be
> > contention for the file. The OPEN_XOR_DELEGATION flag changes nothing
> > in that respect.
>
> fsmark is a single-client test. There should be no contention
> for any files during this test.
>
>
> > Yes, I'm sure you can find tests which cause recalls of delegations,
> > and those will be marginally slower when the client has to re-establish
> > an open stateid.
>
> The fsmark result regressed 92%.
>
To be clear, the fsmark "App Overhead" regressed 92%. Which has a
curious definition: "App overhead is time in microseconds spent in the
test not doing file writing related system calls."
It encompasses a bunch of different test setup stuff, and it's been
difficult to nail down the part that is slower. See Oliver's email
here:
https://lore.kernel.org/linux-nfs/ZwTm4e5JxOOJc7JC@xsang-OptiPlex-9020/
--
Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: OPEN_XOR_DELEGATION performance problems
2024-11-19 16:23 ` Chuck Lever III
2024-11-19 16:37 ` Jeff Layton
@ 2024-11-20 7:39 ` Cedric Blancher
2024-11-20 12:11 ` Mkrtchyan, Tigran
1 sibling, 1 reply; 6+ messages in thread
From: Cedric Blancher @ 2024-11-20 7:39 UTC (permalink / raw)
To: Linux NFS Mailing List, Tiramisu Mokka
On Tue, 19 Nov 2024 at 17:31, Chuck Lever III <chuck.lever@oracle.com> wrote:
>
>
>
> > On Nov 19, 2024, at 10:09 AM, Trond Myklebust <trondmy@hammerspace.com> wrote:
> >
> > On Tue, 2024-11-19 at 06:45 -0500, Jeff Layton wrote:
> >> We attempted to implement the "delstid" draft for v6.13, but have had
> >> to drop the patches for it. After merge, we got a couple of reports
> >> of
> >> a performance issue due to the OPEN_XOR_DELEGATION patch:
> >>
> >>
> >> https://lore.kernel.org/linux-nfs/202409161645.d44bced5-oliver.sang@intel.com/
> >>
> >> Once we enable OPEN_XOR_DELEGATION support, the fsmark "App Overhead"
> >> statistic spikes significantly. The kernel patch for this is very
> >> simple, and doesn't seem likely to cause a performance issue on its
> >> own. My theory is that this test is one that causes the client to
> >> return the delegation, and since it doesn't have an open stateid, it
> >> has to reestablish one during the test run, and that causes the app
> >> overhead stat to spike.
> >>
> >> Trond, Tom, Mike -- I know that the HS Anvil has support for
> >> OPEN_XOR_DELEGATION. If you run the fsmark test against it with that
> >> support both enabled and disabled (either on the client or server
> >> side), do you see a similar spike in "App Overhead"?
> >>
> >> If so, then I suspect we need to consider limiting the use of that
> >> flag
> >> in some cases. I have no idea what heuristic we'd use to decide this
> >> though.
> >
> > As already stated when we discussed this at Bakeathon: the server is
> > still in charge of heuristics w.r.t. whether or not there may be
> > contention for the file. The OPEN_XOR_DELEGATION flag changes nothing
> > in that respect.
>
> fsmark is a single-client test. There should be no contention
> for any files during this test.
>
>
> > Yes, I'm sure you can find tests which cause recalls of delegations,
> > and those will be marginally slower when the client has to re-establish
> > an open stateid.
>
> The fsmark result regressed 92%.
>
>
> > However the issue with those tests is that they are
> > deliberately setting up a situation where the server ideally shouldn't
> > be handing out a delegation at all.
> >
> > Furthermore, this is no different than a situation where the client
> > used a delegation to cache the open (i.e. avoid sending an OPEN call)
> > after the application closed the file and then later re-opened it.
> > So the point is that this is not a situation that is unique to
> > OPEN_XOR_DELEGATION. It is just a consequence of the client's ability
> > to cache open state.
>
> The regression was bisected to Jeff's XOR patch on two
> separate occasions. This does indeed appear to be a
> situation that is unique to OPEN_XOR_DELEGATION.
>
> It's possible that our theory of the failure is wrong.
> As developers of the only other server implementation of
> OPEN_XOR_DELEGATION, can Hammerspace help us troubleshoot
> this issue?
>
Doesn't Tigran's dcache.org nfs4j server also support OPEN_XOR_DELEGATION?
Ced
--
Cedric Blancher <cedric.blancher@gmail.com>
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: OPEN_XOR_DELEGATION performance problems
2024-11-20 7:39 ` Cedric Blancher
@ 2024-11-20 12:11 ` Mkrtchyan, Tigran
0 siblings, 0 replies; 6+ messages in thread
From: Mkrtchyan, Tigran @ 2024-11-20 12:11 UTC (permalink / raw)
To: Cedric Blancher; +Cc: Linux NFS Mailing List
[-- Attachment #1: Type: text/plain, Size: 3665 bytes --]
Unfortunately, for now, nfs4j doesn't support any type of delegation.
Tigran.
----- Original Message -----
> From: "Cedric Blancher" <cedric.blancher@gmail.com>
> To: "Linux NFS Mailing List" <linux-nfs@vger.kernel.org>, "Tiramisu Mokka" <kofemann@gmail.com>
> Sent: Wednesday, 20 November, 2024 08:39:00
> Subject: Re: OPEN_XOR_DELEGATION performance problems
> On Tue, 19 Nov 2024 at 17:31, Chuck Lever III <chuck.lever@oracle.com> wrote:
>>
>>
>>
>> > On Nov 19, 2024, at 10:09 AM, Trond Myklebust <trondmy@hammerspace.com> wrote:
>> >
>> > On Tue, 2024-11-19 at 06:45 -0500, Jeff Layton wrote:
>> >> We attempted to implement the "delstid" draft for v6.13, but have had
>> >> to drop the patches for it. After merge, we got a couple of reports
>> >> of
>> >> a performance issue due to the OPEN_XOR_DELEGATION patch:
>> >>
>> >>
>> >> https://lore.kernel.org/linux-nfs/202409161645.d44bced5-oliver.sang@intel.com/
>> >>
>> >> Once we enable OPEN_XOR_DELEGATION support, the fsmark "App Overhead"
>> >> statistic spikes significantly. The kernel patch for this is very
>> >> simple, and doesn't seem likely to cause a performance issue on its
>> >> own. My theory is that this test is one that causes the client to
>> >> return the delegation, and since it doesn't have an open stateid, it
>> >> has to reestablish one during the test run, and that causes the app
>> >> overhead stat to spike.
>> >>
>> >> Trond, Tom, Mike -- I know that the HS Anvil has support for
>> >> OPEN_XOR_DELEGATION. If you run the fsmark test against it with that
>> >> support both enabled and disabled (either on the client or server
>> >> side), do you see a similar spike in "App Overhead"?
>> >>
>> >> If so, then I suspect we need to consider limiting the use of that
>> >> flag
>> >> in some cases. I have no idea what heuristic we'd use to decide this
>> >> though.
>> >
>> > As already stated when we discussed this at Bakeathon: the server is
>> > still in charge of heuristics w.r.t. whether or not there may be
>> > contention for the file. The OPEN_XOR_DELEGATION flag changes nothing
>> > in that respect.
>>
>> fsmark is a single-client test. There should be no contention
>> for any files during this test.
>>
>>
>> > Yes, I'm sure you can find tests which cause recalls of delegations,
>> > and those will be marginally slower when the client has to re-establish
>> > an open stateid.
>>
>> The fsmark result regressed 92%.
>>
>>
>> > However the issue with those tests is that they are
>> > deliberately setting up a situation where the server ideally shouldn't
>> > be handing out a delegation at all.
>> >
>> > Furthermore, this is no different than a situation where the client
>> > used a delegation to cache the open (i.e. avoid sending an OPEN call)
>> > after the application closed the file and then later re-opened it.
>> > So the point is that this is not a situation that is unique to
>> > OPEN_XOR_DELEGATION. It is just a consequence of the client's ability
>> > to cache open state.
>>
>> The regression was bisected to Jeff's XOR patch on two
>> separate occasions. This does indeed appear to be a
>> situation that is unique to OPEN_XOR_DELEGATION.
>>
>> It's possible that our theory of the failure is wrong.
>> As developers of the only other server implementation of
>> OPEN_XOR_DELEGATION, can Hammerspace help us troubleshoot
>> this issue?
>>
>
> Doesn't Tigran's dcache.org nfs4j server also support OPEN_XOR_DELEGATION?
>
> Ced
> --
> Cedric Blancher <cedric.blancher@gmail.com>
> [https://plus.google.com/u/0/+CedricBlancher/]
> Institute Pasteur
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 2826 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-11-20 12:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-19 11:45 OPEN_XOR_DELEGATION performance problems Jeff Layton
2024-11-19 15:09 ` Trond Myklebust
2024-11-19 16:23 ` Chuck Lever III
2024-11-19 16:37 ` Jeff Layton
2024-11-20 7:39 ` Cedric Blancher
2024-11-20 12:11 ` Mkrtchyan, Tigran
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox