Aggregation in Dtrace Script Causing performance issues

Mark Johnston markj at FreeBSD.org
Wed Jun 17 22:20:40 UTC 2015


On Wed, Jun 17, 2015 at 02:59:50PM -0700, abhishek kulkarni wrote:
> Hello All,
> 
> Iam Working on a Dtrace Script for the ping utility. The purpose is to
> measure the CPU time for the current thread which is PING.We tried doing it
> using an aggregation function and once while avoiding it.We observed the
> times for a ping response, for both scripts. The response was roughly
> taking thrice the time ( around 3.519 ms )  when an aggregation function
> was used as against a script not using aggregation ( which took around
> 0.219 ms ) . Could this be explained in detail.I believe,  Dtrace , being
> considered a lightweight tool shouldnt affect the performance upto such an
> extent.

I tried both scripts on an otherwise mostly-idle system and didn't
observe any significant latency difference between the two, or with ping
latency when DTrace is not in use at all. Does your experiment produce
the same result reliably?


More information about the freebsd-dtrace mailing list