Results 1 to 14 of 14
  1. #1
    Join Date
    Oct 2004
    Posts
    627

    Hoe to boost performance under suPHP?

    as known that eaccelerator is not working with suPHP, any other method to boost suPHP environment? heard about fastcgi, is it easy to work with cpanel? prefer not to try litehttpd or nnigx that need a lot of manual work...

  2. #2
    Join Date
    Feb 2008
    Location
    Houston, Texas, USA
    Posts
    2,955
    Memcached might help depending on how it's used at the script level. You could also run Varnish (http://www.varnish-cache.org) as it caches the whole page and is more effective than opcode caching.

    Regards
    Joe / UNIXY
    UNIXy - Fully Managed Servers and Clusters - Established in 2006
    [ cPanel Varnish Nginx Plugin ] - Enhance LiteSpeed and Apache Performance
    www.unixy.net - Los Angeles | Houston | Atlanta | Rotterdam
    Love to help pro bono (time permitting). joe > unixy.net

  3. #3
    Join Date
    May 2001
    Location
    HK
    Posts
    3,076

    *

    Quote Originally Posted by Peter-SZ View Post
    heard about fastcgi, is it easy to work with cpanel?
    performance is much much more better

  4. #4
    Join Date
    Nov 2004
    Location
    Australia
    Posts
    1,683
    There are several ways to run suphp equivalents that don't have the performance downside of suphp; check out fastcgi (which you mentioned) and I think also MPM worker.

    Considerably faster if your machine is under stress.

    Also, some people are using nginx as a frontend accelerator, that may also help.

  5. #5
    Join Date
    Apr 2009
    Location
    Venice, Italy
    Posts
    208
    I'd also suggest Varnish. We use the cPanel version offered by Unixy on some servers and it does its job efficiently

  6. #6
    Join Date
    Mar 2011
    Posts
    30
    To boost your PHP performance, the best results come from editing your code to be more efficient. Configuration changes can only do so much.

    I'm not too familiar with suPHP, but you may want to look into xcache and see if it works with it. Also, if your server has multiple CPUs, xcache has a option to spread the caching/load across them, which works great.

    Also, like UNIXy said, memcache is just awesome. I use it to tack my users' downloads and it performance lightning fast. This way I avoid having to use my disks to store temporary data.

    Finally, you do not have to switch to lighttpd or nginx to boost your PHP performance. My studies have shown that apache will indeed load dynamic content faster than nginx and lighttpd. This is because there is no delay like there is with nginx/lighttpd when it proxies (forwards) the dynamic request to the application server and then another (small) delay to report back the results. Be sure to disable all unnecessary mods in Apache, and host your static content on nginx/lighttpd servers (or another port). Be sure to enable gzip/deflate as that will help too.

    Other than that, you'll most likely need to optimize your code to be more efficient as I've always seen the greatest boost in performance through clever coding tricks, ESPECIALLY for queries.

  7. #7
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    8,909
    If you have the memory available, switch to FastCGI. It pretty much acts like suPHP minus the horrible bloat and terrible performance. Security wise, they are both pretty much on par... unless you're short on memory, I can't see any reason for someone to use suPHP at this point.
    Patrick William | RACK911 Labs | Software Security Auditing
    400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com

    www.HostingSecList.com - Security notices for the hosting community.

  8. #8
    Join Date
    Jan 2004
    Posts
    593
    Quote Originally Posted by Patrick View Post
    If you have the memory available, switch to FastCGI. It pretty much acts like suPHP minus the horrible bloat and terrible performance. Security wise, they are both pretty much on par... unless you're short on memory, I can't see any reason for someone to use suPHP at this point.
    I agree. If short on memory you can also set fastcgi to remain active for a few seconds (10 - 15) after the last request for that php user before it exits. This helps with ram drastically and it provides the speed benefits that fastcgi offers over the suphp open/close method.

  9. #9
    Join Date
    Apr 2003
    Location
    San Jose, CA.
    Posts
    1,622
    The better solution of course is to get rid of suPHP.
    Completely unnecessary. Better ways to skin the cat.
    FastCGI is one way... tho I personally wouldn't bother unless your application needs to scale past one application server.
    Daved @ Lightwave Networking, LLC.
    AS1426 https:/www.lightwave.net
    Primary Bandwidth: EGIHosting (NLayer, NTT, HE, Cogent)
    Xen PV VPS Hosting

  10. #10
    Join Date
    Apr 2009
    Location
    Romania
    Posts
    472
    By installing http://nginxcp.com/
    Your work is virtually 0
    For LiteSpeed the same thing applies, the configurations are generated automatically, you only need to tweak the config a bit (not needed, works just fine by default).
    PidginHost.com - Managed dedicated servers, cloud servers and software development.

  11. #11
    Join Date
    Oct 2004
    Posts
    627
    Quote Originally Posted by speckl View Post
    I agree. If short on memory you can also set fastcgi to remain active for a few seconds (10 - 15) after the last request for that php user before it exits. This helps with ram drastically and it provides the speed benefits that fastcgi offers over the suphp open/close method.
    I am now looking at FASCGI too, but where to configure this?

  12. #12
    Join Date
    Oct 2004
    Posts
    627
    does FASTCGI need all 777 to be 755?

    does .htaccess will work ? or clients need to put php.ini under EVERY folders? or just put one php.ini under public_html ?

    does FASTCGI work with eaccelerator?

  13. #13
    Join Date
    Oct 2004
    Posts
    627
    anyone ? please

  14. #14
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    8,909
    Quote Originally Posted by PeterPP View Post
    does FASTCGI need all 777 to be 755?
    FastCGI should be working under 755. It's a bad idea to use 777 anyway from a security standpoint since anyone on the server could in theory modify those files as they are world writable.

    Quote Originally Posted by PeterPP View Post
    does .htaccess will work ? or clients need to put php.ini under EVERY folders? or just put one php.ini under public_html ?
    Yes, .htaccess files will work, however php.ini will have to be put under /cgi-bin/ if you're using cPanel.

    1. Put the php.ini under the /cgi-bin/ directory.

    2. Create a file called php.fcgi under the /cgi-bin/ directory and add the following:

    #!/bin/sh
    export PHP_FCGI_CHILDREN=1
    export PHP_FCGI_MAX_REQUESTS=10
    exec /usr/local/cpanel/cgi-sys/php5

    3) chmod 755 php.fcgi

    4) Edit /public_html/.htaccess and add the following:

    AddHandler php5-fastcgi .php
    Action php5-fastcgi /cgi-bin/php.fcgi


    Quote Originally Posted by PeterPP View Post
    does FASTCGI work with eaccelerator?
    Yes. Make sure you add eAccelerator after Zend and that you comment out the Optimizer extensions. For example your php.ini should look something like:


    [Zend]
    ;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.0
    ;zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.0
    zend_optimizer.version=3.3.0
    zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
    zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

    zend_extension="/usr/local/lib/php/20090626/eaccelerator.so"
    eaccelerator.shm_size="32"
    eaccelerator.cache_dir="/tmp/eaccelerator"
    eaccelerator.enable="1"
    eaccelerator.optimizer="1"
    eaccelerator.check_mtime="1"
    eaccelerator.debug="0"
    eaccelerator.filter=""
    eaccelerator.shm_max="0"
    eaccelerator.shm_ttl="0"
    eaccelerator.shm_prune_period="0"
    eaccelerator.shm_only="0"
    eaccelerator.compress="1"
    Patrick William | RACK911 Labs | Software Security Auditing
    400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com

    www.HostingSecList.com - Security notices for the hosting community.

Similar Threads

  1. Google AdWords Ad Extensions Capture Searchers Attention & Boost Performance
    By SearchMarketingStandard in forum SEO / SEM Discussions
    Replies: 2
    Last Post: 03-10-2011, 08:58 AM
  2. Performance of mod_php + Security of SuPHP = What?
    By WireNine in forum Hosting Security and Technology
    Replies: 8
    Last Post: 01-13-2009, 05:18 PM
  3. Replies: 3
    Last Post: 10-03-2007, 04:07 PM
  4. mysql delayed writes performance boost, worth the risk?
    By aww in forum Hosting Security and Technology
    Replies: 4
    Last Post: 07-20-2007, 04:25 PM
  5. Hoe to get custom dns name
    By sakib000 in forum Web Hosting
    Replies: 3
    Last Post: 05-31-2007, 03:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •