From owner-svn-src-head@FreeBSD.ORG Sun Mar 22 22:15:48 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E2621065674; Sun, 22 Mar 2009 22:15:48 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 692448FC16; Sun, 22 Mar 2009 22:15:48 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 2241E46B6C; Sun, 22 Mar 2009 18:15:48 -0400 (EDT) Date: Sun, 22 Mar 2009 22:15:48 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <200903222207.n2MM7qK3085361@svn.freebsd.org> Message-ID: References: <200903222207.n2MM7qK3085361@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: svn commit: r190293 - in head/sys: cddl/dev/dtnfsclient modules/dtrace modules/dtrace/dtnfsclient modules/dtrace/dtraceall nfsclient sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2009 22:15:49 -0000 On Sun, 22 Mar 2009, Robert Watson wrote: > Add dtnfsclient, a first cut at an NFSv2/v3 client reuest DTrace > provider. The NFS client exposes 'start' and 'done' probes for NFSv2 > and NFSv3 RPCs when using the new RPC implementation, passing in the > vnode, mbuf chain, credential, and NFSv2 or NFSv3 procedure number. > For 'done' probes, the error number is also available. > > Probes are named in the following way: > > ... > nfsclient:nfs2:write:start > nfsclient:nfs2:write:done > ... > nfsclient:nfs3:access:start > nfsclient:nfs3:access:done > ... > An example script to profile time spent waiting on NFS RPCs in NFSv3 by system call: syscall:::entry { self->count = 0; } nfsclient:nfs3::start { self->timestamp = timestamp; } nfsclient:nfs3::done { self->count += (timestamp - self->timestamp); } syscall:::return /self->count != 0/ { @syscalls[probefunc] = quantize(self->count); } The script could easily be expanded to look at RPC delays associated with page faults, etc. Something Solaris does in their prototype DTrace server probes is summarize network information for the remote host (local + remote address) and provide a pathname for the vnode being accessed (if available). It would be easy to do something along those lines here, although when I glanced at a recent opensolaris tree it looked like their server probes hadn't made it back into hg yet. However, it would be easy to imagine one or both of these behaviors here being very useful (summarize I/O by pathname, latency by server, etc), which would currently require DTrace scripts to grub around a lot. Robert N M Watson Computer Laboratory University of Cambridge