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.

suPHP

Discussion in 'General Discussion' started by Solokron, Mar 23, 2009.

  1. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    Are there any ways to speed up suPHP processing besides the obvious hardware upgrades?

    Does FastCGI or mod_perl have any impact?
     
  2. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    Another question would be if suPHP is enabled, is there a need for suexec to be enabled?
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    SuExec is for all CGI scripts (such as those coded in Perl or Python).

    SuPHP is only for PHP scripts not running as CGI (e.g. running as DSO, SuPHP).

    Enabling SuPHP alone will not affect CGI Perl scripts running on your server.
     
  4. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    That is what I thought.

    Anything out there to speed up suPHP? eAccellerator work yet? FastCGI, etc?

     
  5. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    Anyone at all?
     
  6. Gene Steinberg

    Gene Steinberg Well-Known Member

    Joined:
    May 26, 2007
    Messages:
    157
    Likes Received:
    1
    Trophy Points:
    18
    That's the reason I don't use eAccelerator although, with my server, it has at best a very modest advantage.

    Peace,
    Gene
     
  7. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    Are there any improvements possible to speed up suPHP?
     
  8. Gene Steinberg

    Gene Steinberg Well-Known Member

    Joined:
    May 26, 2007
    Messages:
    157
    Likes Received:
    1
    Trophy Points:
    18
    I'm not suffering from a speed hit on my own sites (check www.theparacast.com to see).

    But faster is always better. :)

    Peace,
    Gene
     
  9. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    You do when you have a lot of accounts. In a shared environment I prefer suPHP. You stick the same setup on a system where Apache is running DSO with suHosin and eAccellerator and you see a tremendous difference in speed. I understand suPHP is much slower but I would like to improve it just a little better in performance. A caching system, tweaks whatever but it appears there is very little information out there on this.


     
  10. Gene Steinberg

    Gene Steinberg Well-Known Member

    Joined:
    May 26, 2007
    Messages:
    157
    Likes Received:
    1
    Trophy Points:
    18
    My server only contains my own sites (six so far). Lots of traffic and page views, but I suppose that makes for an easier load. I didn't see a huge improvement with DSO and eAccelerator, but it was a bit better. I killed it, because I didn't appreciate all the permissions headaches that were added in that environment.

    If there was even a slight improvement with eAccelerator and suPHP, I'd consider it as a test.
     
    #10 Gene Steinberg, Mar 26, 2009
    Last edited: Mar 26, 2009
  11. Voltar

    Voltar Well-Known Member

    Joined:
    Apr 30, 2007
    Messages:
    269
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Bakersfield, California
    I'm fairly certain that eAccelerator, APC, and XCache all have to be ran in a persistent environment (dso, fastcgi) to have any effect at caching.

    The worst part of suPHP is the overhead you incur whilst creating a new process for each execution. You might look into using FastCGI, it takes a little bit of work since cPanel uses a very basic and insecure configuration, but the benefits are worth it in the end.
     
  12. Gene Steinberg

    Gene Steinberg Well-Known Member

    Joined:
    May 26, 2007
    Messages:
    157
    Likes Received:
    1
    Trophy Points:
    18
    How about suggesting an Easy Apache configuration that might be suitable?

    I'm not the most knowledgeable bout such things. But I know enough to stay out of trouble -- most of the time. :D

    Peace,
    Gene
     
  13. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    I am a bit confused. I do see a lot of threads of using suPHP and FastCGI together. This does not appear possible with easyApache. You can install both but when you select the mode in which PHP runs, you have DSO, FastCGI and suPHP all as separate options. When suPHP is selected there is no reference to FastCGI or fcgi in the Apache conf files.

    The more I read the more it looks there are a lot of confused people out there and FastCGI is to be used completely separate from suPHP. With some tweaks it provides the security of suPHP but is a bit faster.
     
    #13 Solokron, Mar 27, 2009
    Last edited: Mar 27, 2009
  14. Gene Steinberg

    Gene Steinberg Well-Known Member

    Joined:
    May 26, 2007
    Messages:
    157
    Likes Received:
    1
    Trophy Points:
    18
    I agree. Should we be choosing FastCGI instead of suPHP, and would that give us the option of moving to eAccelerator within a "persistent environment"?

    Also, would choosing fcgi return all those permissions issues I solved when going to suPHP?

    Advise, counsel, and general information appreciated.

    Peace,
    Gene
     
  15. Gene Steinberg

    Gene Steinberg Well-Known Member

    Joined:
    May 26, 2007
    Messages:
    157
    Likes Received:
    1
    Trophy Points:
    18
    I wanted to add one more thing. Despite checking suPHP I do see FastCGI is enabled, per the phpinfo listing from my server:

    Server API CGI/FastCGI

    So, we go back to the other issues, for which I would appreciate some answers.

    Peace,
    Gene
     
  16. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    SuPHP and FastCGI are not even remotely the same thing and no
    security or other configuration tweaks are going to give you the
    security of SuPHP verses operating a plain CGI PHP under FastCGI
    without using SuPHP.

    The advantages of having SuPHP verses anything else whether it
    be apache module based, regular cgi, FastCGI, with or without
    phpsuexec and so on is just too overwhelming to list all of the
    advantages and benefits you gain just by using SuPHP!

    Now regarding the original thread poster's question more ....

    Talking about performance of SuPHP, I am not entirely sure where exactly
    the question is stemming from because I have been running SuPHP on many,
    many servers all the way back since it was originally created a number of years ago
    and I have not really run into any serious performance impairments even
    on the most heavily loaded servers. The worst of which probably had
    1100 cpanel server accounts with 65% of those moderate to heavy
    traffic sites and really didn't notice all that much impact from SuPHP
    which is generally only slightly slower than direct module based PHP
    and often much faster than direct CGI without SuPHP ironically.

    If you are running into performance issues, the cause may be more that
    of a configuration issue or some other underlying process going on
    totally separate from your SuPHP. There are things that can be done
    to tweak and optimize your SuPHP configuration but I'd be willing to bet
    you have something else going on under there if you are actually seeing
    a humanly noticable degradation in your server performance.

    I'd be willing to give you a hand and take a look if you like.
     
    #16 Spiral, Mar 30, 2009
    Last edited: Mar 30, 2009
  17. Gene Steinberg

    Gene Steinberg Well-Known Member

    Joined:
    May 26, 2007
    Messages:
    157
    Likes Received:
    1
    Trophy Points:
    18
    You are also free to check my config and advise me as to what I'm using and what's necessary and what isn't. In my case, I copied the setups in Easy Apache from previous hosts (HostGator and HostICan), with only minor changes.

    Switching the PHP 5 handler from SuPHP to fcgi and installing eAccelerator a couple of days ago, as an experiment, gave me a measurable 20-30% boost in performance. I didn't expect that!

    You can see the current config here:

    http://www.macnightowl.com/phpinfo.php

    Enjoy.

    Peace,
    Gene
     
Loading...

Share This Page