Just a couple last notes on lingering: 

o Apache 2+ uses SO_LINGER by default if it defined for that system.
Apache 1 will only use it if you define USE_SO_LINGER (I suppose in
configure). Apache2 has all sorts of stuff in the comments of the code
and in the manual which is just wrong. Its all from Apache1 and does
not reflect on Apache2's implementation. I wish they just erased it
instead.

o As far as I can tell, current Linux will block until all data is
sent, then return (doing the actual closing part in the background)
with SO_LINGER.

o Lingerd caused my apache setup to crash. It was worth a try if it
didn't take much effort, but not worth fixing.

> If you turn the concept of lingerd upside down and bounce
> socket descriptors back and forth between it and Apache between
> keepalive requests you can free up Apache from any sort of sitting
> around waiting on socket timeouts or linger outs.  The last thing you
> want is a heavy single-threaded process like Apache sitting around
> waiting on some socket event.  It should be crunching out pages as fast
> as possible not waiting on a keepalive or SO_LINGER timeout.

This actually sounds like an argument for NOT using mod_php. It sounds
like an argument for using Apache2 or lighttpd or xyz in conjection
with FastCGI. (Or a proxy arangement, which I've done, though in my
personal case, I like to get the same scaling with less machines since
I have to buy the machines). In that case, the webserver can be made
lightweight (not sure how lightweight Apache2 can be, but who knows?)
handling many open connections. Then there is a (much) smaller number
of heavy PHP processes in FastCGI.

I'm going to put a test together next week and have Apache1/mod_php,
Apache2/worker (not event)/FastCGI, and lighttpd/FastCGI run head to
head and see what happens. Maybe I'll even try with KeepAlive too
(though not with Apache1/mod_php since I already know that won't
work). I'll post my results back here if anyone is interested.

Andreas -- can you email me off list? I wouldn't mind some help
setting up lighttpd/FastCGI. Thanks!

-steve--

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to