The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Apache and easy build options for better php performance

Discussion in 'Workarounds and Optimization' started by ASTRAPI, Apr 25, 2011.

  1. ASTRAPI

    ASTRAPI Well-Known Member

    Joined:
    Jul 8, 2008
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
    Hello

    I want to ask what do you recommend me to check on easy apache build to get the best php performance possible?

    The server is dedicated and very powerfull and it has only one account in it.

    I am using cpanel and Centos.

    Is it better to use DSO or Fcgi ?

    At the moment i have check for build the:

    Asis
    Cache
    Disk cache
    Env
    Expires
    Mod fcgid
    File cache
    File protect
    Headers
    Mpm prefork
    proxy
    version
    Bcmath
    CGI
    Curl
    Ftp
    GD
    Iconv
    Imap
    Magic Quotes
    Mbregex
    Mysql
    Mysql of the system
    POSIX
    Path Info Check
    Pear
    Sockets
    TTF
    Zip
    Zlib


    So what do you think i must add or remove to get the maximum performance for php from Apache and php?

    Some users recommend me to use mod_php and some fast cgi and i don't know what are those and which is better and how to get them run using the easy apache build :(

    Please help me.

    Thank you
     
  2. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hello,

    I will go for suphp only. It is good in security too. If you ask me to choose in b/w DSO & FCGI, I will go for FCGI. Please go through the below given URL for more understanding of the handlers.

    DSO vs. CGI vs. suPHP vs. FastCGI | BoomShadow.net
     
  3. ASTRAPI

    ASTRAPI Well-Known Member

    Joined:
    Jul 8, 2008
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
    Litespeed performance test shows mod_php (DSO) as the faster option....
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Since you are only asking about performance and not security, then DSO would be the preferred choice in that model. I would not recommend DSO for security reasons as has already been stated. If you select FCGI to have better performance over suPHP but better security than DSO, you would want to be aware that you'll have to tweak settings for FCGI to get it to perform more optimally, since the default configuration is only a baseline, generalize setup.
     
  5. ASTRAPI

    ASTRAPI Well-Known Member

    Joined:
    Jul 8, 2008
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
    Any tips on which file i must edit and tweak?

    What do you recommend me to start adjusting on my server:

    2x Intel Xeon Quad 5405
    24gb ram -->8gb free


    Thank you
     
  6. Gene Steinberg

    Gene Steinberg Well-Known Member

    Joined:
    May 26, 2007
    Messages:
    157
    Likes Received:
    1
    Trophy Points:
    18
    And for a 2x Intel Xeon Quad 5520
    16GB RAM

    Peace,
    Gene
     
  7. Massoud

    Massoud Active Member

    Joined:
    Feb 20, 2011
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    I always heard that when I want to choice FCGI I should tune the setting but there is not certain guide to do this, Could you please anyone help me to tune my WS wit FCGI Handler for getting best performance, I get Error 500 on traffic peak and I need to know where and how can I tune my FCGI Setting. Thank you
     
  8. lastguru

    lastguru Member

    Joined:
    Jul 29, 2010
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    There is indeed a huge lack of leads on how to do this with FCGI. Everybody is saying "tune the settings", but nobody gives a set of links which explain the config.

    As for Error 500, you probably do not have enough processes. Here is my config, which may not be optimal, but still is a good starting point:

    Code:
    <IfModule mod_fcgid.c>
    MaxRequestsPerProcess 500
    MaxProcessCount 64
    DefaultMaxClassProcessCount 16
    DefaultMinClassProcessCount 0
    IPCConnectTimeout 90
    IPCCommTimeout 90
    IdleTimeout 300
    IdleScanInterval 30
    BusyTimeout 90
    BusyScanInterval 30
    ErrorScanInterval 3
    ZombieScanInterval 3
    ProcessLifeTime 3600
    </IfModule>
    
     
  9. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Unfortunately, I cannot provide recommendations for tuning the settings at this time. I only indicated we at cPanel include baseline general settings (in /usr/local/apache/conf/php.conf file for information on where they are included).

    Now, the reason I cannot provide recommendations is that I do not have an overly active machine running FCGI. While I do have a machine running FCGI, given that it isn't active, any recommendations I provide wouldn't be overly valid compared to others here who likewise run FCGI and have active servers. Additionally, I would be very wary of taking advice from anyone on what settings to use unless that machine has some decent activity, since the main point of using FCGI is that it is for a machine that cannot perform optimally under suPHP due to load issues from high PHP site activity and for a machine that requires more security than DSO.
     
  10. boonjackmedia

    boonjackmedia Active Member

    Joined:
    Apr 28, 2010
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Cincinnati, OH USA
    I don't believe Easy Apache supports the latest version 2.36 for mod_fcgid, the settings lastguru posted are for version 2.35 will work fine.

    The new version has updated naming conventions for the settings. I believe a lot of the issues with spawning and rebooting have been addressed too.
    mod_fcgid - FastCGI interface module for Apache 2 - The Apache HTTP Server Project

    Any idea when Easy Apache will use mod_fcgid 2.36?
     
  11. ASTRAPI

    ASTRAPI Well-Known Member

    Joined:
    Jul 8, 2008
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
    Ok so for my centos 64bit with cpanel i must edit this:

    /usr/local/apache/conf/php.conf

    ?
     
  12. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    If you want to revise the FCGI settings, the file that handles those settings would be /usr/local/apache/conf/php.conf file correct. If you run WHM > EasyApache (Apache Update) and revise the handler at any time at the end of the build, you are going to have to also run /scripts/posteasyapache to re-create your settings in that file since it will be overwritten whenever the PHP handler is changed in any way.
     
Loading...

Share This Page