How do you lower your CPU usage of your blog?

by TKO
24 replies
Gday Warriors,

A couple of days ago Hostgator took my blog offline because of high CPU load. (I'm a technical moron)

What does this mean?

I had to deactivate a few plug ins to get gator to put my site back online. I need the plug ins I've deactivated.

Solutions anyone?

I've never had this problem in the past. Had a little surge of traffic from digg but I've had larger spikes in the past.

How do I reduce my CPU load? I want to reactivate those plug ins.

Also

Hostgator continued to push a dedicated server on me. Surely i don't need this kind of performance already for a blog that receives about 5-6K uniques a month.
#blog #cpu #lower #usage
  • I have heard of some vBulletins plugins that have used extraordinary amounts of CPU resource, so it's possible the plugin could be the culprit. Or it could also be a brute force attack of some sort. I'm assuming since they told you it was the plugin, they probably checked the error log to see where the drag was coming from, but read on, please...

    Most of the time the dreaded CPU warning is from a host that sells 'unlimited' plans and then oversells them to hundreds of customers on the same server. You didn't really think they would let you put 500 Terabytes on their server and slow everybody else down, did you? If you did, you must not have paid attention on this forum the hundreds of times people said, 'Don't fall for unlimited plans! There's no such thing!' Well, now you know why they say that. :rolleyes:

    Usually, it's your host's way of telling you it's time to upgrade to a VPS or dedicated server, or move your sites somewhere else.

    VPS stands for Virtual Private Server. A VPS provider divides up a dedicated server into only a handful of portions. They provide you with guaranteed amounts of disk space, bandwidth and, most importantly, CPU and RAM resources. The advantage is that even if you reach your max amount of allowed CPU/RAM, your host won't shut you down. The end result will just be a slower loading website when you reach your limit.

    A dedicated server is, of course, more expensive, but has a lot more space, you can do pretty much whatever you want with it, and you don't have to worry about other sites using up your CPU/RAM.
    {{ DiscussionBoard.errors[3883292].message }}
    • Profile picture of the author Mkj
      Wordpress, is very high on mysql queries and cpu usage as are some forums. If you want to avoid such warnings in the future on shared hosting then in some cases it is better to design your site with this in mind. You can run wordpress and some forums - like minibb for example - and not overload the server, but it sounds like you are using wordpress and want to use all the plugins you have deactivated too. Choosing a light and fast loading theme and only using essential plugins that are small and do not bombard the server database can help a great deal.

      Managed VPS or dedicated servers can be expensive or a nightmare if you go it alone and try to look after it yourself. You need to have quite a bit of server knowledge behind you should you decide on the latter.

      Choose hosting from suppliers that are not offering all the nonsense a lot offer - unlimited this or that. Take a look at mddhosting.com for instance. I have sites with them on shared hosting (had a vps as well for a long time too) and the owner will work with you to solve any cpu or server overload problem.

      One of my video sites was getting - before panda update - over 400,000 page loads a day and a huge number of uniques when I was using a vps with mddhosting. I worked my way through the video script and removed all the unnecessary mysql queries that were not really needed and eventually reduced the very high server load to practically nothing yet the script still worked. I then moved off the vps and onto the shared hosting. The site is still going but since the panda update the traffic has fallen a massive amount. But it was receiving as mentioned earlier - over 400,000 page loads - a DAY - on shared hosting! The site is bluesplayer.co.uk.
      {{ DiscussionBoard.errors[3883352].message }}
  • Profile picture of the author mbarty2010
    Have you enabled any Caching plug-ins for your WordPress blog? If not, enable them so that the site is served from a cache instead of crunching cpu every time a new page request is made.

    Originally Posted by TKO View Post

    Gday Warriors,

    A couple of days ago Hostgator took my blog offline because of high CPU load. (I'm a technical moron)

    What does this mean?

    I had to deactivate a few plug ins to get gator to put my site back online. I need the plug ins I've deactivated.

    Solutions anyone?

    I've never had this problem in the past. Had a little surge of traffic from digg but I've had larger spikes in the past.

    How do I reduce my CPU load? I want to reactivate those plug ins.

    Also

    Hostgator continued to push a dedicated server on me. Surely i don't need this kind of performance already for a blog that receives about 5-6K uniques a month.
    Signature
    Free Download : Authority Blogging Course - Know the same methods that I use to make money online with my blog.
    {{ DiscussionBoard.errors[3883301].message }}
    • Profile picture of the author dcristo
      Originally Posted by mbarty2010 View Post

      Have you enabled any Caching plug-ins for your WordPress blog? If not, enable them so that the site is served from a cache instead of crunching cpu every time a new page request is made.
      This.

      If its a wordpress blog, install the wp super cache plugin (or some other good caching plugin).

      I had the same warning from my hosting and this fixed the issue.
      Signature

      Are you wanting to learn all the poker lingo?

      {{ DiscussionBoard.errors[3883458].message }}
  • Profile picture of the author ashbeats
    If a plugin caused a cpu usage spike, you might be able to get more help by contacting the plugin's developer.

    As a developer, I don't see how a plugin can cause serious cpu problems, unless it was performing intense calculations/processing like maybe image conversions, video/audio encoding. If this was not the case, it might just have a bug, where the plugin failed to manage the cpu usage properly or entered an endless loop.

    The developer of the plugin will be able to offer you the best advice. If the plugin needs high cpu resources, then you'd be better off moving to a server that can meet those needs.

    Cheers,
    Ash
    {{ DiscussionBoard.errors[3883344].message }}
    • Profile picture of the author TKO
      The plug in was the YARP one that loads related posts at the end of all posts.

      Its a shame because that plug in increased my page views and also increase the time spent on my site by visitors.
      Signature

      Everything you ought to know about kids soccer can be found in this little community...

      {{ DiscussionBoard.errors[3883363].message }}
      • Profile picture of the author TKO
        I'm also using WP-super-cache and its activated. Didn't seem to help much.
        Signature

        Everything you ought to know about kids soccer can be found in this little community...

        {{ DiscussionBoard.errors[3883365].message }}
    • Profile picture of the author realworldincome
      Originally Posted by ashbeats View Post

      If a plugin caused a cpu usage spike, you might be able to get more help by contacting the plugin's developer.

      As a developer, I don't see how a plugin can cause serious cpu problems, unless it was performing intense calculations/processing like maybe image conversions, video/audio encoding. If this was not the case, it might just have a bug, where the plugin failed to manage the cpu usage properly or entered an endless loop.

      The developer of the plugin will be able to offer you the best advice. If the plugin needs high cpu resources, then you'd be better off moving to a server that can meet those needs.

      Cheers,
      Ash
      I experienced a similar problem and was advised by the host to install WP Super Cache. That seemed to correct the issue.
      {{ DiscussionBoard.errors[3883392].message }}
  • I really don't see how one plugin on one blog could use those kinds of resources.

    However, I do agree that you should always use a caching plugin for WP. It makes the pages load a lot faster for most of your visitors, and takes some of the load off your server, as mbarty2010 mentioned.
    {{ DiscussionBoard.errors[3883360].message }}
  • YARP and SexyBookmarks are the 2 that I hear causing the most problems. If you have a lot of pages, that is.

    I'm betting your problem is with Hostgator, though. Their fine for new sites, but once you start getting any kind of real traffic they either want you to upgrade further or move along somewhere else.

    I've heard this many times about Hostgator and CPU usage, and have seen the exact email you're talking about. Move to a different host, and you'll be able to use YARP just fine.
    {{ DiscussionBoard.errors[3883386].message }}
    • Profile picture of the author Christian Little
      Originally Posted by Bradley J Anderson View Post

      I've heard this many times about Hostgator and CPU usage, and have seen the exact email you're talking about. Move to a different host, and you'll be able to use YARP just fine.
      No you won't. Moving from one shared plan to another won't fix your CPU usage issue, do you even understand how shared hosting works?

      If you are sucking up a lot of CPU, you need to either a) figure out the cause and stop it, or b) upgrade to a more powerful hosting solution.

      Switching hosts won't fix your problem, almost every web host is going to raise the same issue if you just move to them.

      Somebody above mentioned caching, try the W3 Total Cache plugin (link: WordPress › W3 Total Cache « WordPress Plugins). That works extremely well.

      As for why it's doing this...

      Whenever a wordpress blog loads a page, it runs about 25 database queries per page. When you start adding plugins, most of them add 3-5 queries per page view. Some plugins are really horribly coded and add another 20-50 queries per page. So if you are getting 1,000 page views/day and you are running 50 queries per page view, then your one website is running 50,000 mysql queries per day. That is a huge amount for a shared hosting plan.

      If you cannot fix the problem, then you need to upgrade to a VPS like somebody else said above.
      {{ DiscussionBoard.errors[3883443].message }}
      • Originally Posted by Christian Little View Post

        No you won't. Moving from one shared plan to another won't fix your CPU usage issue, do you even understand how shared hosting works?
        I most certainly do know what shared hosting is. I used it for many years.

        Had you read my full response, you would have know that I was saying the problem is probably with Hostgator, not his plugin. Every time I've heard this story it's involved Hostgator and either YARP or SexyBookmarks, and every time the person moved to a different host (shared, btw), nothing was ever mentioned about it again. It seems like a pattern with Hostgator to try and move people higher and higher along the upgrade ladder with these threatening emails.

        I was running at least a dozen blogs on my shared hosting back in the day, and never had a problem one with bitching about cpu or ram usage, but then I wasn't using Hostgator, either.

        As you and I both said, however, if he has a lot of traffic and/or is generating huge amounts of database queries, then he probably needs to upgrade his hosting, anyway.
        {{ DiscussionBoard.errors[3883491].message }}
  • Profile picture of the author seasoned
    TKO,

    Just to make it CLEAR, your original question really couldn't be answered. You FINALLY made it clear you have wordpress. That was a VERY important part of the question. Christian sounds like he knows what he is talking about.

    Shared hosting shares the system with a LOT of people. That can be over a THOUSAND! It works on the premise that almost NOBODY gets many hits, if they ever use their system. This means 2 things! There are VERY few resources in a particular persons piece of the pie, and using even THAT can affect a LOT of people. So your site getting 5000 hits with NOTHING else happening, could be a noticeable drain.

    But Christian is right, WP uses the database a lot, and that makes things WORSE! It is flexible, adaptable, and EASIER for you and your users, but that makes things HARDER on the computer. It is a simple fact of life.

    Hostgator is pushing a dedicated server NOT because you are pushing too hard, but because your site goes above their estimates, and is affecting other sites. Going on a dedicated server gets rid of your ability to hurt someone else because of CPU/DISK load.

    Steve
    {{ DiscussionBoard.errors[3883512].message }}
    • Profile picture of the author joscarff
      I've found wp-W3-Total-Cashe to be pretty useful.
      I fear I'm getting pretty close to that stage in my relationship with hostgator too...
      {{ DiscussionBoard.errors[3883539].message }}
      • Profile picture of the author CatalogBob
        Hostgator just shut one of my websites down, it's WordPress, it has YARPP and W3TC activated and optimized.

        I got straight on to their live chat and within about 30 min they had put my site back up with "restricted" use. Not sure what that means, I'm trying to find out.

        Having read everything here and a few things elsewhere, I think my problem is too many tags (I have eight per post), which slows down YARPP.

        But I suppose the real problem is that it's probably time for me to go with a VPS. My site gets around 100,000 page views a month and is currently on a reseller plan.

        I run about seven other websites off of my reseller account, but none of the others are as busy as the one they just shut down.

        I am generally happy with Hostgator and their support, although I think they really should be warning us before taking these sites down.

        Any advice? Time for VPS?
        {{ DiscussionBoard.errors[5674990].message }}
        • Profile picture of the author Christian Little
          Originally Posted by CatalogBob View Post

          Hostgator just shut one of my websites down, it's WordPress, it has YARPP and W3TC activated and optimized.

          I got straight on to their live chat and within about 30 min they had put my site back up with "restricted" use. Not sure what that means, I'm trying to find out.

          Having read everything here and a few things elsewhere, I think my problem is too many tags (I have eight per post), which slows down YARPP.

          But I suppose the real problem is that it's probably time for me to go with a VPS. My site gets around 100,000 page views a month and is currently on a reseller plan.

          I run about seven other websites off of my reseller account, but none of the others are as busy as the one they just shut down.

          I am generally happy with Hostgator and their support, although I think they really should be warning us before taking these sites down.

          Any advice? Time for VPS?
          You are doing 100,000 pageviews/month on a reseller plan? Consider yourself lucky they didn't shut you down way sooner. That is overkill for a reseller plan. You need a VPS, probably 1GB RAM minimum to handle that, maybe more.
          {{ DiscussionBoard.errors[5675206].message }}
        • Profile picture of the author intenseblog
          Originally Posted by CatalogBob View Post

          Hostgator just shut one of my websites down, it's WordPress, it has YARPP and W3TC activated and optimized.

          I got straight on to their live chat and within about 30 min they had put my site back up with "restricted" use. Not sure what that means, I'm trying to find out.

          Having read everything here and a few things elsewhere, I think my problem is too many tags (I have eight per post), which slows down YARPP.

          But I suppose the real problem is that it's probably time for me to go with a VPS. My site gets around 100,000 page views a month and is currently on a reseller plan.

          I run about seven other websites off of my reseller account, but none of the others are as busy as the one they just shut down.

          I am generally happy with Hostgator and their support, although I think they really should be warning us before taking these sites down.

          Any advice? Time for VPS?
          The same with me a day before, although my website only has about 26,000 page views a month and it's back after I email Hostgator :rolleyes:
          Signature
          Do you want to build an authority website? Visit my blog today and learn everything to create the successful web blog.
          {{ DiscussionBoard.errors[5676341].message }}
          • Profile picture of the author CatalogBob
            The user? Istvan, you can't mean me!

            Hostgator now think it was an attack from one IP address, so I looked it up but it appears to be hidden behind static.cloud-ips.com. But given my traffic now, they do think I should be upgrading to VPS, they suggest their level 4 which is 1.98 ghz CPU and 1344 MB RAM. At $70 a month it's a bit of a jump for me, but it looks like I may have to just do it.

            Incredibly though, they're not trying too hard to sell me the upgrade now that they think it was an attack. I'm still thinking it may be a good idea, I don't want this to happen again.

            Thanks for your advice here, appreciated.
            {{ DiscussionBoard.errors[5677494].message }}
            • Profile picture of the author Christian Little
              Originally Posted by CatalogBob View Post

              I should be upgrading to VPS, they suggest their level 4 which is 1.98 ghz CPU and 1344 MB RAM. At $70 a month it's a bit of a jump for me, but it looks like I may have to just do it.
              You don't have to stick to HG, you can get the same resources or more with a VPS from other companies. Do some shopping around, you can find companies that can offer you that for $50/month.
              {{ DiscussionBoard.errors[5678869].message }}
              • Profile picture of the author CatalogBob
                I'd be reluctant to leave HG, their customer service and support is excellent, although I was mightily cheesed off that they just took me off-line without warning when they did. I was hoping to get away with their $40 a month plan (1.13 ghz and 768 ram) but they, and I think you, are saying that's probably not sufficient for my needs.

                I have had a quick look around, can't really find anything cheaper and I did look at yours too :-)
                {{ DiscussionBoard.errors[5686727].message }}
  • Profile picture of the author Istvan Horvath
    The real problem is quite often the user... Sorry.

    Meaning lots of unnecessary plugins, lots of badly coded plugins. People install all kind of idiotic plugins just because somebody in a forum (maybe right here) posted an even more idiotic list of their "must-have" plugins.

    Most of the plugin users have no idea what is in the code, how good the author of the plugin is and don't even understand how harmful a badly coded plugin can be when it comes about resources. Especially, those plugins that create their own database tables (and nowadays everybody thinks that's a requirement!) but are not able to handle correctly the DB connections. That's where your blog will be screwed royally!

    I used to know many people "around" WP - and I remember brilliant plugins coders making excellent 1 [one] file plugins! They were real coders and developers who understood the intricacies of the WP's database structure and its connections.

    Maybe a serious review of the plugins used is in order...
    Signature

    {{ DiscussionBoard.errors[5675107].message }}
  • Profile picture of the author sunray
    WordPress with plugins is a murder on CPU. Use Drupal with page cash and all your problems will be solved.
    {{ DiscussionBoard.errors[5687163].message }}
  • Profile picture of the author Cataclysm1987
    It means, go to this site:

    Dedicated Server Web Hosting: Powerful Dedicated Servers | 100tb

    And get the hell off hostgator.
    Signature

    No signature here today!

    {{ DiscussionBoard.errors[5687173].message }}
    • Profile picture of the author CatalogBob
      You boys are scaring me. Switch to Drupal! $200 a month for hosting!

      My head hurts.
      {{ DiscussionBoard.errors[5693971].message }}

Trending Topics