From: "J . Bruce Fields" <bfields@fieldses.org>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Jeff Layton <jlayton@poochiereds.net>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 2/2] nfsd: report per-export stats
Date: Tue, 5 Jan 2021 10:34:25 -0500 [thread overview]
Message-ID: <20210105153425.GB14893@fieldses.org> (raw)
In-Reply-To: <CAOQ4uxh18YYN=T3Ua3Bia=N+zw7RjGctnJqyyEDE53dp-p2Kuw@mail.gmail.com>
On Tue, Jan 05, 2021 at 08:42:21AM +0200, Amir Goldstein wrote:
> On Tue, Jan 5, 2021 at 12:49 AM J . Bruce Fields <bfields@fieldses.org> wrote:
> >
> > On Mon, Dec 28, 2020 at 07:03:44PM +0200, Amir Goldstein wrote:
> > > Collect some nfsd stats per export in addition to the global stats.
> >
> > Seems like a reasonable thing to do.
> >
> > > A new nfsdfs export_stats file is created. It uses the same ops as the
> > > exports file to iterate the export entries and we use the file's name to
> > > determine the reported info per export. For example:
> > >
> > > $ cat /proc/fs/nfsd/export_stats
> > > # Version 1.1
> > > # Path Client Start-time
> > > # Stats
> > > /test localhost 92
> > > fh_stale: 0
> > > io_read: 9
> > > io_write: 1
> > >
> > > Every export entry reports the start time when stats collection
> > > started, so stats collecting scripts can know if stats where reset
> > > between samples.
> >
> > Yes, you expect svc_export to be created (or destroyed) when a
> > filesystem is exported (or unexported), or when nfsd starts (or stops).
> >
> > But actually it's just a cache entry and can be removed and recreated at
> > any time. Not much we can do about losing statistics when that happens,
> > but the start time at least gives us some hope of interpreting the
> > statistics.
> >
> > Why weren't there existing file system statistics that would do the job
> > in your case?
> >
>
> I am not sure what you mean.
> We want to know the amount of read/write io for a specific export on
> the server, including io to/from page cache, which isn't counted by stats
> of most local filesystems.
I was just curious what exactly your use case was. (And incidentally
if it explained the interest in STALE errors as well?)
> Unrelated, in our search for those statistics, we were surprised (good
> surprises)
> to learn about s_op->show_stats(), but also surprised (bad surprise)
> to learn how few filesystems implement this method.
Yes, Chuck added it for NFS (checks history...) in 2006. NFS is unique
in some ways, but I can imagine it'd be useful elsewhere too.
--b.
next prev parent reply other threads:[~2021-01-05 15:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-28 17:03 [PATCH 0/2] Improvements to nfsd stats Amir Goldstein
2020-12-28 17:03 ` [PATCH 1/2] nfsd: protect concurrent access to nfsd stats counters Amir Goldstein
2020-12-28 19:53 ` Chuck Lever
2021-01-04 21:55 ` J . Bruce Fields
2021-01-04 22:22 ` Amir Goldstein
2021-01-04 22:34 ` J . Bruce Fields
2021-01-05 2:12 ` Chuck Lever
2021-01-05 6:29 ` Amir Goldstein
2020-12-28 17:03 ` [PATCH 2/2] nfsd: report per-export stats Amir Goldstein
2021-01-04 22:49 ` J . Bruce Fields
2021-01-05 6:42 ` Amir Goldstein
2021-01-05 15:34 ` J . Bruce Fields [this message]
2021-01-05 15:45 ` Amir Goldstein
2021-01-05 18:32 ` J . Bruce Fields
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=20210105153425.GB14893@fieldses.org \
--to=bfields@fieldses.org \
--cc=amir73il@gmail.com \
--cc=jlayton@poochiereds.net \
--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