High CPU / Memory usage

Permalink 1 user found helpful
So I moved from a shared host to a VPS.
VPS has 512m ram, and 1 x 2.0+ GHZ Core...
Should be fine for a few Concrete5 sites, right?
I check my apache usage, and sometimes the
/usr/bin/php /home/xxxxxuserxxxxx/public_html/index.php uses 25% CPU 5% memory...
My templates are custom, could it be the code I used... I've only installed a few modules, turned off statistics, ran MySQL optimizer...

Do you think it's the server?
Do you think it's the template?
Do I just not have enough headroom for the CMS, I can up to 1gb, and addt'l cpu... but do I really need to!
Is there some PHP ini setting I should be looking at?
I've ready about excessive swapping being an issue, how can I check for this?

Lots of questions, hopefully someone may have an answer.
Most of the time, the site loads quickly, it's just when the server peaks, it slows to a crawl.
sample url:
Custom Site:http://www.thephil.net
Base install:http://www.innovatecentral.com

Thank you,
Philip Mastroianni

View Replies: View Best Answer
Mnkras replied on at Permalink Reply
yea, neither of those feel like loading for me,

the mysql is on the same vps?
thephilm replied on at Permalink Reply
MySQL is on the same server...
frz replied on at Permalink Best Answer Reply
hmm. not sure what were debugging. Both of those load snappy for me at the moment. It's quite possible that the setup is fine until something gets hammered and then its not.

From what little I've learned about server management in hosting environments the last few years, this seems to be the case just about with every setup. If you have one site that is causing a CPU spike, all the sites will suffer.
Ale replied on at Permalink Reply
It's also possible that your VPS has somewhat limited HDD access speed, as the hardware server that runs your VPS presumably has other VPSs running as well. The HDD throughput may become a limiting factor which leads into a situation where the CPU has to do some extra queuing of I/O commands due to slow HDD access and the CPU and RAM usage increases.

I'm really not an expert on this topic, but I've seen a situation with C5 page loads on different VPSs that had somewhat equal CPU/RAM resources, but the other had CPU usage of around 6-10% and the other was spiking at 60% because of slow HDD access. I had no idea what was causing the higher CPU/RAM usage, but fortunately a colleaque of mine who has much more experience on server side found the reason.
thephilm replied on at Permalink Reply
Thanks to everyone for their input. As a baseline test - I also installed the default setup of Drupal, Joomla and Wordpress.
Along with Concrete5, they all loaded their default content pretty quickly.
I'm confident my speed issues are actually server related, and not Concrete5 related.

My hosting provider believes there may be some mis-configurations on the MySQL server causing memory and CPU spikes. Concrete5 does make a lot of requests, so when I have multiple C5 sites being hit at the same time, it seems to slow the server down. The other CMS's were displaying the same kind of memory CPU usage, so it seems server configuration related!

Good news is that Concrete5 is running very quickly! I've disables statistics, optimized the db, and enabled caching. 5.4.1 is quick - and I have no issues with load speed. Occasionally it looks like my server slows down, but it affects all sites... so I'll have to put on my sys-admin hat and work through that.

Just a note that I think is something unique to Concrete5 - that the CEO would respond to my question. Actually quite humbling.
wingnut replied on at Permalink Reply
We recently had an issue with Fatal memory errors for sites hosted on VPS's with memory allocation running at up to 100MB for php. Finally after many arguments with the ISP the solution was for each VPS to have its own php.ini file with just memory allocation set to 32M. Every runs really well now.

thephilm replied on at Permalink Reply
Wow - what a ride the last few days.
Thank you to everyone who chimed in with advice and suggestions.

I've come to this conclusion: Some hosts just don't know how to setup a server. I was on a managed host (subhosting.net) who seemed great at first. After installing a few sites, it came apparent their hardware was lacking, or they just weren't managing the servers.

The mysqld daemon would just chew through cpu cycles and memory, and the disk i/o was horrid.

I've since moved to an unmanaged VPS, and installed my own LAMP stack. What a difference. Seriously night and day. Most page loads in under .5 seconds with a stock install and on a custom site as well!
I did have some issues with using PHP 5.1... I got the dreaded cannot connect to community error. Concrete5 didn't seem to like PHP 5.3 either, so I ended up with 5.2 on Debian 5 and it's been working flawlessly.

Needless to say, I was hosting on Dreamhost before getting a VPS. It was slow, until I requested a server move, which really helped with speed. I just wanted more control, and was having just a few too many inconvenient downtimes.

If I have a client who just needs the basic hosting, I'll suggest to the Concrete5's hosting.

Again - Concrete5 is wonderful, and it's super fast on the right setup (and that setup doesn't have to be exotic!)
Thanks to this great community!