Slashdot Mirror


Solaris' Dtrace in Detail

paulkoan writes "The Register has a further details about the new Dtrace systems utility bundled with Solaris 10, along with pictures of the authors, and user testimonials. It also highlights Suns vague assurances that this (if it lives up to the hype) amazing utility may or may not end up in the public domain."

33 of 212 comments (clear)

  1. And what is DTrace? by Anonymous Coward · · Score: 4, Insightful

    It looks like it's an allround system monitoring and administration tool. But how is it different/better than a well-sorted collection of individual tools, each doing one job as good as possible?

    1. Re:And what is DTrace? by davecb · · Score: 5, Informative

      It's a mechanism for adding trace calls to pretty-nearly-arbitrary locations.

      --
      davecb@spamcop.net
    2. Re:And what is DTrace? by int19 · · Score: 5, Informative

      It is much, much more than that. The problem I find with a "well-sorted collection of individual tools" in this case is the complexity/difficulty/impossibility to do what dtrace can do. Check out this usenet posting for some examples.

      I've been using it for a little while, it's a very interesting tool.

    3. Re:And what is DTrace? by afidel · · Score: 4, Interesting

      VERY cool indeed. Seems better than any tool for any OS I've seen. The closest would be process explorer from sysinternals but the level of detail is nowhere near what dtrace provides. For instance one thing that I've never been able to figure out is how to backtrace a file lock to the owner process.

      --
      There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
    4. Re:And what is DTrace? by chegosaurus · · Score: 4, Informative

      That's kind of like saying perl is an all round text processing tool, then asking why using perl is better than using cut, sort, and tr.

      You can do a lot with cut sort and tr. Often they're all you need, but perl lets you solve problems those three tools can't even address.

      I'd recommend grabbing a Solaris 10 beta and having a play with this thing. It's pretty amazing.

  2. It's about time (;-)) by davecb · · Score: 4, Interesting

    Dtrace is a lovely mechanism, and once it's out in production Solaris (and maybe Linux) I'm going to write a new TPS/response-time monitor using it.

    --
    davecb@spamcop.net
    1. Re:It's about time (;-)) by sql*kitten · · Score: 4, Funny

      going to write a new TPS/response-time monitor using it.

      Did you get the memo about the cover sheet?

  3. terrrible article by XMichael · · Score: 4, Insightful

    This article seems like it was written by Sun. I bet it's one of them junket articles, Sun must be a major sponsor of theregister.co.uk or something...

    The article says what this D-Trace does, but yet, doesn't... Not to mention it's neither objective, review like, and even fails to mention alternatives or relative tools

    Definately one of the poorest software article's I've seen in a while

    Slashdot is making me bitter (-;
    Complete CCTV Security Cameras

    1. Re:terrrible article by Handyman · · Score: 4, Insightful

      Sun must be a major sponsor of theregister.co.uk or something...

      I must agree that the article is pretty positive about the whole thing. But a positive review is not necessarily a bought review. In fact, the article does contain an angle that is not likely to be sponsored by Sun: open sourcing it, and open sourcing solaris. They explicitly make fun of Sun's president, who is evading their questions about open sourcing DTrace. From the article:

      So there you have it. DTrace may or may not end up in the public domain. Glad that's settled.

  4. other resource by SubtleNuance · · Score: 5, Informative

    An excellent article at sys admin mag.

  5. just to save you all some trouble by chegosaurus · · Score: 5, Insightful

    No, linux does not already do this.

    Solaris users could not care less whether Sun ports it to linux or not.

    Sun are *not* evil because they don't immediately give away the source to a product which has taken them years and $$$s to develop and which gives them an edge in a competetive market.

    Some people just prefer Solaris. If you prefer linux, that's fine.

    1. Re:just to save you all some trouble by chegosaurus · · Score: 4, Insightful

      Wasn't meant to sound superior! I use both (and OpenBSD) myself. I'm expecting this thread to be full of ill-informed "linux does this Slowaris is teh sux" posts and whining about "why won't they GPL it it"?

      So I guess I'm saying, if you're 100% linux, that's cool. I certainly don't need to hear about j00r leet gentoo boxen in a Solaris thread. You know the kind of person I mean!

    2. Re:just to save you all some trouble by dpb · · Score: 4, Informative

      > No, linux does not already do this.

      Yes, it does (well, 85% of it at least), in the form of DProbes. Dynamic Probes was ported by IBM from OS/2 to Linux way back in 2000, is distributed by SuSE and some parts are in 2.6 kernel out-of-box.

  6. Re:assurance of what ??? by Anonymous Coward · · Score: 4, Funny
    so, we are assured of a and !a ???

    No, we're assured of a or !a.

    Although knowing Sun, they're probably trying for a and !a and wondering why it won't work...

  7. Re:Lots of users == good. by mollymoo · · Score: 4, Funny
    If I can't use it, then I'll never learn about how good it is.

    So if some software isn't in the Gentoo portage tree you won't run it on your Solaris boxes at work?

    This is proprietary software for a version of Solaris which isn't even out yet.

    Remind me not to employ you as a Solaris sysadmin. Hell, remind me not to employ you to make the tea - we might have different cups at work and you wouldn't know what to do with them.

    --
    Chernobyl 'not a wildlife haven' - BBC News
  8. i/o preformance tuning by xyote · · Score: 4, Informative
    I've used stuff that gave you a realtime display of i/o perfmance stats and you could see when the hotpoints were happening. The problem was how to fix it. It's not like the old days when you had maybe 3 disks and you just moved a filesystem or database partition to another disk. Now you have huge amounts of raid storage with logical volume managers and your logical volumes (partitions) are all over the place. It's not so easy. You could see a hot spot and determine that it's caused by two logical volumes sharing a physical drive. Except when you move one to a different drive, you could create different hot spots and they could be much worse. Kind of like wack-a-mole except you're playing it while you're on call. Not fun.

    It's a hugely complicated problem and it doesn't have a simple solution except in the minds of markedroids.

  9. Sun reminds me of H2G2 philosophers by arvindn · · Score: 4, Funny

    Sun's vacillation about open source reminds me of the philosophers in the Hitchhiker's guide.


    ``But who the devil are you?'' exclaimed an outraged Fook.

    ``We,'' said Majikthise, ``are Philosophers.''

    ``Though we may not be,'' said Vroomfondel waving a warning finger at the programmers.

    ``Yes we are,'' insisted Majikthise. ``We are quite definitely here as representatives of the Amalgamated Union of Philosophers, Sages, Luminaries and Other Thinking Persons, and we want this machine off, and we want it off now!''

    ``What's the problem?'' said Lunkwill.

    ``I'll tell you what the problem is mate,'' said Majikthise, ``demarcation, that's the problem!''

    ``We demand,'' yelled Vroomfondel, ``that demarcation may or may not be the problem!''

    ``You just let the machines get on with the adding up,'' warned Majikthise, ``and we'll take care of the eternal verities thank you very much. You want to check your legal position you do mate. Under law the Quest for Ultimate Truth is quite clearly the inalienable prerogative of your working thinkers. Any bloody machine goes and actually finds it and we're straight out of a job aren't we? I mean what's the use of our sitting up half the night arguing that there may or may not be a God if this machine only goes and gives us his bleeding phone number the next morning?''

    ``That's right!'' shouted Vroomfondel, ``we demand rigidly defined areas of doubt and uncertainty!''

  10. Interesting... by starseeker · · Score: 5, Interesting

    They seem to have a lot of praise from users, not just market speak. And technical users yet.

    I'd be very, VERY surprised if Sun allows Dtrace into the open source world, at least not for a while. If Dtrace really is the supertool it seems to be, and is actually and massively UNIQUE, it represents a reason peole will move to Solaris and buy Sun's hardware to do it. Maybe the closest thing to a Unix killer app that has existed for a while.

    Now eventually (as in five years down the road) it will probably pay for Sun to open it up. If I were them, I'd milk it for all its worth on the "get people to move to Sun boxes" mantra, while the rest of the world trys (and probably fails) to duplicate the tool. Then, when Sun has gotten all the converts they are likely to, start making the tool even BETTER by opening it up and letting the world go to town on it. (GPL or something similar so Sun can incorporate back in the goodies.)

    Of course, that's just an off the cuff theory by someone who doesn't know.

    --
    "I object to doing things that computers can do." -- Olin Shivers, lispers.org
  11. Understanding and using Dtrace by ChrisRijk · · Score: 5, Informative

    Dynamic Instrumentation of Production Systems - this paper was presented at Usenix, and describes how Dtrace is actually implemented.

    Dtrace user guide.

    A collection of Dtrace scripts

  12. Kprobes and Dprobes by Anonymous Coward · · Score: 4, Interesting


    How does Dtrace for Solaris differ from Kprobes and Dprobes for Linux ??

    1. Re:Kprobes and Dprobes by Dug · · Score: 5, Informative
      The Usenix paper has some detail on the differences.

      Dtrace Usenix Paper

      More examples in answerbook from the BigAdmin Dtrace page

    2. Re:Kprobes and Dprobes by Anonymous Coward · · Score: 5, Interesting

      The mechanism (dynamic instrumentation) is similar. What makes DTrace unique over and above k/dprobes is the incredible power of the 'D' script language. It features things such as speculations (look at the docs on sun.com) that are absolutely vital in many situations for diagnosing problems - too much data is often as bad as too little data, and DTrace lets you easily get exactly the data you want, and only the data you want.

      You can find a small section comparing kprobes with DTrace in the DTrace USENIX paper; it also mentions some other differences (kprobes can easily crash your production system; that won't happen with DTrace).

  13. Re:Lots of users == good. by afidel · · Score: 4, Informative

    Well you CAN get Solaris 10 preview from the Express program. It's free for non-commercial use and available for x86. Downloads available here. Check out the hardware compatibility list for x86 here (don't see one specifically for Solaris 10 Express, probably the Solaris 9 list applies).

    --
    There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
  14. Linux Kernel Instrumentation by DaGoodBoy · · Score: 4, Informative

    The Kernel Instrumentation Process has already started creating the foundation for a kind of dtrace functionality. The profiling mechanisms appear to echo some of what Sun has done to Solaris to enable this kind of process-less profiling. Hope someone is still pushing this along...

    DaGoodBoy

    --
    My God! It's full of Voids!
  15. Not really by Halo- · · Score: 4, Informative
    There are three issues with profiled libraries:
    1. The execution path is different between the profiled and non-profiled library, so you can not be 100% assured you are getting the same result.
    2. To engage a profiled library you have to stop and start the target process, and often play all sorts of pre-load and path games.
    3. Looking into the kernel requires even more invasion, and can mean rebooting the server.
    Basically, the idea here is that you don't have to use a possibly "different" library, and you can instrument code on the fly (without stopping the process or the box). This is really nice for production boxes where any interruption or change of software is a really big deal.
  16. Linux is not Solaris. by ehack · · Score: 5, Interesting

    I don't think Sun's open sourcing the thing will help Linux users much anyway, the kernel design is probably very different, with more evolved semantics. Which means Linux developers will hae to do the work themselves if they want their admins to have these facilites.

    Note that this is finally a tool to resolve finger-pointing *it's your app that's slow - no it's the kernel etc* . I guess IBM will find it advantageous to create a similar Linux tool for their systems, as they bill Linux as an application serving environment. So we should see it soon on our own boxen.

    The sad thing is this proves once again that closed source companies retain an edge at innovating.

    --
    This is not a signature.
  17. Other tools that do this. by welloy · · Score: 5, Interesting
    "For example, there is no tool anywhere that allows for arbitrary dynamic instrumentation of a production operating system kernel."

    actually that's not true. Kerninst does exactly that.

    Kerninst is a framework for dynamically splicing code into a running kernel, almost anywhere, anytime. Code can be removed and changed at will. Kerninst works on standard (unmodified) Solaris and Linux kernels, *no* kernel re-compilation is necessary.

    1. Re:Other tools that do this. by Dug · · Score: 5, Informative
      Check out the Dtrace Usenix paper "Dynamic Instrumentation of Production Systems".

      This paragraph is copied from the Related Work section.

      Kerninst is a dynamic instrumentation framework that is designed for use on commodity operating system kernels[13]. Kerninst achieves zero probe effect when disabled, and allows instrumentation of virtually any text in the kernel. However, Kerninst is highly aggressive in its instrumentation; users can erroneously induce a fatal error by accidentally instrumenting routines that are not actually safe to instrument.3 Kerninst allows for some coalesence of data, but data may not be aggregated based on arbitrary tuples. Kerninst has some predicate support, but it does not allow for arbitrary predicates and has no support for arbitrary actions.

  18. Favorite quote by kill-hup · · Score: 5, Funny
    DTrace's inventors say admins need "to have a good relationship with their brains" to use the software best.

    I'll have to start using that in my conversations about lusers. "I wouldn't call him stupid; let's just say he doesn't have a good relationship with his brain..." :)

    --
    Sinepaw.org: Grape Winos
  19. Re:Exists already in Linux kernel by movement · · Score: 5, Informative

    I wrote OProfile, and I currently use DTrace daily, and I can assure you that you are wrong when you claim they do the same thing.

    OProfile is useful for measuring system-wide resource consumers (for example, you can see what pieces of code are causing cache misses in the kernel when your apache process is in the kernel etc, or which user processes take up the most CPU time).

    DTrace can also do something similar (though it needs a little more work yet). But DTrace does a LOT more than this. Imagine a system-wide (kernel, binaries, libraries) 'strace', where you can trivially choose what to print out, and what parts to strace, and under what circumstances. DTrace does even more than that.

    OProfile can't tell you exactly why your system call is returning EINVAL. OProfile can't tell you why your application is causing cross-calls. OProfile can't tell you what processes are writing to what files, in real time. OProfile can't debug race conditions.

    OProfile is a profiler: it does its job and nothing more. DTrace is, essentially, an instrumentation suite; one of its abilities is to function as a simple profiler.

    You won't really get a notion of why DTrace is so useful until you try it.

    --
    -- Remove the trailing '\0' to email me.
  20. Sounds very cool... by teamhasnoi · · Score: 4, Funny
    I wonder if they have attempted to run Dtrace on Dtrace? Wouldn't that allow you to make Dtrace infinitely fast? Perhaps become its own energy source?

    I know I would pay big dollars, say like $28, for a box that ran infinitely fast.

    This could be the diet pill for software bloat that we've all been looking for.

  21. Re:Microsoft perfmon by Zode · · Score: 5, Insightful

    are you kidding? DTrace lets you do this not just per process, but per instruction, across CPUs. Comparing DTrace to perfmon is like comparing a Ferrari to a tricycle.

  22. Re:Very Useful by kscguru · · Score: 4, Informative
    Okay, since you've felt the need to hype DProbes at least a couple of times, I'll pull from the DTrace USENIX paper (link was somewhere up above).

    The major difference: a huge amount of polish. DProbes can crash your system if used incorrectly; DTrace is guaranteed safe. DProbes reports just about everything; DTrace supports speculative tracing and predicates so you can narrow down the fire-hose of profiling data into the useful information. DProbes doesn't scale well across multiple CPUs; DTrace does. (This last one is just like Linux versus Solaris: one scales, the other doesn't. Sorry!)

    So, yes. If IBM had spent the past four years tuning DProbes and turning it into a useful tool, they might have something. As it is, Sun spent quite a bit of time and money, and ACTUALLY CREATED a very powerful tool.

    [rant]What is increasingly bugging me about open source advocates on Slashdot is how they'll look at any (ANY!) closed-source tool and say "oh, open-source tool XYZ does this / did this a few years ago / will make you walk on water". These advocates will cheerfully ignore that the closed-source tool has months or years of additional polish that have brought it from an internal company toy project into a commercially viable tool - that the open source tool of now is no more advanced than the closed source tool of years ago, except that most open source tools are stagnant and will never leave development and never obtain the degree of polish wide-scale use demands.

    A message to open-source advocates: if you don't spend the time turning your hobbyist code into solid, professional code, the closed-source companies that DO spend the time will leave you in the dust - freedom of code (both free as in beer and free as in GNU) notwithstanding.[/rant]

    --

    A witty [sig] proves nothing. --Voltaire