Advice needed: rookie VPS owner with needs for PHP optimization

ozione

Member
Mar 26, 2013
7
1
53
cPanel Access Level
Root Administrator
Hello!

After hours of reading through these forums and googling about it, thinking and reading it all over again, I've came to conclusion I just need to ask you guys. I'm very new in the WHM waters but i think I can make sense of things pretty quickly. After running the VPS for a month or so now, I'm noticing lots of load spikes and thus I went for some optimization guides / techniques.

Situation: at the moment I'm hosting a few websites; some are Wordpress, some are static not a big deal any of them. But I do also host vBulletin CMS with forums. VB was a reason to go for the VPS in the first place. Although I provide hosting to other websites I manage everything for everyone. No one else does anything for themselves. Just to note that.

It's very obvious that VB is the main drain factor here and in the optimization phase, I've come to the point of PHP caching. And this is what troubles me now. VPS came preconfigured with:
Default PHP Version (.php files) 5
PHP 5 Handler suphp

Apache suEXEC on
Apache Ruid2 off
It also had "xcache" enabled.

I grabbed VB Optimise plugin to help me with caching VB and I've found out that PHP caching isn't really compatible with my current configuration. I need to make some changes.

I do think that my best option (from the resources perspective) would be PHP handler DSO + ruid2 but there are lots of reading on this matter and I can't quite decide what to use. I don't want to jeopard the security of the system but I do need to make it faster. I guess the mentioned configuration is indeed the best option in the meaning of performance/security factors? I also need to make sure some simple PHP scripts continue to work further (like small emailing scripts, uploading, etc...).

If I'm on the right track with the DSO + ruid2 config:
How would I need to approach things?
What would I need to check / test after switching to new config?
What should be aware of and any other hints a newbie should notice and should be able to take care of?

I'd be grateful for any comments.
Thank you.
 

Infopro

Well-Known Member
May 20, 2003
17,075
524
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
After running the VPS for a month or so now, I'm noticing lots of load spikes and thus I went for some optimization guides / techniques.
What do you mean by this exactly?

If you're looking for ways to better optimize your server for the vBulletin forum specifically, there is no better place for that than here:
Server Configuration - vBulletin Forums (Members Only)
 

ozione

Member
Mar 26, 2013
7
1
53
cPanel Access Level
Root Administrator
What I meant was, that before moving to VPS I didn't really do much for VB optimization. I was sure that the lag was coming from shared host. After moving to VPS I expected miracles but all I found was, that I was more naive than I should be.

Anyways, I went for a few optimization guides found on the internet and VB's forums. I came to the point of caching and now I'm having problems with configuration like I stated earlier.

From my point of understanding PHP handlers can be crucial for the performance not only VB but PHP globally. So. This is where I'm stuck. I'd like to change my config but I'm not sure what should I do and which config should I choose.

Thanks!
 

ozione

Member
Mar 26, 2013
7
1
53
cPanel Access Level
Root Administrator
Nothing much going on here...

Id User Host db Command Time State Info
82999 eximstats localhost eximstats Sleep 2059 NULL
211823 leechprotect localhost leechprotect Sleep 7180 NULL
213951 root localhost NULL Query 0 NULL SHOW PROCESSLIST
Can someone tell me if there in fact is something needed to be done on the PHP side (handler and stuff)?
:)
 

hgrg

Well-Known Member
Oct 4, 2010
90
0
56
cPanel Access Level
Root Administrator
i suggest if you have enough memory then check out varnish as a reverse proxy cache, if you dont, then nginx as a reverse proxy for serving static content. right now im using varnish to cache wordpress based sites and its really good: i was using siege to simulate users on the site and before installing varnish the max i could get was 600 concurrent connections. with varnish now its up to 1700.. of course a cache means you've got to store it somewhere you can get fast (for me its a 4G memory cache) so its also not giving a hard time on the crappy disks ive got in the dedi :)
 

ozione

Member
Mar 26, 2013
7
1
53
cPanel Access Level
Root Administrator
thanks for that tip. although i need to enable something like "xcache", "apc" or "memcache". it's far best for vbulletin and some plugins that uses any of these to perform caching.

i think i'll just need to switch hanlders so i'll be able to properly enable, for an example "apc", which seems to be the most recommended for my needs (vbulletin sources).