* nfs client stat() performance degradation
@ 2015-01-13 16:36 Julien Cristau
2015-02-06 15:04 ` Benjamin Coddington
0 siblings, 1 reply; 2+ messages in thread
From: Julien Cristau @ 2015-01-13 16:36 UTC (permalink / raw)
To: Trond Myklebust, linux-nfs; +Cc: David Douard
Hi,
we're experiencing some troubling performance issues with our nfs clients. One
of the symptoms is degraded performance of directory walks with hot caches and
expired attribute caches: "find -ls" in the kernel tree goes from about 4s
(cold caches) to 1.5s (hot vm caches) and then to 18s after actimeo. Network
traffic increases by about the same amount. "echo 3 >
/proc/sys/vm/drop_caches" brings back the initial performance (~4s), but so do
writing 1 or 2.
This was reported almost two years ago in https://bugs.debian.org/702477 but I
don't know if this is a known issue upstream. Seen on various kernel versions,
up to 3.18.
Is there anything we can do to track this down, or are there known workarounds
for this?
Thanks,
Julien
--
Julien Cristau <julien.cristau@logilab.fr>
Logilab http://www.logilab.fr/
Informatique scientifique & gestion de connaissances
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: nfs client stat() performance degradation
2015-01-13 16:36 nfs client stat() performance degradation Julien Cristau
@ 2015-02-06 15:04 ` Benjamin Coddington
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Coddington @ 2015-02-06 15:04 UTC (permalink / raw)
To: Julien Cristau; +Cc: Trond Myklebust, linux-nfs, David Douard
On Tue, 13 Jan 2015, Julien Cristau wrote:
> Hi,
>
> we're experiencing some troubling performance issues with our nfs clients. One
> of the symptoms is degraded performance of directory walks with hot caches and
> expired attribute caches: "find -ls" in the kernel tree goes from about 4s
> (cold caches) to 1.5s (hot vm caches) and then to 18s after actimeo. Network
> traffic increases by about the same amount. "echo 3 >
> /proc/sys/vm/drop_caches" brings back the initial performance (~4s), but so do
> writing 1 or 2.
>
> This was reported almost two years ago in https://bugs.debian.org/702477 but I
> don't know if this is a known issue upstream. Seen on various kernel versions,
> up to 3.18.
>
> Is there anything we can do to track this down, or are there known workarounds
> for this?
>
> Thanks,
> Julien
Hi Julien,
I think that after the attribute cache times out, the client has to do a lot
of GETATTRs to revalidate inodes which is where you're getting slowed down.
When each directory is initially read READDIR is filling in the attribute
information and then caching the results of that READDIR in the page cache.
Then the attribute cache times out, the directory is revalidated (it hasn't
changed) and the contents of the directory are read from page cache, but
each directory entry's attributes are now also timed out and so the many
GETATTRs.
When you dump the page cache, it makes sense that the client goes back to
doing READDIRs, and your directory walk is faster.
Possibly we could invalidate directory inode pages whenever the attributes
time out, but I'm not sure what all the ramifications of that may be.
I also feel like this issue has already been discussed, but I'm not
immediately able to locate that discussion.
Ben
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-06 15:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-13 16:36 nfs client stat() performance degradation Julien Cristau
2015-02-06 15:04 ` Benjamin Coddington
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox