From: Greg Banks <gnb@melbourne.sgi.com>
To: "Lever, Charles" <Charles.Lever@netapp.com>
Cc: Jeremy McNicoll <jeremy@mcnicoll.ca>,
Patrick Mochel <mochel@digitalimplant.org>,
nfs@lists.sourceforge.net
Subject: Re: [PATCH] 1/3 - RPC metrics support
Date: Thu, 01 Apr 2004 18:13:37 +1000 [thread overview]
Message-ID: <406BCF31.B274D7E5@melbourne.sgi.com> (raw)
In-Reply-To: 482A3FA0050D21419C269D13989C61130435DE31@lavender-fe.eng.netapp.com
G'day,
[cc trimmed somewhat]
"Lever, Charles" wrote:
>
> -------------------------------------------------------------------------------------
> Name: 06-rpc_metrics.patch
> 06-rpc_metrics.patch Type: unspecified type (application/octet-stream)
> Encoding: base64
> Description: 06-rpc_metrics.patch
> -------------------------------------------------------------------------------------
> Name: 07-nfs-iostat.patch
> 07-nfs-iostat.patch Type: unspecified type (application/octet-stream)
> Encoding: base64
> Description: 07-nfs-iostat.patch
> -------------------------------------------------------------------------------------
> Name: 08-rpc_call.patch
> 08-rpc_call.patch Type: unspecified type (application/octet-stream)
> Encoding: base64
> Description: 08-rpc_call.patch
These patches look great, I'm very happy to see extended stats
on the client and I expect it will be very useful debugging
performance and other problems. Thanks! Just a few comments...
I don't understand why you have an rpc_tally pointer in rpc_message.
This just seems to complicate matters by forcing you to initialise
the pointer to the rpc_tally in the nfs_server on every call. AFAICT
all the place where you need the rpc_tally pointer you already have
an rpc_clnt pointer which is initialised directly from the nfs_server
and could be made to hold the rpc_tally* instead. With that reorg
you could drop most of the 08-rpc_call.patch and all the changes
to nfs3proc.c and proc.c in nfs-iostat.patch and replace them with
a small change to nfs_create_client(). That would greatly reduce
the code perturbation without affecting performance or functionality.
I don't see any way for the userspace program which reads these to
figure out which of the iostat files corresponds to which mount.
We get the hostname in the filename and again in the contents but
nowhere do we get the mount path, only the device minor number in
the filename. How about adding a line to nfs_iostat_show() to
print nfss->mnt_path?
The minor dimension of the 2d array of struct rpc_metrics_totals
pointed to by rpc_tally is per-CPU. To get correct per-CPU
separation you will want to cacheline-align the per-CPU parts
(so that cachelines which straddle the per-CPU parts don't end
up bouncing between CPUs). For example, in rpc_alloc_tally(),
size = NR_CPUS * ROUNDUP(ops * sizeof(struct rpc_metric_totals), L1_CACHE_BYTES);
and change the stride of the tl_totals[] initialisation loop.
As others have mentioned, having at least four do_gettimeofday()
calls per RPC call is evil; we've seen major problems scaling
do_gettimeofday() on large CPU count Altix machines. This problem
also affects some NIC drivers because the network stack does
a do_gettimeofday() to timestamp every incoming ethernet packet;
David Miller's proposed solution to that is to define a new
scalable high-resolution timestamp API. I don't know if that's
gone anywhere, you might try asking on the netdev list.
So when the mount is unmounted, all stats are lost? How does this
work on clients which do intermittent traffic on automount mounts?
Would it be possible to get some global stats too?
The accumulation-over-CPU loops in nfs_iostat_show() and rpc_print_tally()
would be simpler if all the fields in struct nfs_iostat and struct
rpc_metric_totals were a consistent size, so you could just treat the
structs as an array of that type during the accumulation step.
In struct nfs_iostat, it would be nice to gather the number of times
calls retried because they received EJUKEBOX from the server, the number
of SETATTRs which cause a truncate, the number of WRITEs which cause
a file extension, and the number of WRITEs which are not aligned to
the wsize.
nfs_iostat_file_name() does an unbounded sprintf() of an unbounded string
that comes from userspace (from an unprivileged user if the site runs
automounter) into a buffer only NFS_PROC_NAMELEN=256 bytes long.
Greg.
--
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next prev parent reply other threads:[~2004-04-01 8:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-31 16:34 [PATCH] 1/3 - RPC metrics support Lever, Charles
2004-03-31 16:46 ` Trond Myklebust
2004-04-01 8:13 ` Greg Banks [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-03-31 16:57 Lever, Charles
2004-03-31 17:19 ` Trond Myklebust
2004-04-01 15:15 Lever, Charles
2004-04-01 23:58 ` Greg Banks
2004-04-02 0:34 ` Trond Myklebust
2004-04-02 2:33 ` Greg Banks
2004-04-01 16:45 Lever, Charles
2004-04-02 0:10 ` Greg Banks
2004-04-01 17:05 Lever, Charles
2004-04-02 0:17 ` Greg Banks
2004-04-02 0:36 ` Trond Myklebust
2004-04-02 0:49 ` Greg Banks
2004-04-02 1:41 ` Trond Myklebust
2004-04-02 2:42 ` Greg Banks
2004-04-04 2:35 Lever, Charles
2004-04-04 6:17 ` Greg Banks
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=406BCF31.B274D7E5@melbourne.sgi.com \
--to=gnb@melbourne.sgi.com \
--cc=Charles.Lever@netapp.com \
--cc=jeremy@mcnicoll.ca \
--cc=mochel@digitalimplant.org \
--cc=nfs@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.