Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri May 25, 2012 12:08 pm 
Offline
Senior Newbie

Joined: Thu Jul 28, 2011 4:33 am
Posts: 10
Website: http://www.fangsoft.net
I'm experiencing some awful performance on my server. The main site that I run is http://americankpopfans.com/ (that gets about 98% of the traffic on my server). It's a Wordpress blog that averages about 6500 unique hits per day. It's been running great thanks to APC and W3 Total Cache.

Here's my apache conf:

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


I've got a Linode 512, and I'm running 32-bit Ubuntu 10.04 LTS, all updates are current. Memory usage is fine, swap usage is essentially nil, as is general I/O. CPU usage is really low, too (uptime: 11:07:45 up 1 day, 0 min, 1 user, load average: 0.05, 0.05, 0.05).

The problem I think is bandwidth usage. Here's a graph of the last 30 days:

Image

And the last 24 hours:

Image

You can see that my bandwidth usage was really low until just a few days ago. There hasn't been a significant increase in the number of unique visitors to my site, so I don't know what's going on here. Does anyone have any advice? This is incredibly frustrating.


Top
   
PostPosted: Fri May 25, 2012 12:17 pm 
Offline
Senior Member

Joined: Mon Dec 07, 2009 6:46 am
Posts: 331
Fangs404 wrote:
I'm experiencing some awful performance on my server. (...) Memory usage is fine, swap usage is essentially nil, as is general I/O. CPU usage is really low, too (...)


By awful performance I am assuming page load time? Increase Apache MaxClients and ServerLimit to, say, 32 and observe what happens. Keep in mind, though, that will double the memory consumption of your apache/php processes so make sure there's room for that, or increase in smaller steps. Also fully restart httpd, reload won't catch MPM config changes.

Also install Munin, Apache plugin and corelate number of busy processes with memory/cpu/bandwidth usage. That way you'll know better what's going on.


Top
   
 Post subject:
PostPosted: Fri May 25, 2012 1:16 pm 
Offline
Senior Newbie

Joined: Thu Jul 28, 2011 4:33 am
Posts: 10
Website: http://www.fangsoft.net
Yes, awful page load time.

Increasing MaxClients seemed to help quite a bit. I'm setting Munin up now. I'm using quite a bit of swap now that MaxClients is increased (I bumped it to 30). A Linode 512 should be able to handle the kind of load I'm getting just fine.


Top
   
 Post subject:
PostPosted: Fri May 25, 2012 2:36 pm 
Offline
Senior Newbie

Joined: Thu Jul 28, 2011 4:33 am
Posts: 10
Website: http://www.fangsoft.net
What sorts of things should I be looking for in Munin? There is a ton of information here!


Top
   
 Post subject:
PostPosted: Fri May 25, 2012 3:03 pm 
Offline
Senior Member

Joined: Mon Dec 07, 2009 6:46 am
Posts: 331
For starters, with Apache munin plugin you can see the saturation of the Apache processes, as well as what else increases or decreases with traffic.


Top
   
 Post subject:
PostPosted: Fri May 25, 2012 6:53 pm 
Offline
Senior Member
User avatar

Joined: Thu Nov 24, 2011 12:46 pm
Posts: 138
Location: Mesa AZ
After you have munin running for a while, you will start to see trends in the charts, like when a backup kicks off, processes start up. I had to tweak the Apache module a bit but I can now see access counts, volume, error counts, it is easy to see when something is happening... pretty good tool.

Via mobile device...

_________________
Kevin a.k.a. Dweeber


Top
   
 Post subject:
PostPosted: Sun May 27, 2012 2:12 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
There's a limit to how many simutaneous visitors you can serve with mpm_prefork, especially on a media-heavy website like that. Large downloads clog up the prefork processes, unlike simple pages that quickly get out of the way.

Short-term solution: Disable KeepAlive.

Long-term solution: Offload your /wordpress/wp-content/uploads directory to another web server like nginx (or a CDN). This will leave Apache with some breathing room to serve PHP scripts more efficiently.


Top
   
 Post subject:
PostPosted: Sun May 27, 2012 2:50 pm 
Offline
Senior Member
User avatar

Joined: Thu Nov 24, 2011 12:46 pm
Posts: 138
Location: Mesa AZ
I tossed your page into http://www.webpagetest.org/ and see you have a lot of content on your site.

Many of the images you are using are not very optimized for quick loading.

Example:
http://americankpopfans.com/wordpress/w ... esmall.jpg

Which is a large 800x300 image you use on the main page. It is physically 754kb in size. It is taking 18197 ms to download.

Optimizing the image (still same size in pixels) got it down to 30kb. That is 25x smaller and would load significantly faster.

A lot of your other images are much larger than you are using them on the site. While they are small on the site, you are still loading the full sized images and having the visitors browser resize them down. This is both using more bandwidth (slower download) but also results in less quality images (browser resize based on speed not quality).

Example:
http://americankpopfans.com/wordpress/w ... degif1.gif
Actual image is 600x880, you are using it on the website as 280x350. At over 500kb, the actual size if you reduced it would be under 20kb.

A little content optimization can go a long way.

Offloading your content as suggested above is a good idea too, but if the images are large, they are going to load slower.

_________________
Kevin a.k.a. Dweeber


Top
   
PostPosted: Sat Mar 30, 2013 1:30 am 
Offline
Junior Member
User avatar

Joined: Fri May 04, 2012 8:57 pm
Posts: 49
Try google pagespeed, which has some pretty easy-to-fix steps on theoretically making your site less slow:

https://developers.google.com/speed/pag ... bile=false

check your logs, see if there are any errors. Did you update your site recently?

_________________
me | voltaireMC


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


Who is online

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