johnburk

Well-Known Member
Jun 23, 2006
241
0
166
One of our servers is a :

  • Dualcore AMD Opteron 1214 with 2,2GHz
  • 4Gb ram
  • 7200rpm – 8mb cache – Raid 1 Hard drive
  • 200 gb data traffic a month
  • Approximately 250k visitors a month.

There are only 5 sites on this server, running wordpress with lots of images and the use of timthumb.php

During peak hours the server load is between 1.8 and 3.2.
Most of the CPU consuming part of it is the rss feed timthumb.php and the use of js on the site.

An option would be to upgrade the server to something like a Opteron 6128 with 4Gb of ram, but I feel like the Opteron 1214 should be able to manage 5 sites with 200gb traffic and 250k visitors.

We have already done some mysql tweaking and that is not the resource problem. It’s the CPU that is having a hard time.

Do you know any good tweaks or reads on how to improve CPU using without having to upgrade the hardware?
 

Infopro

Well-Known Member
May 20, 2003
17,075
524
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
All 5 sites runs this timthumb script? What other addons do these sites run? You might try disabling a few of those as that sort of thing can increase load I'm sure of it.

Also are all of your addons up to date? If you're using an out of date addon it could be causing the issues.

Instead of throwing hardware at it I'd be disabling features till I found the one causing the problems.
 

johnburk

Well-Known Member
Jun 23, 2006
241
0
166
Everything is up-to-date, optimized, minifided, etc.

Page speed scores of all sites is 90+.

The timthumb script causing a lot of CPU, but the feeds use huge amounts of CPU. /feed/ is responsible for 65% to 70% of the daily CPU usage.
 
Last edited:

florinpatan

Member
Oct 25, 2009
11
0
51
cPanel Access Level
Root Administrator
Try using a cache solution for timthumb script. I didn't worked with the script before but as a developer I don't see the point of having a script that resizes a image on each request if the image doesn't change between requests (if that is the case for you).

Also use APC for PHP op-cache, use memcached for caching partial/full pages responses (and feeds in your case), database results etc. If those aren't enough, use file cache for pages, feeds and images that is refreshed on appropriate intervals. I can't stress enough how important caching is for websites under heavy loads

If you can't do that for yourself search for a good programmer/programming team and they should be able to identify where the problems are.
 
Last edited:

jerrybell

Well-Known Member
Nov 27, 2006
90
0
156
It sounds like you might be running some sort of transformation on the images as they are served (presuming that is what you're using timthumb for). If that is the case, you should look for a way to perform those transformations once (upon upload, first access, etc). There isn't a lot of info in your description of the site to help me give more specific suggestions.
 

johnburk

Well-Known Member
Jun 23, 2006
241
0
166
Thanks everyone. The biggest problem is the feeds and moslty because over 50 different sites take the content from the feed and some check it every every few seconds.

It seems to be a big issue in wordpress that can be fixed with one the the 3 things.

- Cache feeds.
- Block these external sites (thus reduce number of visitors to your site)
- Outsource your feed to a 3rd party, such as feedburner.

I am going to try the cache option first. The other 2 are not great options for me. I will update this topic for people who have a similar problem.
 

johnburk

Well-Known Member
Jun 23, 2006
241
0
166
I used Main >> System Health >> Show Current CPU Usage to trace a process that uses a lot of cpu.

The process is about 40.000 lines long so I am not going to post it, but it does include a lot of "lstat64"

So I guess something is requesting huge amounts of file information request. Just can figure out why.

Does anyone have an idea?