On Wed, 2007-11-07 at 18:44 -0500, Rayson Ho wrote: > > I ran an > > experiment once using rdtsc assembly instruction for manually timing > > some mid-frequency user-space operations with and without DTrace > > enabled. > > The difference was there (and I shouldn't say it was > > negligible) but it wasn't all that impressive. I'd be curious to hear > > your side of the story. > > I believe the overhead of firing a probe from userspace to the DTrace > framework is in the order of thousands of cycles. But I don't have > access to a Solaris system right now so I don't know. Whether DTrace > is good enough or not all depends on how long the lock is held. I am > interested in your experiment as well...
Thousands of cycles sounds like a reasonable assessment, but in my book that doesn't make DTrace application to lock monitoring much slower. pthread_mutex_lock would take about 10-30K cycles (depending on whether it is contended or not) so we're talking about ~5% overhead. Again, I don't consider it to be negligible, but at the same time it is far from being catastrophic and in now way rules out DTrace application. IMHO. Thanks, Roman. _______________________________________________ dtrace-discuss mailing list [email protected]
