A man with a mission...

DTrace Awesomeness

Yesterday dietrich was telling me he was seeing a lot of writes to places.sqlite and places.sqlite-journal. I wanted to get good, hard data to see what was writing, and how often we were doing it. I figured this was a good option for DTrace, but I've had mixed experiences with it in the past. I first turned to Instruments on OS X, but that can't give you stacks for calls, so I had to dump it.

I talked to dolske, who happens to be the resident DTrace expert around here. With his help, I was able to put together this little D script to track writes to the files in question, and give me user stack traces so we know who is writing and when. With this, we've figured out what was writing, and are working on how to make it write less as we speak.

DTrace really is an awesome tool, even if it can be a bit awkward to use from time to time.

comments

4 Responses to “DTrace Awesomeness”

  1. mmc on October 17th, 2008

    bug number?

  2. Shawn Wilsher on October 17th, 2008

    @mmc
    bug number for what?

  3. Paul O’Shannessy on October 19th, 2008

    Oh the memories. DTrace is pretty cool and I’m glad you got to play with it a bit. Maybe when I come back out I’ll continue my DTrace Treemaps project.

  4. More fsync and write Reduction : Shawn Wilsher on March 3rd, 2009

    [...] I couldn’t measure any real-world performance gains with my DTrace scripts – in fact I saw no change during several different runs of Tp3 with various places.sqlite files. [...]