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:
# | APPENDIX | PAGES |
---|---|---|
A | DTrace Tunable Variables | 6 |
B | D Language Reference | 14 |
C | Provider Arguments Reference | 20 |
D | DTrace on FreeBSD | 6 |
E | USDT Example | 12 |
F | DTrace Error Messages | 10 |
G | DTrace Cheat Sheet | 4 |
- | Glossary | 12 |
# | CHAPTER | PAGES |
---|---|---|
1 | Introduction | 18 |
2 | The D Language | 32 |
3 | System View | 100 |
4 | Disk I/O | 140 |
5 | File Systems | 108 |
6 | Network Lower Level Protocols | 158 |
7 | Application Protocols | 112 |
8 | Languages | 114 |
9 | Applications | 50 |
10 | Databases | 34 |
11 | Security | 26 |
12 | Kernel | 54 |
13 | DTrace Tools | 40 |
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).
You can watch videos of Jim and myself talking about the book (taken roughly a year ago): Introduction to the DTrace book and What's in the DTrace book.
Update Nov 3, 2011: We have some newer videos about the DTrace book, and particularly its relevance to Oracle Solaris 11. And there's a website for the DTrace book.