From: Steve Dickson <SteveD@redhat.com>
To: linux-nfs@vger.kernel.org
Subject: Re: rpc.mountd reads /etc/mtab 17028 times, 100% CPU.
Date: Thu, 26 Mar 2015 13:00:09 -0400 [thread overview]
Message-ID: <55143B19.3090003@RedHat.com> (raw)
In-Reply-To: <20150325093707.GC26088@dot.freshdot.net>
On 03/25/2015 05:37 AM, Sander Smeenk wrote:
> I'm running a server that has 1500+ mounted local filesystems.
> All of these local filesystems are exported through NFS by this server.
>
> When an NFS-client tries to access one of these exported filesystems,
> for example doing a simple 'ls' in a mounted NFS, rpc.mountd on the
> server takes 100% CPU and starts to spin over reading /etc/mtab which is
> linked to /proc/mounts and totals to about 200KB in size. The client
> stalls all the while rpc.mountd is busy reading /etc/mtab for every
> filesystem mounted, and then some more.
>
> This entire process of reading /etc/mtab 17028 times takes a lot of time
> during which the client stalls, but in the end 'it just works fine'.
> It just takes ages when you try to tab-complete on a client.
Taking a quick look... it appears the only way rpc.mountd
will read /etc/mtab is if the 'crossmnt' export flag is
set. Is this the case?
>
> What would be needed to debug and optimise this?
Maybe reorder you exports so the 'hot' file systems are on the
top of the list...
> Could someone point me to the code that is involved in doing this?
utils/mountd/cache.c:nfsd_fh():path = next_mnt(&mnt, exp->m_export.e_path);
steved.
next prev parent reply other threads:[~2015-03-26 17:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-25 9:37 rpc.mountd reads /etc/mtab 17028 times, 100% CPU Sander Smeenk
2015-03-26 17:00 ` Steve Dickson [this message]
2015-03-27 16:08 ` Sander Smeenk
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=55143B19.3090003@RedHat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/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).