1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How To Tame WordPress CPU Usage?

Discussion in 'Site & Server Administration' started by TrinityZey, Jan 2, 2013.

  1. #1
    My wordpress sites are eating a ton of CPU of my server, and keep getting overloaded.

    Top Process %CPU 120 /usr/bin/php /home/xxxxx/public_html/index.php
    Top Process %CPU 101 /usr/bin/php /home/xxxxx/public_html/index.php
    Top Process %CPU 88 /usr/bin/php /home/xxxxx/public_html/index.php
    Top Process %CPU 65 /usr/bin/php /home/xxxxx/public_html/index.php

    Anyone have tips, or can offer their services, in lowering the CPU usage of wordpress?

    (BTW most sites have W3 Total Cache installed)

    Thanks!
     
    TrinityZey, Jan 2, 2013 IP
  2. MilesGeek

    MilesGeek Active Member Premium Member

    Messages:
    717
    Likes Received:
    11
    Best Answers:
    6
    Trophy Points:
    88
    #2
    Have a check at the database & try optimizing it. If you have already made the changes, check the server usage and the processes running. At times, due to other processes consuming more resources, wordpress files have issues too. Check the server configuration as well.

    If you have access to the server, we will surely be able to help.
     
    MilesGeek, Jan 4, 2013 IP
  3. TrinityZey

    TrinityZey Member

    Messages:
    259
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #3
    I've run analyze + repair + optimize on the databases, but doesn't seem like it helped much.

    Also tried upgrading MySQL, to support multi-core of my server, but that doesn't seem to have helped much either.
     
    TrinityZey, Jan 4, 2013 IP
  4. MilesGeek

    MilesGeek Active Member Premium Member

    Messages:
    717
    Likes Received:
    11
    Best Answers:
    6
    Trophy Points:
    88
    #4
    I have replied your PM. Please check.
     
    MilesGeek, Jan 4, 2013 IP
  5. zacharooni

    zacharooni Active Member

    Messages:
    315
    Likes Received:
    14
    Best Answers:
    2
    Trophy Points:
    70
    #5
    You will want to implement full page caching at the webserver layer, or at the application layer. A plugin such as WP-FFPC might help you. At the webserver layer, you could reverse proxy NGINX to cache for 10 minutes or so, which would alleviate the need to constantly re-fetch data from a database. Yet another option would be to implement object caching with memcache/memcached to keep a cache in memory, which will keep it off the disk, which is the slowest component of any server.
     
    zacharooni, Jan 5, 2013 IP
  6. FutaramaMama

    FutaramaMama Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Did you manage to sort this out? I'd like to know how?

    Is it cuz any of the plugins?
     
    FutaramaMama, Jan 7, 2013 IP
  7. briteday

    briteday Active Member

    Messages:
    358
    Likes Received:
    5
    Best Answers:
    1
    Trophy Points:
    70
    #7
    My experience with such problems led to WP plug-ins where the Developer had encrypted them to protect Buyer from seeing the code. Not sure how much of a problem they would be with caching on (because I did both to deal with situation), but, without caching, each time a visitor comes to your blog, the CPU has to grind to unencrypt the code, even though the plugin may have nothing to do with the presented content! So, such plugins are deactivated if possible when not in actual use. Such plugins are avoided like the plague. And, unless a plugin has real reason to be installed, I get rid of it all together. Been doing that with themes too.

    FYI, the particular Developer that was promoting the plugin I discovered this on was unaware of the problem because... He had his own private server which did not need to share CPU with other accounts!

    Anyhow, my $0.02 based on experience. Good luck!
     
    briteday, Jan 8, 2013 IP