Page 1 of 1
Apache 2 Prefork, better than 1.3?
Posted: Fri Jan 11, 2008 10:40 pm
by seodevhead
Hey guys... I am building a new server for a predominantly php/mysql website and don't know whether I should install Apache 2 with the Prefork MPM or just go with Apache 1.3.x.
I've read so many wierd things about PHP and Apache 2 that I'm not sure what to do. What do you guys like to run? What do you suggest?
Re: Apache 2 Prefork, better than 1.3?
Posted: Sat Jan 12, 2008 2:07 am
by RobertGonzalez
I would go ahead with Apache 2. You do not have to install the MPM stuff, and there is only a slight amount of issue between PHP and Apache 2 with MPM, but I think it is only under a few, specific circumstances.
Re: Apache 2 Prefork, better than 1.3?
Posted: Sun Jan 13, 2008 7:54 pm
by Ollie Saunders
...I can elaborate on that. Apache 2's MPMs (multi process modules, I believe) determine the process architecture apache will use. One can be in use at a time. Normally one has to be chosen at build time but if you are a Ubuntu user you will be able to change MPMs as easily as installing packages.
For Apache 2 there's a choice of threaded, prefork and worker. The official recommendation is prefork despite being the lowest because it isn't threaded at all. The risk is that because PHP is designed to be extensible anybody can write a C extension that isn't thread safe. I seems
nobody really knows which ones are and which ones aren't. If you are confident you won't be using thread unsafe extensions you'll want the faster threaded or worker MPMs otherwise stick to prefork. Personally I use prefork.
I believe the speed difference between threaded and preforked MPM is fairly significant. Apache 2.2 offers even more MPMs that I haven't looked into properly.
Re: Apache 2 Prefork, better than 1.3?
Posted: Mon Jan 14, 2008 6:54 am
by seodevhead
Boy, thanks so much for the great replies guys. I went ahead and had it compiled using the prefork MPM.
My server has dual Quad-core Xeons.... I'm not losing any dual quad-core power by using prefork am I? Like, I won't be running php on one single core right?
Re: Apache 2 Prefork, better than 1.3?
Posted: Mon Jan 14, 2008 8:43 am
by Ollie Saunders
I doubt it. That question might be better posed to someone who knows a thing or two about kernels.