On Thu, May 01, 2008 at 01:55:40AM -0700, Mika Borner wrote:
> Hi
> 
> We are hosting a ruby on rails application for a customer. We first run the 
> application on a T2000 and single thread performance sucked. 
> 
> Because of tight schedules we moved the app to an X2100, and performance 
> seems ok so far.
> 
> Anyway, I'm trying to find out where the bottleneck is, and run a dtrace to 
> count the system calls for the mongrel process.
> 
> It seems there are a lot of setcontext/nanosleep syscalls when issuing an 
> http request. Can anybody explain me shortly, what these system calls do? I 
> tried to google them up, but couldn't find an explanation that I'mable to 
> understand :-)
> 
> dtrace -n 'syscall:::entry/execname == "mongrel_rails"/ { @[probefunc] = 
> count() }'
> dtrace: description 'syscall:::entry' matched 233 probes
> ^C
> 

Change your program to something like:

syscall::setcontext:entry
/execname == "mongrel_rails"/
{
        @[ustack()] = count();
}

and let's see what is causing that.  The likely causes are either
that it's raining signals, or mongrel is co-routine crazy.
Either way setcontext() is quite an expensive thing to do
and this will likely lead to something useful to optimize.

-Mike

-- 
Mike Shapiro, Sun Microsystems Fishworks. blogs.sun.com/mws/
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to