Knowledgebase

Portal Home > Knowledgebase > Articles Database > High Load after converting to suPHP


High Load after converting to suPHP




Posted by Fastian, 02-05-2010, 11:17 AM
Hi I am having so much trouble right now that i am pulling my hairs out I have a high end VPS with dedicated resources. I was using mod_php with dso up until 2 days ago and it was running perfectly fine even with very high traffic of my websites (15k-20k/day). Most of it is from a wordpress blog that uses Wp Super Cashe(WSC). With WSC enabled, I usually get an average load of 1.0 and without WSC, it jumps to 5-6.... 15k-20k is my average traffic. On particular events, it goes up-to 30K-35K. Even then, I didn't experience downtime. I touched my memory limit but my site was accessible. Now, the trouble part. I wanted to host few friends on that VPS so I asked my host to tighten security. On of the suggestions was to use suPHP for better security and restricting users to their own directory. ( I agreed. ) So I was shifted from mod_php to suPHP. Now, I am on average getting 10-15 load. Few minutes ago, load was 120 and my site suffered 3 minutes of downtime. Not just that, more and more queries are going defunct. I have even started getting DataBase error in wordpress that shows that MySQL performance has been decreased. Now, please suggest me what I should do? Should I keep suPHP and try do something?? (No idea what that would be) Should I just move back to mod_php and drop the idea of hosting friends? Or do some alternate security setting with mod_php Not sure if my host will like the idea of undoing all changes he did just 2 days ago. Please suggest something and thanks for your response. Fastian

Posted by bonjurkes, 02-05-2010, 12:18 PM
Suphp always puts extra load on server, thats for sure. And about being safe, i am not sure what you host down there or what will your friends do. But basicly, open_basedir, and if you want safe_mode is basic and effective way of gettin secured. I don't think your friends will want to mess up with your server.

Posted by brianoz, 02-05-2010, 08:41 PM
suPHP provides an important level of security that just isn't possible with open_basedir/safemode etc. However, it's default performance sucks as it starts a separate binary for each php request whereas PHP running as a DSO runs in the Apache process. While this poses minimal performance impact on a lightly loaded server, it's a killer on a heavily loaded server. The solutions to this are to use variants such as FastCGI and a "prefork" solution - both are pretty widely used, and both are well known to perform well with suphp.

Posted by hostechsupport, 02-05-2010, 09:24 PM
Hello, Please paste the result of top -c command

Posted by Fastian, 02-06-2010, 01:52 AM
I think currently suPHP is running files as CGI and you are saying they should be run as FastCGI? (Am I right? I did search but cant get a proper answer) Can you shed some light on this. This is the output when there is "minimal" load. Its early morning here and I don't get much traffic at this time. Later, I will also give the output with peak time. Whenever I do top, I see 5-8 defunct php process. (It wasn't the case before)

Posted by brianoz, 02-06-2010, 03:52 AM
How many users/sites do you have on this server? It's quite likely you're seeing problems from a broken site thrashing the cpu. It's not normal to have such a large load jump when you convert, implies the server was already under a very heavy load. We had a problem similar to this with a site running Typo3 - an image was being linked to from a highly active forum, but the image wasn't there, so an active 404 page (active meaning it ran PHP) was getting called up for every missed image. This caused problems until we took the active 404 page down (replaced it with a static HTML Page, or nothing). Re you other query - FastCGI is not the same as CGI. FastCGI runs a pool of servers for active users, serving requests from that pool rather than starting up a new process each time, so very much faster. Not sure what the other alternative MPM prefork does. You'll find a lot about these here on WHT and at the cpanel.net forums. Just an opinion, but your sysadmin guy really should have caught this.

Posted by Veks, 02-06-2010, 04:17 AM
FastCGI + mpm_worker is what I use when I'm forced to go with Apache. By far the most scalable.

Posted by eonhost, 02-06-2010, 05:09 AM
Well, suPHP by design is more resource intensive. Do not use it until its absolutely necessary to do so.

Posted by Fastian, 02-08-2010, 12:38 PM
Well, thanks for everyone why responded. Unfortunately, I couldn't get much help here... I ended up reverting back to DSO (mod_php). With DSO no matter how much traffic I have, my average load is 6-7 when WP-Cache is inactive. And its around 1-2 with Cache enabled. But with suPHP, my site load was around 20 normally (which is much higher than I expected). About an hour ago, it jumped to 200+ range (2nd time in last 2 days). Like me, my host was clueless on what is going on, so I revered back to DSO. So, it looks like, DSO is the best option to go for. Less security ... better performance. I never thought suPHP will make such a huge difference in terms of VPS load.

Posted by WebHostDog, 02-12-2010, 04:15 AM
I will suggest you to try fastCGI. I think will be a lot better than plain suPHP.

Posted by Lightwave, 02-12-2010, 06:36 AM
suphp is outdated... your reliance on cPanel is what holds you back. If it wasn't for cPanel supporting suPHP (and not better alternatives)... it would probably be obsolete. fastCGI is a good solution and probably your best bet that integrates somewhat with your infrastructure, but imho it's overkill and unnecessary unless you're trying to build a separate application server/cluster.

Posted by mellow-h, 02-12-2010, 10:20 PM
When did it get outdated? After March 2009, there isn't any further bug noticeable bug in susphp.

Posted by sharmaine1111, 02-13-2010, 02:20 AM
Can someone tell me how can suphp work with fastcgi and mpm worker? What should the variables that have to be edited in order for these 3 to work?



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Help Please! (Views: 583)
w00tw00t (Views: 542)


Language:

Contact us