8GB Linode and site is struggling even with 4GB of free RAM
The site was built with ExpressionEngine 2.5, server is currently running Ubuntu 64 12.04 LTS with Apache2.2 with the following conf:
MaxKeepAliveRequest 100
KeepAliveTimeout 5
PHP Memory Limit is currently set to 128MB
MySQL conf is as follows:
Max_Connections 1000
table_cache 120
querycachelimit = 1M
querycachesize = 120M
Problem is, as soon as the site hits 500 users at a time, CPU goes to about 50% and everything gets really really slow, to the point of getting pingdom alarms, yet I still have 4GB of free RAM at my disposal that I'm not using. (See attached graphic. I launched the site around 12:25pm. The funky MYSQL graphs are simply me restarting the service)
~~![](<URL url=)
Where do you guys think is the bottleneck and how do I make sure to use the RAM available to speed up things for users and even go beyond the 500 limit?
Would you guys be kind enough to share with me your optimized settings for Apache/Mysql/Php on a 8GB Linode?
A N D F I N A L L Y
Should I even try mpmworkermodule?
Thank you so much for your kind help and for saving my chops.~~
6 Replies
For example, what is MaxClients in your apache configuration, and are you achieving that number of clients at peak? You mention PHP - are you using modphp or phpfpm? If the latter, how do you have it configured in terms of max_children for your application's pool?
Depending on how long it takes for a single client request to be satisfied (do you have any test metrics on what to expect for that?) you could be creating a backlog of clients waiting for a free apache slot (or php-fpm child) leading to increased latency.
At least at first glance it doesn't appear that you are cpu or memory bound. Not positive about I/O, but given that your iowait time is low on the cpu chart, I'm guessing that's not really an issue yet either.
I'm also assuming that by pingdom errors you mean in respect to your web site, and not a pure "ping" test against the node. If the latter is failing too, then I'd be a little more confused since you would seem to have plenty of resources (and network bandwidth) to respond to basic traffic even under load. But if it's the former, then the pingdom request could just be getting caught up in the same queue backlog as other clients.
– David
$ sudo apt-get install mysqltuner
Then run:
$ mysqltuner
You may also want to look into things like php-apc, varnish, or other caching technologies to help?
My default build of ubuntu has 1024 open files… I'd bump that at least 8x and see if it improves.