Re: Apache 2 on FreeBSD 5.3

From: Sten Spans (sten_at_blinkenlights.nl)
Date: 02/04/05

  • Next message: Steven Hartland: "Re: Apache 2 on FreeBSD 5.3"
    Date: Fri, 4 Feb 2005 15:13:44 +0100 (CET)
    To: Claus Guttesen <cguttesen@yahoo.dk>
    
    

    On Fri, 4 Feb 2005, Claus Guttesen 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. 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?
    >
    > It is not recommend to use apache 2 with PHP. That's
    > at least what the folks at php says. We use 1.3 and
    > are satisfied with the performance.

    This could use some clarification.
    Some of the mpm's for apache are threaded ( worker, perchild, etc ).
    These require every apache module to be threadsafe. PHP itself
    is threadsafe but quite a few of the libraries php links to aren't.

    This is why the php folks have chosen a for the safe
    advice of apache13. They in general don't see the advantages
    of apache2. Which for most simple unix mod_php installs arent that
    apparent.

    >
    > Have you tried to set the following in
    > /usr/local/etc/apache/httpd.conf?
    >
    > KeepAlive Off
    > MaxClients (size of one process) / (avail. RAM)

    Buffered logs should help a bit too, apache tuning
    is quite a large topic, with some resource limiting and
    security choises thrown in as well.

    I run apache with php as cgi on some boxen for security reasons,
    and will migrate to apache2 because of the improved errorlog handling
    ( try print stderr "\n\n\n"; in a cgi to see the difference ).

    For a better answer to your questions a more detailed explanation
    of what you are testing will be needed.

    - What are you testing ( php ? static html ? is nfs involved ? )
    - How are you testing ( ab, httperf ? from where ? )
    - Which configuration choises ( childs, modules, memory usage, dns settings )
    - etc.

    -- 
    Sten Spans
    "There is a crack in everything, that's how the light gets in."
    Leonard Cohen - Anthem
    _______________________________________________
    freebsd-performance@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-performance
    To unsubscribe, send any mail to "freebsd-performance-unsubscribe@freebsd.org"
    

  • Next message: Steven Hartland: "Re: Apache 2 on FreeBSD 5.3"

    Relevant Pages

    • Re: [: -le: argument expected
      ... is getting php5 to build the apache module. ... PHP anywhere. ... it is important to use the prefork MPM. ...
      (freebsd-stable)
    • Re: [: -le: argument expected
      ... is getting php5 to build the apache module. ... PHP anywhere. ... it is important to use the prefork MPM. ...
      (freebsd-stable)
    • Help with php5 install under windows
      ... This includes moving php from the ... Enable the PHP scripting language engine under Apache. ... or per-virtualhost web server configuration file. ... The PHP directives register_globals, ...
      (php.general)
    • Re: [: -le: argument expected
      ... I chose to look at the possibility of using Apache ... Regardless of the errors you reported, I believe changing the MPM is a problem. ... I would argue that I am not seeing php5 using anthing regarding my ... That said, with problems like this, I just reckon that it's best to start simple i.e. setup apache in the known good way and then get php working. ...
      (freebsd-stable)
    • RE: Virtual hosts and PHP "downloads": php5 and apache22 on FreeBSD6.1-STABLE
      ... Apache web server. ... Subject: Virtual hosts and PHP "downloads": php5 and apache22 on ...
      (freebsd-questions)