Hello zfs-discuss, I noticed on a nfs server with ZFS that even with atime set to off and clients only reading data (almost 100% reads - except some unlinks()) I still can see some MB/s being written according to zpool iostat. What could be the couse? How can I see what is actually being written by ZFS (what files, metadata, etc.)? System is snv_39 SPARC, pools are raid-z. btw: while seeing ZFS writing to disks (iostat and zpool iostat) I run ''snoop rpc nfs | grep -i write'' and NO writes were issued from any client. -- Best regards, Robert mailto:rmilkowski at task.gda.pl http://milek.blogspot.com
On Wed, 31 May 2006, Robert Milkowski wrote:> Hello zfs-discuss, > > I noticed on a nfs server with ZFS that even with atime set to off > and clients only reading data (almost 100% reads - except some > unlinks()) I still can see some MB/s being written according to > zpool iostat. What could be the couse? How can I see what is > actually being written by ZFS (what files, metadata, etc.)?For file/block I/O, the DTraceToolkit''s iosnoop and rwsnoop scripts can be super useful. Metadata might be a bit trickier to locate, since it is file system dependent. Anyone know if there is a filestat utility for ZFS? Thanks, - Ryan -- UNIX Administrator http://daemons.net/~matty
On Wed, May 31, 2006 at 12:26:55AM +0200, Robert Milkowski wrote:> Hello zfs-discuss, > > I noticed on a nfs server with ZFS that even with atime set to off > and clients only reading data (almost 100% reads - except some > unlinks()) I still can see some MB/s being written according to > zpool iostat. What could be the couse? How can I see what is > actually being written by ZFS (what files, metadata, etc.)?You may use my attached zfs_io.d dtrace script. This will tell you what object numbers are being written. You can use zdb to determine the file names from that. Obviously, this is a kludge and any real solution would tell you the file names directly. --matt -------------- next part -------------- #!/usr/sbin/dtrace -qs zio_done:entry /args[0]->io_type == 1 && args[0]->io_bp != NULL/ { @bytes["read", args[0]->io_bookmark.zb_objset, args[0]->io_bookmark.zb_object, args[0]->io_bookmark.zb_level, args[0]->io_bookmark.zb_blkid != 0] /* sum(args[0]->io_size); */ count(); } zio_done:entry /args[0]->io_type == 2/ { @bytes["write", args[0]->io_bookmark.zb_objset, args[0]->io_bookmark.zb_object, args[0]->io_bookmark.zb_level, args[0]->io_bookmark.zb_blkid != 0] /* sum(args[0]->io_size); */ count(); } END { printf("r/w objset object level blk>0 i/os\n"); printa("%5s %4d %7d %d %d %@d\n", @bytes); printf("r/w objset object level blk>0 i/os\n"); }
Hello Matty, Wednesday, May 31, 2006, 10:46:29 PM, you wrote: M> On Wed, 31 May 2006, Robert Milkowski wrote:>> Hello zfs-discuss, >> >> I noticed on a nfs server with ZFS that even with atime set to off >> and clients only reading data (almost 100% reads - except some >> unlinks()) I still can see some MB/s being written according to >> zpool iostat. What could be the couse? How can I see what is >> actually being written by ZFS (what files, metadata, etc.)?M> For file/block I/O, the DTraceToolkit''s iosnoop and rwsnoop scripts can M> be super useful. Metadata might be a bit trickier to locate, since it is M> file system dependent. Anyone know if there is a filestat utility for ZFS? I don''t remember how these scripts gather data but I suspect it won''t work in this case (nfsd doesn''t use standard IO syscalls, etc.). Anyway I will look at it. -- Best regards, Robert mailto:rmilkowski at task.gda.pl http://milek.blogspot.com