VPS spec for single concrete5 installation
Permalink 1 user found helpful
Hi all
I'm about to move a client's website to a VPS and I'm wondering whether 500MHz and 256MB RAM is sufficient (a single node VPS), running Ubuntu Server. I've been using a small dedicated server til now but I prefer to go down the managed route, hence the VPS.
The specs seem low to me, but I'm no expert on web server requirements, and it will host only 1 site with ~200 pages and 5k/month pageviews.
Any thoughts?
I'm about to move a client's website to a VPS and I'm wondering whether 500MHz and 256MB RAM is sufficient (a single node VPS), running Ubuntu Server. I've been using a small dedicated server til now but I prefer to go down the managed route, hence the VPS.
The specs seem low to me, but I'm no expert on web server requirements, and it will host only 1 site with ~200 pages and 5k/month pageviews.
Any thoughts?
Do you have any specific thoughts on Apache tweaking? I've reduced KeepAliveTimeout, but I'm confused about the MPM options (which profile applies?)
I've installed APC aswell. At the moment I'm copying over the site, so I'll soon see how performance compares. One thing I was never happy with was the time the Dashboard took to load - I always felt there was some Apache/PHP misconfiguration that I hadn't figured out.
I've installed APC aswell. At the moment I'm copying over the site, so I'll soon see how performance compares. One thing I was never happy with was the time the Dashboard took to load - I always felt there was some Apache/PHP misconfiguration that I hadn't figured out.
My main problem seems to be that there's often a significant delay after the GET request on a page - sometimes into several seconds. After that, assets seem to load quickly (I've turned on CMS caching, gzipping, browser caching and installed APC).
But I can't get that initial delay down :(
But I can't get that initial delay down :(
Have you enabled APC caching in your /config/site.php file? Sounds like it is not using caching to me? You'll need to add a line if not - you can find it on here.
Re other thoughts, I spent a lot on time on it and there are so many ways to configure them - but generally I found a very reasonable performance with 64Mb APC cache and Apache configured to run a much lower number of start servers and min and max spare servers. That's on a 256Mb Rackspace cloud server.
Getting available servers to work harder via keepalive and handling more requests rather than running more servers concurrently works far better when resources are limited (I found).
Hope that helps
Ollie
Re other thoughts, I spent a lot on time on it and there are so many ways to configure them - but generally I found a very reasonable performance with 64Mb APC cache and Apache configured to run a much lower number of start servers and min and max spare servers. That's on a 256Mb Rackspace cloud server.
Getting available servers to work harder via keepalive and handling more requests rather than running more servers concurrently works far better when resources are limited (I found).
Hope that helps
Ollie
erk I didn't realise I had to enable it in C5!
Anyway, I've done that now and I don't see much of a difference - some Dashboard pages still have a GET delay (called 'Waiting' in Firebug's Net panel) of up to 5-6 seconds.
Could it be a MySQL thing, since Dashboard pages will generally need more queries (I'm guessing)?
Anyway, I've done that now and I don't see much of a difference - some Dashboard pages still have a GET delay (called 'Waiting' in Firebug's Net panel) of up to 5-6 seconds.
Could it be a MySQL thing, since Dashboard pages will generally need more queries (I'm guessing)?
There is file that's included with APC, apc.php. Get that into a web servable directory and make sure your cache is filling if you haven't already.
Might be worth trying your VPS host for some support here, they can understand your server environment better than we can.
Might be worth trying your VPS host for some support here, they can understand your server environment better than we can.
Ah yes, that looks really useful. It seems only to be caching 1 file of ~430k, even after I browse around the site. That seems to imply it's not working :/
EDIT that might make sense, since c5 is basically index.php with includes etc.
EDIT memory usage is very low though: Free: 31.5 MBytes (98.3%), Used: 553.6 KBytes (1.7%)
EDIT that might make sense, since c5 is basically index.php with includes etc.
EDIT memory usage is very low though: Free: 31.5 MBytes (98.3%), Used: 553.6 KBytes (1.7%)
That's not working. If you're hitting multiple pages of your site even a default C5 install you should see the red (used) grow into megabytes fairly quickly.
What have you got in your Concrete5 config/site.php file? And have you configured the apc.ini file so that it is set to on?
What have you got in your Concrete5 config/site.php file? And have you configured the apc.ini file so that it is set to on?
Thanks for your patience so far!
Here's my site.php
I don't seem to have an apc.ini (running Gentoo here), but in php.ini is
phpinfo() shows APC is enabled.
Here's my site.php
<?php define('DB_SERVER', 'localhost'); define('DB_USERNAME', 'user'); define('DB_PASSWORD', 'pass'); define('DB_DATABASE', 'dbname'); define('BASE_URL', 'http://mytempurl.com'); define('DIR_REL', '/~temp'); define('FORM_BLOCK_SENDER_EMAIL', 'email@url.com'); define('PASSWORD_SALT', 'randomchars'); define('URL_REWRITING_ALL',false); define('PERMISSIONS_MODEL', 'advanced'); define('USER_USERNAME_ALLOW_SPACES', true); define('CACHE_FRONTEND_OPTIONS', serialize(array('automatic_cleaning_factor' => 0))); define('AVATAR_NONE', '/themes/mysite/images/default-avatar.jpg'); define('LOCALE', 'en-GB');
Viewing 15 lines of 17 lines. View entire code block.
I don't seem to have an apc.ini (running Gentoo here), but in php.ini is
extension=apc.so ... [apc] apc.enabled = 1 apc.shm_size = 32
phpinfo() shows APC is enabled.
No problem, not sure how much more help I can be here though. You've got
your site.php config value set for APC, and your APC settings show it as
enabled. That all looks good. Restart Apache is about all I can suggest.
That should clear APC and you'd expect it to start filling as you browse
your C5 site.
After that I think contact your host.
On 17/10/2011 11:48, "Concrete5 Community" <discussions@concretecms.com>
wrote:
Ollie, what do you mean exactly when you say "you need to enable APC in C5"? I've never heard of this, and have never needed to do so myself. I don't think I'm understanding what you're saying here -- can you say the exact config setting name (the line of code) that would need to be in config/site.php to "enable APC"?
And @melat0nin, when you say that there's a delay "after the GET request", do you mean that the delay is happening between when your browser requests a page from the server and when the server starts responding, or from the time when the server starts responding to when the page is fully rendered? If the latter, then none of the things in this thread are going to help that -- instead you'll want to look into asset caching and compression like MISER or Tinifier.
And @melat0nin, when you say that there's a delay "after the GET request", do you mean that the delay is happening between when your browser requests a page from the server and when the server starts responding, or from the time when the server starts responding to when the page is fully rendered? If the latter, then none of the things in this thread are going to help that -- instead you'll want to look into asset caching and compression like MISER or Tinifier.
Jordan this setting, which he has now. Sorry i wasn't clear.
Sent from my iPhone
define('CACHE_LIBRARY', 'apc');
Sent from my iPhone
@Jordan
The delay comes before the server responds - after that things load quickly.
Attached is a screenshot of the Net panel in Firebug - you can see the 2.77
second delay before the server starts responding, and everything after that
seems reasonable. Sometimes the response delay is around 300ms (which seems
fine), other times it's way up at 8-9 seconds (usually in the Dashboard).
It's ruled out the question of network latency - the server has a 25ms ping
from where I am - so I'm thinking there's something else up, and my (totally
uneducated) guess is that it might be MySQL (which I haven't tweaked at
all).
The delay comes before the server responds - after that things load quickly.
Attached is a screenshot of the Net panel in Firebug - you can see the 2.77
second delay before the server starts responding, and everything after that
seems reasonable. Sometimes the response delay is around 300ms (which seems
fine), other times it's way up at 8-9 seconds (usually in the Dashboard).
It's ruled out the question of network latency - the server has a 25ms ping
from where I am - so I'm thinking there's something else up, and my (totally
uneducated) guess is that it might be MySQL (which I haven't tweaked at
all).
Specs on a VPS always seem low compared to the computer sitting on your desk, but they're actually quite high compared the shared hosting most people use for C5 sites. I agree with Ollie that it's probably good enough. But I disagree about the "scale it to multiple nodes" part -- instead, you can just upgrade to more RAM, which is something that can be done without affecting your uptime at all, and does not introduce complications with caching, etc. that happen with C5 on the "Cloud" hosts that split up serving to multiple machines (search forum to see lots of horror stories -- I have also had nothing but terrible experiences with server setups like this -- on the other hand, I've found managed VPS's to be the best option for C5 sites).
I think @jordanlev is right, except that I'm against managed hosting it costs more and you loose control over your server and have to ask for every little thing. (No problem though if you're a regular consumer and client without any sysadmin skills.)
"A VPS is a good choice in your case and your server will really fit your needs, if configured properly (and it looks so, since you wrote the optimizer ;), you can alway upgrade to a better account with a vps also."
Also some simple changes like NOT using apache in example can increase your performance by a factor of at least 2. That's something you should invest your time insteaf of buying bigger servers.
I think I've lots of experience regarding cloud, dedicated hosting, vps and shared hosting. I admin those boxes quite often and I can tell that load-balancing, database sharding and filesystem replication isn't the holy-grail that some people tend to praise. Actually it's not even a scalable setup and I advice people to do simple things, so that their change-sets can be kept in overview instead of loosing yourself in highly complex setups that improve performance by 5% and increase maintenance costs by 20%.
(You are good to hire an experienced sysadmin, someone you trust so he/she can help, for your own security. You can rely on your managed server and the employee also, but quality of that is very different from one to the other service provider.
A firewall, intrusion detection and prevention, packet filtering, etc. there is so much to keep an eye on when you need a fully secure and functioning server.
"A VPS is a good choice in your case and your server will really fit your needs, if configured properly (and it looks so, since you wrote the optimizer ;), you can alway upgrade to a better account with a vps also."
Also some simple changes like NOT using apache in example can increase your performance by a factor of at least 2. That's something you should invest your time insteaf of buying bigger servers.
I think I've lots of experience regarding cloud, dedicated hosting, vps and shared hosting. I admin those boxes quite often and I can tell that load-balancing, database sharding and filesystem replication isn't the holy-grail that some people tend to praise. Actually it's not even a scalable setup and I advice people to do simple things, so that their change-sets can be kept in overview instead of loosing yourself in highly complex setups that improve performance by 5% and increase maintenance costs by 20%.
(You are good to hire an experienced sysadmin, someone you trust so he/she can help, for your own security. You can rely on your managed server and the employee also, but quality of that is very different from one to the other service provider.
A firewall, intrusion detection and prevention, packet filtering, etc. there is so much to keep an eye on when you need a fully secure and functioning server.
Thanks guys, that gives me the confidence to proceed!
Assuming you have Apache, my gut feel is that it will be fine. I'd say if you can implement something like APC caching then almost certainly it will be fine, and if you are prepared to tweak apache configuration, then definitely fine.
Alternatively if it's a single node, you can always scale it to multiple nodes?
Hope that helps