coolstack and dtrace
I saw the video about coolstack from sdn. Beside the faster and smaller binary code of these software, these apps have dtrace probes inserted.
I downloaded the coolstack_src.tar.bz2 and try to find out how dtrace probes got enabled for these apps.
[root@vmwareserver opensolaris]# ls -l README httpd-2.0.58/config.sh
-rwxr-xr-x 1 root root 497 Jun 29 2006 httpd-2.0.58/config.sh
-rw-r--r-- 1 root root 523 Aug 28 09:51 README
[root@vmwareserver opensolaris]#
[root@vmwareserver httpd-2.0.58]# head -1 config.sh
CFLAGS='-DSSL_EXPERIMENTAL -DSSL_ENGINE -xO4 -xtarget=generic' ./configure --prefix=/usr/local/apache2 --enable-mods-shared=all --enable-cache --enable-mem-cache --enable-ssl --with-mpm=prefork --enable-so --enable-suexec --enable-rule=SSL_EXPERIMENTAL --with-ssl=/usr/sfw
[root@vmwareserver httpd-2.0.58]#
Anyone know where I can find info about dtrace enabling of these SAMP ?
Regards
tj
[976 byte] By [
tj_yanga] at [2007-11-26 18:40:50]

# 1
Hi tj,
There are a couple of answers here.
First of all, DTrace doesn't require an application be rewritten or have static probes inserted in order to dynamically trace what is happening with the application. Because of things like the function boundary trace provider and the profile provider along with DTrace predicates, you can trace what is happening with many applications without needing specific static trace points in the application itself. This is, in part, how Sun has been working to optimize the AMP stack to date.
Have a look at some of the articles, and when you have some time, the full dynamic tracing guide over here:
http://www.sun.com/bigadmin/content/dtrace/
Secondarily, Sun is looking at where trace points across the AMP stack make sense. For instance, Bryan Cantrill and Wez Furlong added some probe capabilities to PHP. Alan Burlison did the same for Perl. You can read more about this here:
http://blogs.sun.com/bmc/entry/dtrace_and_php_demonstrated
http://blogs.sun.com/alanbur/entry/dtrace_and_perl
The real power in DTrace, however, is not in it's ability to observe a particular process.Usually those processes have logging or some other monitoring facility. Instead, the real power is in being able to ask interesting questions that crosscut the system. For instance, if you find disk IO is really high in one place, which process is that IO associated with? How big are the IOs? What does the stack of the application look like when performing 4k writes? Those are all questions that you can answer within seconds with DTrace all while the app is running, without being intrusive on the system, affecting system stability or restarting the application.
What trace providers would make the most sense to you?
There've been some discussions of providers for applications on the dtrace-discuss list on opensolaris.org.
# 2
> Hi tj,
>
> There are a couple of answers here.
>
> First of all, DTrace doesn't require an application
> be rewritten or have static probes inserted in order
> to dynamically trace what is happening with the
> application. Because of things like the function
> boundary trace provider and the profile provider
> along with DTrace predicates, you can trace what is
> happening with many applications without needing
> specific static trace points in the application
> itself. This is, in part, how Sun has been working
> to optimize the AMP stack to date.
Thanks for the reply, if you look at later part of this sdn video, the person (Dan Robert) presented (S)AMP mentioned the AMP was optimized (by -xO4) and dtrace probes were introduced( where in there source tree ?) into apache web server.
http://wcdata.sun.com/webcast/download/podcast/sdn/115a_SDN.mp4
I could have understood it wrong.
> Have a look at some of the articles, and when you
> have some time, the full dynamic tracing guide over
> here:
> http://www.sun.com/bigadmin/content/dtrace/
I havn't get my feet wet on dtrace yet.
> Secondarily, Sun is looking at where trace points
> across the AMP stack make sense. For instance, Bryan
> Cantrill and Wez Furlong added some probe
> capabilities to PHP. Alan Burlison did the same for
> Perl. You can read more about this here:
> http://blogs.sun.com/bmc/entry/dtrace_and_php_demonstr
> ated
> http://blogs.sun.com/alanbur/entry/dtrace_and_perl
>
> The real power in DTrace, however, is not in it's
> ability to observe a particular process.Usually
> those processes have logging or some other monitoring
> facility. Instead, the real power is in being able
> to ask interesting questions that crosscut the
> system. For instance, if you find disk IO is really
> high in one place, which process is that IO
> associated with? How big are the IOs? What does the
> stack of the application look like when performing 4k
> writes? Those are all questions that you can answer
> within seconds with DTrace all while the app is
> running, without being intrusive on the system,
> affecting system stability or restarting the
> application.
>
> What trace providers would make the most sense to
> you?
I do not have idea yet.
>
> There've been some discussions of providers for
> applications on the dtrace-discuss list on
> opensolaris.org.
Thanks, will look at dtrace forum.
tj