You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by tim robertson <ti...@email.com> on 2009/08/24 05:58:33 UTC

Apache HTTP Server development

Apache HTTP Server should be Event-driven by default, instead of using
Processes/Threads. Alot of other http web servers are outperforming
Apache because they use Events because this reduces cpu and memory usage.
Events will help Apache server handle lots of concurrent connections
because currently Apache cannot handle 10,000 concurrent connections on a
low end single core server without Apache crashing or running very slow.
I know Apache has a threaded mode but this still uses alot more memory
and CPU and supports less concurrent connections than other web
servers that use an event-driven architecture. If Apache used Events it
will fix this c10k problem for low end servers. Tim

-- 
Be Yourself @ mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com!


Re: Apache HTTP Server development

Posted by Paul Querna <pa...@querna.org>.
On Sun, Aug 23, 2009 at 8:58 PM, tim robertson<ti...@email.com> wrote:
> Apache HTTP Server should be Event-driven by default, instead of using
> Processes/Threads. Alot of other http web servers are outperforming Apache
> because they use Events because this reduces cpu and memory usage. Events
> will help Apache server handle lots of concurrent connections because
> currently Apache cannot handle 10,000 concurrent connections on a low
> end single core server without Apache crashing or running very slow. I know
> Apache has a threaded mode but this still uses alot more memory and CPU and
> supports less concurrent connections than other web servers that use an
> event-driven architecture. If Apache used Events it will fix this c10k
> problem for low end servers.

<http://httpd.apache.org/docs/2.2/mod/event.html>

more work to be done in trunk, patches welcome :)

Thanks

Paul

Re: Apache HTTP Server development

Posted by Graham Leggett <mi...@sharp.fm>.
tim robertson wrote:

> Apache HTTP Server should be Event-driven by default, instead of using
> Processes/Threads. Alot of other http web servers are outperforming
> Apache because they use Events because this reduces cpu and memory
> usage.

Have you tried out the event MPM?

Don't forget, for any site that involves more complex processing than
just bit-shifting, reliability becomes the number 1 concern, not
performance, and that is where prefork remains very strong.

One prefork process dying only effects one single request. One event
driven process dying in an event driven environment kills all requests
handled by that process, which can be a problem far worse than performance.

> Events will help Apache server handle lots of concurrent
> connections because currently Apache cannot handle 10,000 concurrent
> connections on a low end single core server without Apache crashing or
> running very slow.

Are you sure you tuned Apache properly for this?

In the last ten years, both threads and processes have become cheap and
efficient, largely mitigating the C10k problem. If you've run a default
httpd installation with the kitchen sink turned on, don't be surprised
if the machine hits a wall quite early.

Turn off all modules, and then only turn on the ones you need, the
memory foorprint will be significantly smaller.

Regards,
Graham
--

Re: Apache HTTP Server development

Posted by Jeff Trawick <tr...@gmail.com>.
On Mon, Aug 24, 2009 at 4:11 PM, William A. Rowe, Jr.
<wr...@rowe-clan.net>wrote:

> Ruediger Pluem wrote:
> >
> > On 08/24/2009 09:13 PM, Jorge Schrauwen wrote:
> >> Speaking of fastCGI, wasn't a fastCGI module donated to the incubator?
> >>
> >> Maybe it's time to look more into it if people aren't already.
> >>
> >> ~Jorge
> >
> > Besides the existing proxy module in trunk, the donation of mod_fcgid
> > is already there:
> >
> > http://svn.apache.org/viewvc/httpd/mod_fcgid/
>
> It appears folks neglected to update the site, for example;
>
> http://httpd.apache.org/modules/
> http://httpd.apache.org/download.html
>
> I'm prepared to do so over the next few days with a 2.3.1 release
> candidate,


great; I was thinking about that a few hours ago -- high time to put out an
*ASF* release of that beast, even though there aren't a great number of
fixes since 2.2



> after resolving the envvar flaws.
>
> Bill
>

Re: Apache HTTP Server development

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Ruediger Pluem wrote:
> 
> On 08/24/2009 09:13 PM, Jorge Schrauwen wrote:
>> Speaking of fastCGI, wasn't a fastCGI module donated to the incubator?
>>
>> Maybe it's time to look more into it if people aren't already.
>>
>> ~Jorge
> 
> Besides the existing proxy module in trunk, the donation of mod_fcgid
> is already there:
> 
> http://svn.apache.org/viewvc/httpd/mod_fcgid/

