8GB Linode and site is struggling even with 4GB of free RAM

Title says it all. I have a new site (local newspaper) and I decided to opt for the 8GB Linode considering the previous amount of traffic they had before moving in with me.

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=)http://f.cl.ly/items/011c0F3K1A1o452926 … 8%20PM.png">http://f.cl.ly/items/011c0F3K1A1o4529260H/Screen%20Shot%202012-08-20%20at%202.50.08%20PM.png" />

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?


Should I even try mpmworkermodule?

Thank you so much for your kind help and for saving my chops.~~

6 Replies

I suppose I'd look at any parameters that relate to how many parallel requests you can satisfy, and see if you've got anything set to low to prevent full resource utilization.

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

For mysql, ubuntu has an app to suggest proper values.

$ 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?

If you're running EE, are you already caching your pages? If not then I highly recommend CE Cache.

I don't know annything about ExpressionEngine but here's a page that describes some things you might want to look at:

http://ellislab.com/expressionengine/us … ching.html">http://ellislab.com/expressionengine/user-guide/optimization/caching.html

Always check your ulimit also for high capacity sites.

My default build of ubuntu has 1024 open files… I'd bump that at least 8x and see if it improves.

Are you running 32bit code? That has an inherent 4GB per-process limit. Make sure your kernel and programs are 64bit.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct