1. 11
  1.  

  2. 8

    While the work to improve the performance work via eBPF for linux has really made life much better..

    DTrace on solaris was a dream for me, and one I deeply miss. Please do not call this work “DTrace port for Linux”, Brendan Gregg would definitely call eBPF that if that’s what it is.

    With eBPF I hope people write enough neat tools for me to not have to write them myself, while I still have a git repo of D scripts for dtrace.

    1. 2

      Please do not call this work “DTrace port for Linux”, Brendan Gregg would definitely call eBPF that if that’s what it is.

      Oh sorry, that was likely a misunderstanding of the article on my part! Not my core area of expertise.

      1. 2

        I got to see Brendan give a talk about DTrace at a Southern California Linux Expo a few years ago. Really amazing stuff, and something I had no idea existed. I haven’t had reason to use it much myself, but it remains one of these magical and impressive pieces of technology that I really want to understand better. Given this, any suggestions of where to start?

        1. 9

          The best place to start is to find a need, so that can drive your investigation.

          So first, have an operating system installed that can use dtrace easily. While linux is possible, I suggest FreeBSD or Illumos. A VM is more than enough for learning.

          Come up with some side project or something, where you know time will be spent in the kernel & in userspace. A good example would be something like doing a long running dd to a large file (maybe dd random data into a 1G file) and see if you can figure out how a tmpfs filesystem allocates pages only inspecting with dtrace. Another might just be running a web browser and having your brain explode.

          Another could be running grep/find over a filesystem and seeing if you can’t quantify the slowest and fastest directories you have.

          For some quick starts, check out the freebsd oneliners for kickoff points.

          https://wiki.freebsd.org/DTrace/One-Liners

          Finally though – I strongly believe without a question to answer, most top-down investigations are useless. If you do know you have a question to answer, googling around will actually probably help you the fastest.

          Others will probably know tutorials and whatnot better than I, my dtrace learning occurred long ago, now I just look around for references. D is very easy to get used to if you know C syntax, especially for the simple usages you’ll need to learn DTrace