Apache 2 on FreeBSD 5.3

Clement Laforet sheepkiller at cultdeadsheep.org
Fri Feb 4 06:41:16 PST 2005

On Fri, Feb 04, 2005 at 10:56:21AM +0100, Vladimir Vrzic wrote:
> On a FreeBSD 5.3 web server with a very high load, I recently switched
> from Apache 1.3 and PHP 4.3 to using 2.0 with the prefork MPM and PHP 5.
> I noticed a drop in perfomance.
Did you find the bottleneck?

> What is currently the best (in terms of
> performance) choice for Apache w/ PHP on FreeBSD? Which MPM should I
> use? Does worker MPM use KSE on FreeBSD 5 and does it perform better
> than prefork? What about perchild and threadpool? Or maybe I should go
> back to Apache 1.3? Are there any sysctl or kernel tunings that I should
> use?

- Notes on MPM's: Currently, you can expect good performance with 
  prefork and worker. perchild is b0rked and threadpool is 
- Using apache2 with PHP is *safe* with prefork.
- worker MPM use KSE and performs well, with a custom apache2 (see 
  options for apache2 port), in some cases, worker MPM outperforms 
  prefork one.
- If you use apache2 in ports tree, you can try apr_poll() patch which 
  supports kqueue, define WITH_EXPERIMENTAL_PATCHES. 
  It's pretty stable and improves significantly apache reponsivness.


More information about the freebsd-performance mailing list