Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Jan 29, 2014 7:48 pm 
Offline
Newbie

Joined: Wed Jan 29, 2014 7:37 pm
Posts: 3
I just got tasked with deploying a heavily trafficked Wordpress blog to Linode.

I used Linode's Wordpress Stackscript (https://www.linode.com/stackscripts/view/?StackScriptID=12).

Current plan: Linode 2048.

As soon as I start up MySQL and Apache, available memory starts dropping, and eventually i'm OOMing. Within like 10 minutes.

I've tried fine tuning MySQL and Apache config files.

I've tried running mysqltuner.pl. She also has WP Super Cache running with mod_rewrite.

Any other ideas? Any information that I can give you guys to help me, please let me know. I didn't think this size Linode would just be 100% taxed.

She's moved over from Pressable. I think her monthly pageviews are around 400k. She's also heavy on the images (style blogger). Is a bigger Linode really what she needs?

http://damselindior.com

Thanks for any help, struggling for a solution over here.


Top
   
PostPosted: Wed Jan 29, 2014 8:02 pm 
Offline
Senior Member
User avatar

Joined: Thu Feb 16, 2012 9:01 pm
Posts: 52
A video for tuning mysql: http://mirror.linux.org.au/linux.conf.a ... _Lloyd.mp4

There's probably reasonable guide for configuring apache (or switch to nginx - there's a few good config templates on github).

Make sure cache control headers are set on static content.


Top
   
PostPosted: Wed Jan 29, 2014 10:11 pm 
Offline
Newbie

Joined: Wed Jan 29, 2014 7:37 pm
Posts: 3
danblack wrote:
A video for tuning mysql: http://mirror.linux.org.au/linux.conf.a ... _Lloyd.mp4

There's probably reasonable guide for configuring apache (or switch to nginx - there's a few good config templates on github).

Make sure cache control headers are set on static content.


Yea I've been going back and forth with MySQL and Apache tuning, literally all day.

I caved, upgrading to more memory.


Top
   
PostPosted: Wed Jan 29, 2014 10:35 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
Maybe if she sized her photos for the web, it wouldn't need so much ram.

_________________
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 Jan 29, 2014 10:46 pm 
Offline
Newbie

Joined: Wed Jan 29, 2014 7:37 pm
Posts: 3
Yea, upping the ram from 2 to 4GB has alleviated the problem.


Top
   
PostPosted: Thu Jan 30, 2014 8:24 pm 
Offline
Senior Member

Joined: Wed Jun 27, 2012 10:00 pm
Posts: 87
Website: http://hemonc.org/wiki/Main_Page
She also would benefit from picking the right image types for the site. Looking quickly, her About page is filled with *.png files (the FAQ says she does her own image work in Photoshop). I feel JPEGs would be most appropriate for those types of images and get things smaller without sacrificing quality.

Edit: Looks like she's using JPEGs on the rest of the site (large high quality compression ones), so the few *.png files are probably not a big deal.

vonskippy wrote:
Maybe if she sized her photos for the web, it wouldn't need so much ram.


Edit 2: ...though the overall bloat of the images are! I'm not surprised about the load issues when she has a 5.8 MB home page for a site with that kind of traffic.

I second examining cache settings. I'm still learning about how to better cache things, and it definitely makes a big difference.

_________________
Amateur, eager to learn.
My hematology, oncology, and chemotherapy regimen wiki


Top
   
PostPosted: Fri Jan 31, 2014 11:45 am 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
Is 5.8MB really such a big issue in this day and age? Especially if the images are loading from top to bottom, the stuff above the fold would load very quickly on a broadband connection. The page appears to load pretty much instantly here.


Top
   
PostPosted: Mon Mar 17, 2014 9:40 pm 
Offline
Senior Newbie

Joined: Wed Jan 22, 2014 8:11 pm
Posts: 6
Website: http://eightyfiveconsulting.com
Location: Orange, CA
mctenold, have you thought of using a Fast-CGI/PHP-FPM setup for handling the dynamic content? It could alleviate the stress being put on apache by WP.

_________________
http://eightyfiveconsulting.com


Top
   
PostPosted: Wed May 07, 2014 11:40 pm 
Offline
Newbie

Joined: Thu Apr 17, 2014 7:45 pm
Posts: 2
Hi, if I can just jump in on this thread, because I had the same problem today.

It came about on one of my clients sites, SaveTheGreatSouthBay.org.

He was on HuffPo today and the traffic ate up CPU until he used 101% of avail memory according to Plesk. The monitor on the dashboard had clear moments where the CPU went to zero. He is running Total Cache with WP and we're offloading images to Amazon S3, so that wasn't the issue.

We're also using NGINX, but I'm not an NGINX expert and am not sure if that needs performance tuning as well.

Here's a screenshot of traffic - jumped to around 45 M bits/second at around 2 pm.

Image

Image

I could do one of the following:

1. Upgrade the Linode from 4096 to 8192 and see if that handles the issue.

2. Make the following recommended change.

Currently, this is my my.cnf

# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8

This is the recommend my.cnf at this link https://library.linode.com/troubleshoot ... networking

key_buffer = 16K
max_allowed_packet = 1M
thread_stack = 64K
table_cache = 4
sort_buffer = 64K
net_buffer_length = 2K

If it do this and reboot the server, will that really have a noticeable impact on performance? Will I cause any issues? If I have to restore from backup will my.cnf revert back to the old settings?

3. Add another Linode and the nodebalancer. Not sure how to clone my Linode and keep both of them updated at the same time while shifting traffic with the nodebalancer.

Would love to get some recommendations. Thanks.


Top
   
PostPosted: Thu May 08, 2014 6:19 am 
Offline
Senior Member

Joined: Fri Feb 17, 2012 8:20 pm
Posts: 365
What you need to do is figure out where that traffic spike came from, what request was responsible for it, and if it is intended that way, and where it caused load/memory issues. Was it really MySQL using all the memory? Or was it PHP? Or something else alltogether? Then see how you can tune that service. But just trying stuff out while not knowing for sure if that was the service responsible for the issues won't help.


Top
   
PostPosted: Thu May 08, 2014 9:06 am 
Offline
Newbie

Joined: Thu Apr 17, 2014 7:45 pm
Posts: 2
That's what I'm trying to do now. I'm working on installing Longview, but I'm not sure if that's going to show me what happened two days ago.


Top
   
PostPosted: Thu May 08, 2014 10:45 am 
Offline
Senior Member

Joined: Sun May 23, 2010 1:57 pm
Posts: 315
Website: http://www.jebblue.net
This might be helpful in trying to isolate it:

http://www.sysdig.org/


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


Who is online

Users browsing this forum: No registered users and 0 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