The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Increase server performance

Discussion in 'General Discussion' started by johnburk, Aug 8, 2010.

  1. johnburk

    johnburk Well-Known Member

    Joined:
    Jun 23, 2006
    Messages:
    241
    Likes Received:
    0
    Trophy Points:
    16
    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?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    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.
     
  3. johnburk

    johnburk Well-Known Member

    Joined:
    Jun 23, 2006
    Messages:
    241
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
    #3 johnburk, Aug 8, 2010
    Last edited: Aug 8, 2010
  4. florinpatan

    florinpatan Member

    Joined:
    Oct 25, 2009
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
    #4 florinpatan, Aug 8, 2010
    Last edited: Aug 8, 2010
  5. jerrybell

    jerrybell Well-Known Member

    Joined:
    Nov 27, 2006
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  6. johnburk

    johnburk Well-Known Member

    Joined:
    Jun 23, 2006
    Messages:
    241
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
  7. johnburk

    johnburk Well-Known Member

    Joined:
    Jun 23, 2006
    Messages:
    241
    Likes Received:
    0
    Trophy Points:
    16
    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?
     
Loading...

Share This Page