Performance issues on my wordpress site

I'm having all kinds of problems. I recently resized the Linode and am actually up to a 4GB linode and am still running into issues.

We have tweaked apache settings with regards to number of clients and what not.

Also, i deactivated most of the plugins in order to try and isolate the issues, although its worth noting i didn't have these issues on Dreamhost just a few weeks ago (just moved over to linode).

The free -m command shows we have plenty of memory available but when we get up to about 100 users on the site at once, it slows to a crawl.

What else should i check?

5 Replies

Is the free -m at some arbitrary time or is it when you get X (100?) users? What type of site is it (bulk file downloads, a CMS, etc)? There's pretty much three factors that effect the responsiveness of your Linode: Memory, CPU Usage, and lots of access to the disk (which can come in the form of Out of Memory Swap Thrashing).

The next place I would look if you memory is indeed sufficient would be disk access. Granted the free -m can be misleading at times. Try running top or htop and sorting by Memory usage (you can use < and > to switch between the columns or (I think) Shift-M to sort my memory). Try sorting by some other columns and see if anything jumps out.

Posting apache config (the tweaked settings) along with snippets of my.cnf (if using MySQL) would also be useful.

Do you has KeepAlives enabled in Apache?

If so, are they still at the default (absurdly long) value?

If you haven't done so already, I suggest turing your KeepAliveTimeout down to something more sane (like 2), or turning them off altogether.


i didn't have these issues on Dreamhost just a few weeks ago
If DreamHost can handle it, a Linode 512 should be able to handle it. If you're using a 4GB Linode and you're still having performance issues, it's definitely a server configuration problem.


The free -m command shows we have plenty of memory available but when we get up to about 100 users on the site at once, it slows to a crawl.
If you still have plenty of memory with 100 users on the site, you've probably already taken care of MaxClients. (As a rule of thumb, it should be less than RAM divided by 25MB.)

Next thing on the list should be KeepAlive, which should be either disabled or set to a very low value (less than 5) in order to make sure that none of the users monopolize a valuable Apache process.

Please post my.cnf here. Also tell us the approximate size of your WordPress installation. How many users/posts/comments do you have?

Install APC for an instant boost in PHP performance.

Install a good caching plugin for WordPress. There are two good options: WP Super Cache and W3 Total Cache. Try them one at a time, and see if either of them helps.

If your pages contain a lot of images and other static files, consider offloading them to a lightweight web server such as lighttpd or nginx. They are very good at serving static files.


I spent 5 years trying to get my WordPress site to function correctly under: Media Temple GS account, Rimu VPS1-4 account, SliceHost 4-8GB account, 8-16node account and eventually an 8-core, 12GB dedicated server back at RimuHosting again.

I have been up and down every wall you can imagine, every forum, every trick, ever measurment. Apache MPM-Worker, PHP-FCGI, PHP-FPM, APC, Varnish, WP-SuperCache, W3-TotalCache and on and on and on.

I'm trying to convey how much of a trek it has been for me to get a WordPress site to handle the front page of Slashdot, Digg, Reddit or Hacker News.

You want to know what FINALLY worked after none of that (including the monster server, believe it or not)?

nginx + PHP-FPM

That's it… one night I got super pissed off and converted the site to run on nginx… I set aside 4 hours around midnight to do it, instead it took like 20 minutes.

The server load dropped to at least 1/10th of what it was under load. What was usually a load of 1-4 on 'top' is now a load of 0.1-0.3 on busy days; site does about a million pageviews a month now and the server primarily sits around picking it's toes now.

I realize there are people on this planet that know how to tweak Apache to scale, but in the 5 years I tried, I was never able to get it to not buckle under the load regardless of what I tried… this includes using static-page-caching in WordPress for 4 of those years, so I'm just talking about hosting straight cached html pages.

For whatever reason, nginx out of the box is phenomenal.

So I'll safe you a lot of money and time and torture where you keep messing with Apache; just move to nginx + PHP-FPM.

The basic gist is this:

You setup PHP-FPM to start a pool of PHP processes (like VMs) that sit around waiting for requests to build PHP pages.

nginx is setup to pass all PHP page requests to that pool of warmed up processes and then return the reply. Static page caches are hosted directly by nginx otherwise.

Really nice/logical configuration, your PHP processes are pre-warmed and limited so if you have a massive influx of traffic, things will just queue up on the PHP process pool to process the requests instead of spawning a huge number of new procs and bogging things down (like mod_php would do).

Hope that helps. I registered just now to reply to this message specifically because I feel so strongly about this =/

I think the graphs have settled as it now reports 150GB out or 9% of my months total.

Since making some tweaks we're experiencing a lot less crashing. Maybe once a day if we're lucky.

We'll see where this goes.


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] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct