Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


PHP Handler: suPHP / FastCGI - Which is Better & Why !
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

PHP Handler: suPHP / FastCGI - Which is Better & Why !

Mahfuz_SS_EHLMahfuz_SS_EHL Host Rep, Veteran

Hi,

If I have enough RAM, is it better to use FastCGI as PHP Handler ?? FastCGI is better over suPHP if you have More RAM but less in CPU Power. On the Other hand, suPHP will be better if you have enough CPU Power. Security is nearly same on these two. Any Idea ??

The above description I got from the following source:

http://boomshadow.net/tech/php-handlers/

http://www.chriswiegman.com/2011/10/fastcgi-vs-suphp-vs-cgi-vs-mod_php-dso/

Note that, I run cPanel & currently suPHP is My PHP Handler. I have 12 Cores Access on L5639 CPU, 2 GB Ram, 2 GB vSwap etc. in My Box.

Help is appreciated :-)

Regards,
Mahfuz.

Comments

  • FastCGI fan here!

  • jarjar Patron Provider, Top Host, Veteran

    I pick suPHP for simplicity and security. Most of the time when I find that people are wanting to switch to FastCGI, it's to try to bandage a performance problem that they have created but are not capable of resolving at the source, in which case FastCGI creates the appearance of resolving it while simply creating a more obscure problem in it's place that seems more difficult to diagnose (and appears unrelated to the untrained eye).

    If your web server and web applications are optimized appropriately, the PHP handler is not going to have the largest impact on your performance.

    Thanked by 1DalComp
  • With CPanel, it's meaningless. You'll not reach big throughput with CPanel to see the bottlenecks of suphp. It usually will fall something before, maybe at apache level.

  • Mahfuz_SS_EHLMahfuz_SS_EHL Host Rep, Veteran

    @Jar said:
    I pick suPHP for simplicity and security. Most of the time when I find that people are wanting to switch to FastCGI, it's to try to bandage a performance problem that they have created but are not capable of resolving at the source, in which case FastCGI creates the appearance of resolving it while simply creating a more obscure problem in it's place that seems more difficult to diagnose (and appears unrelated to the untrained eye).

    If your web server and web applications are optimized appropriately, the PHP handler is not going to have the largest impact on your performance.

    Indeed right, you are. I just asked out of curiosity, not having any performance problem. On pick hours, Server load remains 2.5-3.0 (Doesn't degrade performance), off pick hour s, it remains 0.80-1.20

  • Mahfuz_SS_EHLMahfuz_SS_EHL Host Rep, Veteran

    @Profforg said:
    With CPanel, it's meaningless. You'll not reach big throughput with CPanel to see the bottlenecks of suphp. It usually will fall something before, maybe at apache level.

    We use nginx as Reverse Proxy :-)

  • suPHP does not work with opcode cache's such as APC, that fact + FastCGI offers improved performance on it's own makes me choose FastCGI. There are ways to use per user PHP.ini's with FastCGI, you'll just need to create a PHP wrapper.

    I like mpm_event + FastCGI, it's no nginx but it's a heck of a lot better than prefork.

    Thanked by 1jar
  • mod_ruid2 is the fastest from default cpanel options, with Nginx reverse proxy that is what i prefered... on apache bench test got over 1000 request per second - fresh wordpress install ssd vz vm (owned node)

    then came fastcgi

    suphp is archaic and eat a lot of cpu you will go out of it even on simple AB and do not get someting reasonable

    just do some tests yourself ... wiht apache bench and whach your loads

    best of all is lite speed lsapi

  • Free mod_php alternatives:
    Fastest? Nginx + PHP-FPM. No htaccess compatibility. You'll have to convert rules by yourself.
    Faster? Apache MPM-Worker or Event + PHP-FPM

    Drop in replacement for apache + damn fast: LiteSpeed. But beware, it will cost you!

  • jarjar Patron Provider, Top Host, Veteran

    nunim said: suPHP does not work with opcode cache's such as APC, that fact + FastCGI offers improved performance on it's own makes me choose FastCGI. There are ways to use per user PHP.ini's with FastCGI, you'll just need to create a PHP wrapper.

    This is true, I often overlook opcode caching. It definitely has it's place.

  • If your running CloudLinux with CageFS and Alt-PHP on your cPanel box, might be worth looking into CloudLinux's "Apache mod_lsapi". It's currently in the beta phase but looks to be another promising product from the CloudLinux line. Currently I use LiteSpeed on our cPanel servers and find its performance to be pretty decent.

  • edited October 2014

    It will depend on your production usages.

    If you're using your own hardware (vps/dedicated) to deploy and use it for your private sites, I would advise nginx + apache (mod_php) for speed. No advanced security needed. If you have a little free ram, you can use fastcgi. You won't even need a control panel either, just use ssh.

    On a shared hosting/vps, suphp or fastcgi will be better, but you will need at least several GB of ram. Actually fastcgi preferred for lower CPU usage, and on VPS you can be suspended by CPU overusing, not RAM overusing (except really bad providers with heavily oversold nodes).

    That's why all of those 3 have been survived until now, based on the needs of users.

  • agentmishraagentmishra Member, Host Rep

    both serve different needs.

    you need to compare and then make a choice for your self

Sign In or Register to comment.