How much traffic can I support?

I'm expecting a decent surge of traffic to my site after a link is posted in an article on a popular news site, and I expect it to be a quick surge over maybe the first few hours after the article is posted.

I have a Linode 512, I can probably afford to upgrade during that time frame if I have to, but what can I do to get the most performance out of my server and Apache to make sure my site doesn't crash and can serve several thousand visitors at a time?

Currently I am running a basic wordpress install using apache and mysql. The site only has a few pages(4-5).

Thanks for the help.

9 Replies

It really depends entirely on your specific setup, but if you've gone with mostly default configs for everything, the answer is probably not; Apache's default configuration is not suitable for a Linode 512, and Wordpress without caching is horribly inefficient.

A Linode 512 (or one a bit larger) could easily survive such traffic if properly prepared for it, but without knowing more, it's hard to say if your specific setup would.

This is what i changed in apache based on the linode setup. Is there anything else that would help?

 <ifmodule mpm_prefork_module="">StartServers          1
    MinSpareServers       3
    MaxSpareServers       6
    MaxClients            24
    MaxRequestsPerChild   3000</ifmodule> 

You can try load testing your site with 'ab' to try to see if it can handle the kind of load you're expecting. There are lots of things that you can do to try to improve performance (cloudflare, wordpress caching, php caching, making sure MySQL is correctly configured, etc) but I'll leave those sorts of suggestions to people with more experience.

@ablankenship:

The site only has a few pages(4-5).
Just xfer the content to static pages - even a poorly configured Apache engine can dish out lots and lots of simple static pages.

Yeah, with Wordpress this isn't too hard. Look into the mod WpSuperCache. You can set it to serve static files for pretty much all (or just anonymous/new) visitors. It even has a help-i'm-getting-slashdotted-button :)

Thanks for the help guys. Had a few people run 'ab' for a minute and it made my server cry xD

Was still able to load a page though, slowly.

Installed the WpSuperCache plugin as well, the site is super fast for new users now, thanks for that!

Enjoy lol http://i.imgur.com/2TiEh.png

I'd lower maxclients there. If you're maxing out the CPU, you've got it set too high, and you're dangerously close to dipping into swap to boot. You also want to have some free RAM for disk caching.

Do you think that's necessary? This wasn't just a few people loading the website, this was 2 or 3 people that did 'ab -n 100000 -c 50 URL' at the same time.

If you can max out the CPU with 12 processes, and you've got 24 processes maxing out the CPU, all you're doing is taking twice as long to service each request; everybody gets served in the same amount of time overall, since you're bottlenecked on the same resource. Except by using a higher process count, you're consuming valuable RAM that could have been used for caching something elsewhere (be it disk cache, SQL cache, memcache, etc), which could have sped up the requests.

Reply

Please enter an answer
Tips:

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