You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Grant <em...@gmail.com> on 2006/12/14 17:26:52 UTC

[users@httpd] MPM prefork

Hello, I've started using the MPM prefork with apache2 along with
these settings:

StartServers            5
MinSpareServers         5
MaxSpareServers         20
MaxClients              150
MaxRequestsPerChild     100

I'm happy with the results, but I'm curious about the following quote
taken from the prefork online docs:

"This Multi-Processing Module (MPM) implements a non-threaded,
pre-forking web server that handles requests in a manner similar to
Apache 1.3."

Does this mean apache-1.3 preforked by default?  If so, why was this
behavior changed for apache2?  Why wouldn't I want to run MPM prefork?

- Grant

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] MPM prefork

Posted by Grant <em...@gmail.com>.
> > I use mod_perl and I can't use a threaded perl.  Does that mean I
> > can't use a threaded apache2?
>
> I don't know, but I suspect your analysis is correct.
>
> mod_php also has issues with thread safety that makes MPM in anything
> other than pre-fork problematic.  Actually, PHP core is probably
> fairly safe, but the bulk of the fun stuff is in the extensions, and
> some are thread-safe (they think) and some are not.  So you *might* be
> able to run, but you'd have to do a LOT of testing under load and
> real-life conditions, and you'd still not be very certain that there's
> no thread-safe issue to bite you.
>
> Assuming mod_perl is more or less the "same" in terms of thread-safety
> issues, if Perl isn't threaded, then you probably don't want to risk
> it, unless you can do extensive testing.

I think I'd rather prefork and load up on memory.

- Grant

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] MPM prefork

Posted by Richard Lynch <ce...@l-i-e.com>.
On Thu, December 14, 2006 11:09 am, Grant wrote:
> I use mod_perl and I can't use a threaded perl.  Does that mean I
> can't use a threaded apache2?

I don't know, but I suspect your analysis is correct.

mod_php also has issues with thread safety that makes MPM in anything
other than pre-fork problematic.  Actually, PHP core is probably
fairly safe, but the bulk of the fun stuff is in the extensions, and
some are thread-safe (they think) and some are not.  So you *might* be
able to run, but you'd have to do a LOT of testing under load and
real-life conditions, and you'd still not be very certain that there's
no thread-safe issue to bite you.

Assuming mod_perl is more or less the "same" in terms of thread-safety
issues, if Perl isn't threaded, then you probably don't want to risk
it, unless you can do extensive testing.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] MPM prefork

Posted by Grant <em...@gmail.com>.
> > Does this mean apache-1.3 preforked by default?  If so, why was this
> > behavior changed for apache2?  Why wouldn't I want to run MPM prefork?
>
> Yes, 1.3 is a pre-forking webserver.  For a description of why you
> might want to change this, see
> http://httpd.apache.org/docs/2.2/mpm.html and the docs for some of the
> other mpms like worker and event.  In particular, a multi-threaded
> server can sometimes use substantially less memory.
>
> Joshua.

I see, so prefork is used if another mpm is not specified.  I guess
Gentoo builds mpm-prefork even if USE="-mpm-prefork" is specified
(assuming another mpm is not specified).

I use mod_perl and I can't use a threaded perl.  Does that mean I
can't use a threaded apache2?

- Grant

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] MPM prefork

Posted by Joshua Slive <jo...@slive.ca>.
On 12/14/06, Grant <em...@gmail.com> wrote:

> Does this mean apache-1.3 preforked by default?  If so, why was this
> behavior changed for apache2?  Why wouldn't I want to run MPM prefork?

Yes, 1.3 is a pre-forking webserver.  For a description of why you
might want to change this, see
http://httpd.apache.org/docs/2.2/mpm.html and the docs for some of the
other mpms like worker and event.  In particular, a multi-threaded
server can sometimes use substantially less memory.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org