It appears folks neglected to update the site, for example;

http://httpd.apache.org/modules/
http://httpd.apache.org/download.html

I'm prepared to do so over the next few days with a 2.3.1 release candidate,
after resolving the envvar flaws.

Bill

Re: Apache HTTP Server development

Posted by Ruediger Pluem <rp...@apache.org>.

On 08/24/2009 09:13 PM, Jorge Schrauwen wrote:
> Speaking of fastCGI, wasn't a fastCGI module donated to the incubator?
> 
> Maybe it's time to look more into it if people aren't already.
> 
> ~Jorge

Besides the existing proxy module in trunk, the donation of mod_fcgid
is already there:

http://svn.apache.org/viewvc/httpd/mod_fcgid/

Regards

Rüdiger


Re: Apache HTTP Server development

Posted by Jorge Schrauwen <jo...@gmail.com>.
Speaking of fastCGI, wasn't a fastCGI module donated to the incubator?

Maybe it's time to look more into it if people aren't already.

~Jorge



On Mon, Aug 24, 2009 at 8:24 PM, Akins, Brian<Br...@turner.com> wrote:
> On 8/24/09 1:58 PM, "Paul Querna" <pa...@querna.org> wrote:
>
>> They then switch to lighttpd, because it is so much faster, mostly
>> because it runs all the dynamic langauges via FastCGI, like we should.
>
> +1
>
> I still like the idea (maybe it was yours, Paul) of running basically
> everything externally using HTTP as the protocol.  Especially, if we
> supported things like basic external process management (like fcgid ) and
> ability to use domain sockets as well as TCP (it may be academic, but there
> can be some nice performance gains).
>
> I still like lua embedded, though. (Or something similar)
>
>
> --
> Brian Akins
> Chief Operations Engineer
> Turner Digital Media Technologies
>
>

Re: Apache HTTP Server development

Posted by "Akins, Brian" <Br...@turner.com>.
On 8/24/09 1:58 PM, "Paul Querna" <pa...@querna.org> wrote:

> They then switch to lighttpd, because it is so much faster, mostly
> because it runs all the dynamic langauges via FastCGI, like we should.

+1

I still like the idea (maybe it was yours, Paul) of running basically
everything externally using HTTP as the protocol.  Especially, if we
supported things like basic external process management (like fcgid ) and
ability to use domain sockets as well as TCP (it may be academic, but there
can be some nice performance gains).

I still like lua embedded, though. (Or something similar)


-- 
Brian Akins
Chief Operations Engineer
Turner Digital Media Technologies


Re: Apache HTTP Server development

Posted by Paul Querna <pa...@querna.org>.
On Mon, Aug 24, 2009 at 8:09 AM, Akins, Brian<Br...@turner.com> wrote:
> Patches welcome.
>
> On 8/23/09 11:58 PM, "tim robertson" <ti...@email.com> wrote:
>
>> . Events will
>> help Apache server handle lots of concurrent connections because currently
>> Apache cannot handle 10,000 concurrent connections on a low end single core
>> server without Apache crashing or running very slow.
>
> FWIW, we very easily handle 50k+ concurrent connections on fairly "modest"
> hardware - 4 total cores, 4-8GB of RAM.  (That's a very affordable server.)
> If you need to handle 10k concurrent clients and only have a single core
> box, you have other issues.

I agree -- but what too many people try to do is run their Apache w/ 5
dynamic language modules loaded on a VM with 256mb of RAM.

They then switch to lighttpd, because it is so much faster, mostly
because it runs all the dynamic langauges via FastCGI, like we should.

We do have a design problem, and yes, I agree completely in the 'real
world' with RAM being so cheap, maybe its a diversion to try to be
competitive in the low end field, but it is definitely a big part of
the perceived problems with Apache 2.x.

-Paul

Re: Apache HTTP Server development

Posted by "Akins, Brian" <Br...@turner.com>.
Patches welcome.

On 8/23/09 11:58 PM, "tim robertson" <ti...@email.com> wrote:

> . Events will 
> help Apache server handle lots of concurrent connections because currently
> Apache cannot handle 10,000 concurrent connections on a low end single core
> server without Apache crashing or running very slow.

FWIW, we very easily handle 50k+ concurrent connections on fairly "modest"
hardware - 4 total cores, 4-8GB of RAM.  (That's a very affordable server.)
If you need to handle 10k concurrent clients and only have a single core
box, you have other issues.



-- 
Brian Akins