From: Karel Zak <kzak@redhat.com>
To: Sander Klein <roedie@roedie.nl>
Cc: "J. Bruce Fields" <bfields@fieldses.org>,
linux-nfs@vger.kernel.org, linux-nfs-owner@vger.kernel.org
Subject: Re: rpc.mountd high cpu usage
Date: Mon, 6 Jan 2014 17:31:57 +0100 [thread overview]
Message-ID: <20140106163157.GI31045@x2.net.home> (raw)
In-Reply-To: <e62c2d1848074f60fbfb2fb1136d6ca6@roedie.nl>
On Mon, Jan 06, 2014 at 05:20:12PM +0100, Sander Klein wrote:
> Hi,
>
> On 06.01.2014 12:18, Karel Zak wrote:
> >>> statfs("/some/export", {f_type=0x2fc12fc1, f_bsize=131072,
> >>> f_blocks=50331648, f_bfree=8355553, f_bavail=8355553,
> >>> f_files=2139121087, f_ffree=2139021753, f_fsid={1912623216,
> >>> 10933642}, f_namelen=255, f_frsize=131072}) = 0
> >>> stat("/some/export", {st_mode=S_IFDIR|0775, st_size=15, ...}) = 0
> >>> lstat("/some/export", {st_mode=S_IFDIR|0775, st_size=15, ...}) = 0
> >>> lstat("/some/export/..", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
> >>> stat("/some/export", {st_mode=S_IFDIR|0775, st_size=15, ...}) = 0
> >>> open("/sys/dev/block/0:187", O_RDONLY) = -1 ENOENT (No such file or
> >>> directory)
> >
> >This is blkid_devno_to_devname(), the first attempt is /sys, but it
> >failed, then it tries to scan /dev (which is pretty expensive method).
> >
> >BTW, what is device 0:187?
> >
> >It seems like btrfs... maybe we can optimize the code to ignore such
> >devices especially when get_uuid_blkdev() filters out btrfs :-)
>
> This machine is running ZFS On Linux with 180 multipathed disks. I wouldn't
> be amazed if ZFS and BTRFS suffer from the same problem because they are
> both volume managers and filesystems in one.
>
> >The another problem is poorly designed relationship between match_fsid()
> >and uuid_by_path(). The function uuid_by_path() is called in loop and
> >blkid is *always* requested, but the blkid_val is used when type==0.
> >It would be better to call get_uuid_blkdev() only when type==0.
> >
> >The patch below is just untested suggestion :-)
>
> Should/Would ZFS_SUPER_MAGIC 0x2fc12fc1 be added to make this untested
yep, try it, test it ;-)
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2014-01-06 16:32 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
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 [this message]
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=20140106163157.GI31045@x2.net.home \
--to=kzak@redhat.com \
--cc=bfields@fieldses.org \
--cc=linux-nfs-owner@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=roedie@roedie.nl \
/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).