linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sander Klein <roedie@roedie.nl>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: linux-nfs@vger.kernel.org, linux-nfs-owner@vger.kernel.org
Subject: Re: rpc.mountd high cpu usage
Date: Fri, 13 Dec 2013 20:32:56 +0100	[thread overview]
Message-ID: <c50ec8735833f8c05a351928ae48b6df@roedie.nl> (raw)
In-Reply-To: <20131212212213.GC13467@fieldses.org>

On , J. Bruce Fields wrote:
>> >I think what happens is that exportfs flushes the kernel's export cache
>> >at which point every use of an uncached export triggers an upcall to
>> >mountd.  That upcall is probably visible in the strace as a read of a
>> >file descriptor associated with /proc/net/sunrpc/nfsd.fh/content.
>> >
>> >That upcall is handled by nfs-utils/utils/mountd/cache.c:nfsd_fh(),
>> >which is given a filehandle fragment identifying the filesystem in
>> >question and has to match it to an export.
>> >
>> >That's done by match_fsid().  Which does do a stat of the export path,
>> >but not of all the devices....  That's probably happening in one of the
>> >libblkid calls in uuid_by_path()?  I wonder if there's something wrong
>> >with libblkid configuration or with the way we're using it?
>> 
>> Is there any way I can help getting this fixed? My coding skills are
>> limited but I am very willing to help in any way I can.
> 
> I wonder if ltrace could help determine if libblkid is where most of
> those stat's are coming from (and if so, which calls)?
> 
> May also be worth reading up on libblkid (man libblkid, etc.) and
> checking your configuration to make sure there's nothing obvious broken
> there.  (If so, maybe the libblkid commandline tools would exhibit the
> same problem?)

I didn't have any config in /etc/blkid.conf and the manpage says it will 
use EVALUATE=udev,scan which in fact scans through all the 
/dev/disk/by-* dirs and parses the /proc/partitions. I put 
'EVALUATE=scan' in /etc/blkid.conf but that doesn't help. I restarted 
anything NFS related...

I also attached ltrace to the rpc.mountd process. The output of the 
trace is at http://pastebin.com/ika1Vetq . I'm not sure what I'm looking 
for. The ltrace is done on a server with only 10 harddisks but the 
strace showed the same behavour of newfstatat-ing every disk in a lot of 
ways.

Greets,

Sander

  reply	other threads:[~2013-12-13 19:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-12 10:13 rpc.mountd high cpu usage Sander Klein
2013-12-12 15:46 ` J. Bruce Fields
2013-12-12 16:42   ` Sander Klein
2013-12-12 21:22     ` J. Bruce Fields
2013-12-13 19:32       ` Sander Klein [this message]
2013-12-19 17:09         ` J. Bruce Fields
2013-12-23 11:01           ` Sander Klein
2014-01-06 11:18   ` Karel Zak
2014-01-06 16:20     ` Sander Klein
2014-01-06 16:31       ` Karel Zak
2014-01-06 21:25     ` J. Bruce Fields
2014-01-07 19:55       ` Sander Klein
2014-01-07 20:49         ` J. Bruce Fields
2014-01-07 21:01         ` Steve Dickson
2014-01-08  9:09           ` Sander Klein

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=c50ec8735833f8c05a351928ae48b6df@roedie.nl \
    --to=roedie@roedie.nl \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs-owner@vger.kernel.org \
    --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).