Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Dec 11, 2012 8:18 pm 
Offline
Senior Newbie

Joined: Fri May 04, 2012 11:03 pm
Posts: 12
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.


Top
   
PostPosted: Tue Dec 11, 2012 9:02 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
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.


Top
   
PostPosted: Tue Dec 11, 2012 9:31 pm 
Offline
Senior Newbie

Joined: Fri May 04, 2012 11:03 pm
Posts: 12
This is what i changed in apache based on the linode setup. Is there anything else that would help?

Code:
<IfModule mpm_prefork_module>
    StartServers          1
    MinSpareServers       3
    MaxSpareServers       6
    MaxClients            24
    MaxRequestsPerChild   3000
</IfModule>


Top
   
PostPosted: Tue Dec 11, 2012 9:45 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
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.


Top
   
PostPosted: Tue Dec 11, 2012 10:02 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
ablankenship wrote:
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.

_________________
Either provide enough details for people to help, or sit back and listen to the crickets chirp.
Security thru obscurity is a myth - and really really annoying.


Top
   
PostPosted: Wed Dec 12, 2012 6:17 am 
Offline
Senior Member

Joined: Fri Feb 17, 2012 8:20 pm
Posts: 365
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 :)


Top
   
PostPosted: Wed Dec 12, 2012 2:50 pm 
Offline
Senior Newbie

Joined: Fri May 04, 2012 11:03 pm
Posts: 12
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


Top
   
PostPosted: Wed Dec 12, 2012 6:43 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
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.


Top
   
PostPosted: Wed Dec 12, 2012 7:26 pm 
Offline
Senior Newbie

Joined: Fri May 04, 2012 11:03 pm
Posts: 12
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.


Top
   
PostPosted: Wed Dec 12, 2012 8:27 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group