Sun Microsystems, Inc.
Home > Next >

More Resources:
 
»  White paper: Dynamic Instrumentation of Production Systems
 
»  Early access to the Solaris 10 OS — Software Express program
 
»  View the Solaris 10 OS Net Talk
 

Fast Track to Solaris 10 Adoption: Dynamic Tracing

General Information

Please click on a question below or download a pdf version.

  1. What is DTrace?
  2. What will DTrace allow me to do?
  3. How about a simple scenario of how DTrace would be used?
  4. Would you give an example of a real world problem that you solved with DTrace?
  5. Do I have to pay extra for DTrace?
  6. Is DTrace only available in the Solaris 10 OS?
  7. Is there a release date yet for the Solaris 10 OS?
  8. Can you supply a mini product roadmap for DTrace — convenience features/addons, integration with SMC, etc.?
  9. Can DTrace be used for all Solaris OS versions from 2.5.1 to 10?
  10. Do you have to have a deep understanding of the kernel for DTrace to be useful?
  11. Will we ever hear the back-story on DTrace, like how you guys worked up the nerve to dynamically instrument arbitrary running pieces of the system? How hard was it to apply aspects to the Solaris OS, etc.?

Q: What is DTrace?

A: Imagine if any question you had about your systems could be magically answered — instantly. Imagine how much easier it would be to find system bottlenecks and understand complicated performance issues. That's the dramatic effect dynamic tracing, or DTrace, a comprehensive dynamic tracing framework for the Solaris OS, can have on your data center.

More powerful than any other tool available, DTrace is an unmatched dynamic tracing framework for troubleshooting your network and tuning system performance in real time. DTrace lets you see your entire Solaris OS system in an entirely new way, revealing systemic problems that were previously invisible and fixing performance issues that used to go unresolved.

 Back to top

Q: What will DTrace allow me to do?

A: Here are some example uses:

  • Examine the behavior of user programs and the Solaris OS and quickly identify the root causes of system and application bottlenecks
  • Highlight trends and patterns to tune systems for best performance
  • Track down performance problems across many layers of software
  • Locate the cause of aberrant behavior
  • Write reusable scripts for common or complex routines
  • Specify the data DTrace collects, the actions it takes, and the conditions under which it should take those actions

 Back to top

Q: How about a simple scenario of how DTrace would be used?

A: DTrace will find a place in the heart of almost every even vaguely serious Solaris OS user. Personally, I find myself using it every day in various aspects of my job — often in situations that would have been impossible or incredible arduous without DTrace.

As for some simple examples, let's say you're a developer working on a new application. Often you want to know the value of a variable each time a function is called or at a particular point in a function. A debugger would be a pain because you'd have to stop, print the value, and continue a bazillion times. Recompiling the app to add a printf(3C) is a pain because it takes time. Instead, you can use DTrace to instrument exactly the spot you want and trace exactly the data you want.

Now, let's say you're a systems administrator and you want to find out what activity on your system is generating I/O. Without DTrace it's a serious hassle at best; with DTrace you can just enable a couple of probes and get your answer. Check out the I/O chapter in the Solaris Dynamic Tracing Guide on DTrace's BigAdmin website for this particular example.

 Back to top

Q: Would you give an example of a real world problem that you solved with DTrace?

A: You bet. Check out this paper.

 Back to top

Q: Do I have to pay extra for DTrace?

A: DTrace is bundled with the Solaris 10 OS at no extra charge.

 Back to top

Q: Is DTrace only available in the Solaris 10 OS?

A: DTrace is only in the Solaris 10 OS but some folks have success moving an app to a Solaris 10 system, tuning and debugging it there, and returning it to the Solaris 9 or 8 operating systems.

 Back to top

Q: Is there a release date yet for the Solaris 10 OS?

A: The Solaris 10 OS is scheduled to ship at the end of 2004. Early access to the Solaris 10 OS can be achieved today by joining the Software Express program.

 Back to top

Q: Can you supply a mini product roadmap for DTrace — convenience features/addons, integration with SMC, etc.?

A: The immediate future for DTrace is kernel-level providers that export stable semantics. You're already seeing this with the new sched and proc providers in Solaris Express 6/04, and we have several more on the way in this department. The next direction is to allow the same kind of stable semantics for user-level tracing. Right now, you can instrument any instruction (and/or any function) in any running process — but that doesn't necessarily help you if you want to, say, time a transaction. To solve this, we want to allow programs to export their own stable probes with well-defined semantics. This work is currently underway; stay tuned!

 Back to top

Q: Can DTrace be used for all Solaris OS versions from 2.5.1 to 10?

A: DTrace is only available on the Solaris 10 OS. We have many customers who install the Solaris 10 OS on a test system and then bring their apps over so they can look at them with DTrace. After the application's behavior has been examined and any issues rectified, the app can then be moved back to a non-Solaris 10 OS. Get the Solaris 10 OS through Software Express and you can use it to examine any Solaris application.

 Back to top

Q: Do you have to have a deep understanding of the kernel for DTrace to be useful?

A: Absolutely not. We have developed several providers that abstract away kernel implementation details. For example, the "sched" provider makes available probes related to CPU scheduling, like "on-CPU," "off-CPU," "enqueue," "dequeue," etc. You don't need to understand the implementation details of the scheduler to use it. See the DTrace documentation for details.

 Back to top

Q: Will we ever hear the back-story on DTrace, like how you guys worked up the nerve to dynamically instrument arbitrary running pieces of the system? How hard was it to apply aspects to the Solaris OS, etc.?

A: Well, no one has ever accused us of not having nerve. This is something we've wanted to do for a long, long time. We had a pretty clear vision of what we wanted to do, to the point where we would say things like "damn, I needed DTrace today" — in 1998. In fact, I think our colleagues got a little sick of "You know, DTrace will solve that problem" — when we didn't have so much as a line of code written.

 Back to top Next >