Prefetch Technologies // Keeping your cache lines cozy

Archive

Posts in DTrace

Determining if an application is using random vs. sequential I/O

dtraceSep 13, 2006 1 min read

The DTraceToolkit comes with two super useful scripts to observe the "randonmess" or "sequentialness" of an application. The first script is iopattern, which provides a system-wide view of random and sequential I/O, the total amount of I/O generated, and an I/O size distribution: The second script is seeksize.d. Seeksize.d provides a histogram of the number of sectors traversed between I/O operations for each process on the system: While discussing these scripts last night, I didn't provide many details on how they actually work. Each script uses the io provider to detect when an I/O occurs, and the value of "b_blkno" to determine which block is being read into memory or written to disk…

$ read more →

DTraceToolkit presentation slides

dtraceSep 12, 2006 1 min

Tonight I gave a talk at the local opensolaris users group titled "DTrace for SysAdmins: An introduction to the DTraceToolkit." I would like to thank everyone for coming out, and for putting up with my broken voice (I am currently getting over a cold). I put the presentation slides up on prefetch.net, and I hope everyone will snag the latest version of the toolkit and test it out!

$ read more →

Useful DTrace links

dtraceJul 30, 2006 1 min

I came across a couple of super useful DTrace links, and thought I would pass them on: Brendan Gregg's DTrace presentation in London: Opensolaris student guide (the chapter on using DTrace to debug device drivers is awesome): <

$ read more →

Displaying NFS Client Operations

dtraceMay 3, 2006 2 min

I have spent a fair amount of time in the past few weeks reading through RFC 1813 (NFSv3), and wanted to find a way to see if a given client operation resulted in a physical or logical I/O operation. Since the DTrace FBT provider allows you to observe entry and exit from 99.999% of the functions in the Solaris kernel, I decided DTrace would be ideal for answering this question. After reading through the vast majority of the NFSv3 client source code on opensolaris.org, I crafted a DTrace program named nfstrace to display NFSv3 client operations by process: The script leverages the fact that each file system implements a set of operations call VOPS (VNODE Operations), which are called by the Solaris kernel in response to a system call that operates on a file or directory in a given file system. In the case of NFSv3, when you issue a read(2) system call, the kernel will determine that the operation applies to a file on an NFSv3 share, and will invoke nfs3_read, which is the NFSv3-specific read routine…

$ read more →

DTrace timestamps

dtraceApr 22, 2006 1 min

While rereading several sections in the Solaris DTrace user guide, I came across the following descriptions for the timestamp and vtimestamp variables: uint64_t timestamp: The current value of a nanosecond timestamp counter. This counter increments from an arbitrary point in the past and should only be used for relative computations. uint64_t vtimestamp: The current value of a nanosecond timestamp counter that is virtualized to the amount of time that the current thread has been running on a CPU, minus the time spent in DTrace predicates and actions. This counter increments from an arbitrary point in the past and should only be used for relative time computations…

$ read more →