httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Kasichainula <man...@io.com>
Subject Re: some questions about threaded apache
Date Mon, 21 Jun 1999 04:55:17 GMT
On Sun, Jun 20, 1999 at 09:00:50PM -0700, Tani Hosokawa wrote:
> Now, I assumed that MinSpareServers would be the number of processes, each
> with a variable number of threads.

Nope. The server in the apache-apr directory has a variable number of
processes and a fixed number of threads right now.

> So 1 and 2 would seem to be reasonable.

I would think so.

> However, when I use those values I get (according to
> server-status) 0 idle servers, and I do see a noticeably slower connection
> (although once connected I'm quick, presumably because I'm reusing my
> connection).

That's weird. My very hasty tests don't show this problem. Which
modules do you have loaded? How much slower a connection are we
talking about here?

How many concurrent connections is your server running at? Most of our
testing before was with ApacheBench, and the number of concurrent
connections went up to around 100 (though ThreadsPerChild was low
too). So I'm guessing you've been the best tester so far.

> When I increased those values to 20/40, it never kills any
> threads, so I always have a total of 1454 threads (I chose those numbers
> because I've limited NR_TASKS to 1500 per user).

Hmmm, there are actually more than 64 threads in a 64-thread server.
There's the sigwait thread and the Linuxthreads monitor thread. So you
might hit NR_TASKS.

I'm curious if mod_status is lying or not. Do ps and pstree agree with
what mod_status is telling you?

Also, I did notice one problem a while back when I tried to bang hard
on the the hybrid server with default user settings in Red Hat (256
processes).  When we hit that limit, the server hung in
pthread_create. My guess is that the main thread sends a message to
the monitor thread, which then chokes on the clone() call, and doesn't
wake up the main thread. Hijinks then ensue.

> As an aside, threaded Apache seems to handle load MUCH better than normal
> Apache... 1.3.6 showing a consistent load of about 6-9 only has a load of
> 1.2 on threaded apache :)

Cool. That was the intention. I was worried that the benefit of
threading wouldn't be as great on Linux because processes and threads
are so similar.

-- 
Manoj Kasichainula - manojk at io dot com - http://www.io.com/~manojk/
"Firewalls don't know the difference between a virus, a Trojan Horse, or
Windows NT." -- An advertising brochure from DataLynx, Inc. ("SECURITY THROUGH
STRENGTH")

Mime
View raw message