Hi all, I am using dtrace to know the following for an application. 1)call flow 2)Number of times function is being called 3)MAX, MIN, AVG elapsed time My application does UDP send activity. Earlier it was giving variable drops. Hence, I increased the buffer size. Now it works fine but after increasing buffer for dtrace my application is taking too much time for completion. Thanks, Ajit -- This message posted from opensolaris.org
On Mon, Nov 19, 2007 at 07:43:15PM -0800, Ajit Bansode wrote:> Earlier it was giving variable drops. Hence, I increased the buffer size. > Now it works fine but after increasing buffer for dtrace my application is taking too much time for completion.Using DTrace will slow down your application -- by how much depends on exactly what your application is doing and how you''re using DTrace. If you send the script you''re using we may be able to help. Adam -- Adam Leventhal, FishWorks http://blogs.sun.com/ahl
Hi Adam, here is my script: #!/usr/sbin/dtrace -Zs #pragma D option quiet #pragma D option bufsize=20m dvm$1:::method-entry /dirname(copyinstr(arg0)) == "com/appsend"/ { self->func_name = strjoin(strjoin(basename(copyinstr(arg0)),"."),copyinstr(arg1)); /*@funct_count[strjoin(strjoin(basename(copyinstr(arg0)),"."),copyinstr(arg1))] = count();*/ this->fdepth = ++fdepth[strjoin(strjoin(basename(copyinstr(arg0)),"."),copyinstr(arg1))]; printf("-> %s\n", self->func_name); self->ts[self->func_name,this->fdepth] = vtimestamp; } dvm$1:::method-return /self->ts[strjoin(strjoin(basename(copyinstr(arg0)),"."),copyinstr(arg1)),this->fdepth]/ { @funct_count[self->func_name] = count(); printf("<- %s\n", self->func_name); self->ts[self->func_name,this->fdepth] = 0; } END { printf("\n%-30s %20s\n", "Function Name", "COUNT"); printa("%-30s %20 at d\n", at funct_count); } Thanks for your reply, Ajit -- This message posted from opensolaris.org
The dvm provider can be quite intrusive. You might try upgrading to the 1.6 JVM which has native support for the hotspot provider. That said, it''s still quite expensive. Adam On Wed, Nov 21, 2007 at 08:16:59PM -0800, Ajit Bansode wrote:> Hi Adam, > here is my script: > > #!/usr/sbin/dtrace -Zs > #pragma D option quiet > #pragma D option bufsize=20m > dvm$1:::method-entry > /dirname(copyinstr(arg0)) == "com/appsend"/ > { > self->func_name = strjoin(strjoin(basename(copyinstr(arg0)),"."),copyinstr(arg1)); > /*@funct_count[strjoin(strjoin(basename(copyinstr(arg0)),"."),copyinstr(arg1))] = count();*/ > this->fdepth = ++fdepth[strjoin(strjoin(basename(copyinstr(arg0)),"."),copyinstr(arg1))]; > printf("-> %s\n", self->func_name); > self->ts[self->func_name,this->fdepth] = vtimestamp; > } > > dvm$1:::method-return > /self->ts[strjoin(strjoin(basename(copyinstr(arg0)),"."),copyinstr(arg1)),this->fdepth]/ > { > @funct_count[self->func_name] = count(); > printf("<- %s\n", self->func_name); > self->ts[self->func_name,this->fdepth] = 0; > } > > END > { > printf("\n%-30s %20s\n", "Function Name", "COUNT"); > printa("%-30s %20 at d\n", at funct_count); > } > > > Thanks for your reply, > Ajit > > > -- > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, FishWorks http://blogs.sun.com/ahl
On Nov 25, 2007 4:42 PM, Adam Leventhal <ahl at eng.sun.com> wrote:> The dvm provider can be quite intrusive. You might try upgrading to the > 1.6 JVM which has native support for the hotspot provider. That said, it''s > still quite expensive.Are there any efforts ongoing to decrease the probe effect ? We have attempted to use the hotspot provider in production in the past, but the overhead has proven to be a bit too much. On some of out mildly busy applicaiton servers we saw the CPU load jump from 10% utilization to 100% utilization when we enabled the DTraceMethodProbes probes. We would _LOVE_ be able to use the hotspot provider in production, but the runtime overhead currently prevents us from doing so. Thanks, - Ryan -- UNIX Administrator http://prefetch.net
Matty wrote:> On Nov 25, 2007 4:42 PM, Adam Leventhal <ahl at eng.sun.com> wrote: > >> The dvm provider can be quite intrusive. You might try upgrading to the >> 1.6 JVM which has native support for the hotspot provider. That said, it''s >> still quite expensive. >> > > Are there any efforts ongoing to decrease the probe effect ? We have > attempted to > use the hotspot provider in production in the past, but the overhead has proven > to be a bit too much. On some of out mildly busy applicaiton servers we saw > the CPU load jump from 10% utilization to 100% utilization when we enabled > the DTraceMethodProbes probes. We would _LOVE_ be able to use the > hotspot provider in production, but the runtime overhead currently prevents > us from doing so. >We have some initial plans for doing something more intelligent than turning on all of the methods all of the time, and turning them on dynamically as needed, but we''re limited by our available resources. If you (or anyone on this list) would be interested in helping us out in the effort, please speak up! -- - Keith