I originally posted this at http://dtrace.org/blogs/brendan/2011/02/23/dtrace-book-sample-chapter-file-systems.
The long awaited DTrace book, which I posted as coming soon in September last year, is finally ready to be printed! Since then it has been through copy-edit, composition, formatting and indexing. It's taken a while, due in part to this being an 1100 page book. It's exciting to now see the final copy that will begin printing. Jim and I have also received the table of contents and a sample chapter from the final copy to share:
|DTrace Book: Table of Contents PDF (16 pages)|
|DTrace Book: Chapter 5 File Systems PDF (108 pages)|
Chapter 5 analyses file systems using DTrace, and includes scripts to trace VFS, UFS, ZFS, HFS+ and others. File system analysis is particularly important for performance investigations as this can measure response time as experienced by the application, and includes all file system I/O. This is often more relevant than looking at disk I/O, which may be asynchronous to the application (file system write flushing), and can miss issues entirerly. Slow I/O isn't always due to disks - it could be kernel lock contention, for example. If there are indeed issues at the disk level, DTrace can investigate in detail there too. Chapter 4 Disk I/O shows tracing of the lower level I/O subsystem including block devices, SCSI, SATA, IDE and SAS.
I've summarized the chapters and appendices below, with final page counts:
|A||DTrace Tunable Variables||6|
|B||D Language Reference||14|
|C||Provider Arguments Reference||20|
|D||DTrace on FreeBSD||6|
|F||DTrace Error Messages||10|
|G||DTrace Cheat Sheet||4|
|2||The D Language||32|
|6||Network Lower Level Protocols||158|
|14||Tips and Tricks||18|
I've included the Glossary as it's a particularly important part of the book. Since we cover such a wide range of topics, readers may be exposed to unfamiliar topics with unfamiliar terminology. Jim and I wrote a longer than usual Glossary to cover all the terms, which we hope is helpful.
We'll make the scripts available to download as a tarball so that you don't need to retype the scripts from the book, or the sample PDF (copy-n-paste from the PDF doesn't work well anyway).