httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Kasichainula <>
Subject Re: Dexter Notes
Date Tue, 27 Jul 1999 18:06:13 GMT
On Tue, Jul 27, 1999 at 10:11:05AM -0400, Dave Jones wrote:
> Manoj Kasichainula <> writes:
> >Also, I ran some unscientific tests of dexter vs. mpmt_pthread, with
> >Linux 2.2 on a P2-400 using kernel-only threads. I got similar results
> >(dexter = 1155 cps, mpmt_pthread = 1100 cps). The dexter MPM was
> >slightly faster, even though it's wasting it's time creating and
> >destroying a lot of threads. During an 8.5 second run with ab -c 50 -n
> >10000, dexter created and destroyed almost 200 threads.
> Can you expound on why you interpret these numbers as 'bad'.  With a
> concurrency of 50 you shouldn't you expect at least
> 50+MinSpareThreads threads, meaning ~150 excess creates (once per 65
> requests).

ab -c <n> doesn't ever actually provide n concurrent connections in my
experience. I'll generally see anywhere from 10-50% of the actual
concurrent connections requested, with a bias towards the 10%. And
from checks of pstree during a sample run, I never saw more than 10
threads per child running at a time.

I don't think I can give a solid reason why I think creating and
destroying a lot of threads is bad, other than whatever efficiency
loss occurs as a result.

> How many cps do you figure these needless thread creates
> are costing you?

Hmm, now that I run some testing of the time to create and des, the
time itself doesn't look too bad. I only lost about 30ms in that test.
So you're probably right, and I'm just worried for nothing.

> Could it also be that ab 'sees' the connection close and issues the
> next connect request which arrives at the server before the thread in the 
> server that is closing the old connection actually resumes?  In this case
> your effective concurrency is much higher than 50 so you need more threads
> than you think.

I have seen this happen before, with logging turned on. I've never
seen it with logging off (which is what I'm testing with), and the
pstree outputs I'm seeing would imply that it's not a problem.

Manoj Kasichainula - manojk at io dot com -
"Only reason I can't survive is if I'm dead or something" -- Mike Tyson

View raw message