Support » Fixing WordPress » Plugins and CPU usage

  • Resolved feelinfae

    (@feelinfae)


    Hello,

    I am having issues with my page load time on the initial visit to the site (www.mysite.com). Once the site loads it is normal speeds on the front end. I am also having issues with multiple users signed on via the backend where they are getting timed out of the site’s backend. However I may have fixed this last issue by upgrading the site’s PHP to version 5.4 (it was at 5.2) and increasing the upload_max and memory limits via the WP config and php.ini pages.

    This is my first WP site and its being used as a CMS.

    According to Google Insights/YSlow Grade, my site got an overall score of 88/89 (out of 100).

    Reading this: http://gtmetrix.com/why-is-my-page-slow.html
    I am assuming my code is good since I have not coded my own plugins and I’m using well rated WP plugins (paid and free), a theme framework (Thematic) and W3 Total Cache.

    According to my web host (BlueHost.com) they are stating that my site is using over 7% of their CPU usage (they have 24 CPUs per server) and due to this over-usage that is why my site takes several seconds to load. They stated it was due to too many plugins on my WP site. I’ve never heard of a host claiming CPU usage and I’ve ran sites that used other programs- granted not WP- but these sites had a huge visitor count and we never ran into this problem with our web host.

    However this is my first WP site I’ve made and I am using a lot of plugins so is the host valid? My host is a cheap, shared ‘unlimited’ host however it is rated as a good WP host according to WordPress.org’s website. This was not a host I picked out- it was the client’s choice. When the host was telling me about the usage issues they wanted me to upgrade to a PRO or VPS account.

    Thoughts? Suggestions?

    Thanks!!

Viewing 15 replies - 1 through 15 (of 26 total)
  • Jerry Bates (jerrysarcastic)

    (@jerrysarcastic)

    Documentation Master

    Yeah, the host could be very valid here. It’s quite possible that one of your plugins is not very well coded and is being a CPU hog. Other possibility is that all of your plugins are only taking small bits, but collectively it adds up to a lot of CPU. How many plugins are you running anyway?

    In either event, I’d recommend disabling all of your plugins (temporarily) and see if that improves things. If it does, the start reactivating one by one until you find the problem plugin.

    Let us know how it turns out.

    JerrySarcastic is definitely right. Plugins have caused my site to get throttled through Bluehost in the past. One thing that has helped me a lot is that they offer a free version of CloudFlare. I would suggest looking into that as well to help speed up your site.

    Thanks all!

    Yesterday I set up the same site on my server (hosted by Justhost which = BlueHost) and set up cloudflare for my site. Testing it prior to adding Cloudflare the same site, on the JustHost server, it had the same rating as the BlueHost site 89/100 (B). After Cloudflare (about 30 min ago) the site went from a B rating to an A rating yet the page load time went from 4.48 sec to 9.16 sec.

    Sigh.

    I have 20 plugins on this site. The site is used as a CMS. Here’s my plugins currently used:

    Paid for versions:
    BackupBuddy
    Featured Articles Pro
    Gravity Forms

    Free versions:
    Add link to facebook
    Ajax event calendar
    Akismet
    Better WP Security
    Fluid Column Layout Shortcodes
    Imsanity
    Mail Chimp Widget
    Really Simple Captcha
    Regenerate Thumbnails
    Simple Google Static Map
    Simple Lightbox
    Social Media Widget
    Ultimate TinyMCE
    W3 Total Cache
    White Label CMS
    WP Smush.it
    WP to Twitter

    So the ones that I can possibly remove are the Google Map, White Label CMS and maybe? regenerate thumbnails? I think my slider may be using that one though.

    Any of these you can think of that may be not needed or a better plugin/less CPU hog?

    Looking at the results of my testing it seems that part of the problem may be that the site has a lot of images that gets loaded when you first go to the website. They have a slideshow of all their available adoptees. So I know that is part of it but that is a must for their website. As they are non-profit moving to a VPS is out of the question.

    Thanks again for helping me figure this out!!

    I would probably suggest BulletProof Security over Better WP Security. I also know that WP Twitter can be a resource hog. If you think that the images is the main problem you may want to look into getting the paid version of CloudFlare. With the paid version they have an image optimizer, they also have something called Rocket Loader. Rocket Loader makes it so everything on your site loads at the same time, instead of just loading one by one.

    Jerry Bates (jerrysarcastic)

    (@jerrysarcastic)

    Documentation Master

    Nope, I wouldn’t do it like that. How can yo be sure you’ve removed the plugin that is causing the issues you’re having? What if the problem plugin is one of the ones you kept?

    The best way to find out is by disabling all of your plugins and see if that improves things. If it does, the start reactivating one by one until you find the problem plugin.

    Even if the problem plugin is one you “can’t live without” it doesn’t mean you can’t find another plugin that does the same job, and use it instead.

    These are my steps regarding testing the plugins:

    I deactivated all my plugins and the load time is faster (1.34s) but I got a lower score (81/100).
    Since it wasn’t loading any images I added back the slideshow first. So I turned on the slider, page load time is 2.40sec and my rating is down to 75/100.
    So I add the W3 Total cache next and get 91/100 and a page load time of 1.77s.
    Next I add back the Better WP Security. I get the same rating but a page load time of 3.35s. Hmm. I deactivate this again and move onto my next plugin.
    I add back BackupBuddy and get the same score and the page load time is 5.09s. Great. >.< and Really? This is touted as THE plugin (besides Gravity Forms) to get! Sigh. Deactivate this plugin and move onto the next one.
    I add Gravity Forms next- same score- and page load time is 1.43s
    Just curious, since the page load went down I added back backup buddy and gee, my page load time is 1.46s. Hmmm.
    So I add back Better WP Security and page load time went up to 3.84s.
    Ok deactivated this plugin and moved on.
    I activated Askismet and my page load time is 3.58s. I deactivate this plugin.
    Just to test the site as is, to make sure I’m not just getting bottlenecking, with only the following activated: Gravity forms, BackupBuddy, FA Pro, W3 Total Cache the page load time is at 1.43s.
    Ok so I move onto the next plugin.
    I activate the Ajax calendar and my score moved up to 91/100 and my load time went up to 3.16s.
    Frustrated I waited a min and tried again and hmmm… my score went back down to 89/100 and my load time went down too, to 1.69s.
    Sigh.
    Now I wonder if my other plugins that increased it are really the issue or if its just bottlenecking while I check.

    I will keep playing with the plugins but any thoughts as to what I’ve been doing as of now?

    Is what I’m getting bottlenecking or a real test of a plugin causing page load time increases?

    Is there another tool I should be using to really see which one(s) are causing CPU spikes? I’m only using http://gtmetrix.com website.

    Thanks again!

    Jerry Bates (jerrysarcastic)

    (@jerrysarcastic)

    Documentation Master

    I’d leave caching plugin out of the mix, as it tends to throw off the results. Was it off during all the tests above, or did you keep it on during the subsequent plugin tests you tried?

    Also, you don’t happen to have “rock bottom” hosting, do you? As in a super-cheap plan or similar… WordPress needs resources to operate, and cheap hosting plans usually has insufficient resources allocated to it’s customers. You may want to consider upgrading to a beter plan if you happen to have their lowest tier.

    I had this same issue (with a different hosting provider) and upgrading to a better plan solved the issues my client was having immediately.

    Anyone from Bluehost want to chime in here?

    Yes its the rockbottom “Unlimited” BlueHost plan with the free Domain that my client already purchased before asking me to work on a site for them. I didn’t like that they went to them in the first place because I don’t like going with an “unlimited” host company. I decided to move my host to JustHost (which is BlueHost in another guise- verified by BlueHost associate) when I started making their site so I had a similar site to work with. I get the same issues with this host. In fact, I can’t even get a ping off of either of them- they time out. So yeah, I’m already looking for new providers too. However I didn’t want to move them and run into the same issues with another host. I have to keep it to a cheap host since they are non-profit. LOL, so any host recommendations I’d take too!

    I had the caching plugin on the entire time since step 2. It was the 2nd plugin I installed. I’ll try retesting w/it turned off.

    Thanks again for everyone’s help! You guys are very much appreciated!!

    Ok, so I just started testing again and with ALL plugins off I get a page load time of 4.27s with a very wide range between Yahoo and Google scores. Yahoo gives it 90 and Google 81. (Its only ever been 1 # off)

    Gave it about 2 minutes and retried it again and score this time is 85 and 81 with a page load time of 1.69s.

    Sigh, I’m starting to just think its the host or is it something different?

    Thanks again for any insights you guys/gals have!

    Ok Bluehost and it’s sister companies block pings for security reasons, so that is why you can’t ping the servers. I personally use Bluehost, and I am on their basic package (the lowest tier). Generally speaking I don’t have to much of a problem, but it really does depend on the site I am making. You do want to remember Bluehost is a shared hosting company. This means you are going to have hundreds of customers on one server. You do get what you pay for. That being said, personally I think they are great for what I am looking for.

    I would suggest using a different speed tester though. I would use

    http://www.webpagetest.org/

    That site will actually tell you how long until the first byte is delivered. This will let you know how quickly Bluehost/Justhost is responding to requests. If it is anything more than .75 seconds you can probably be sure their server is under a heavy load. That way you can see if that is the problem.

    Jerry Bates (jerrysarcastic)

    (@jerrysarcastic)

    Documentation Master

    Yeah, I’d suspect the host in this case as well.

    Have you tried deactivating your theme and switching to a default theme like Twenty Eleven? Plugins are the usual culprit here in CPU spikes, but I’d quickly rule out the theme and the plugins (I.E. run a bare wordpress site without options turned on) and see what effect that has.

    Just be sure to run a mySQL database backup… when switching themes sometimes you need to re-deploy the widgets again. If you have a lot of widgets to rebuild, it’s easier to just restore to the previous (backed up) mySQL database instead of doing it all over again by hand.

    Thanks both of you!

    I did change the theme at one point while testing but not with this round of tests.

    I’ll do these steps you’ve listed and use the other site provided and let you know how it goes!

    Re: Shared hosting. I’ve always used shared hosting (just never one that is listed as unlimited- and I don’t like using my host for my domain provider) but this is the slowest one I’ve/my clients’ have ever been on. Even retrieving emails are super slow (and that’s on both my JustHost and my client’s BlueHost account). My account is all of a one page, static page and the rest of the stuff on my account are all my test/ in progress sites. So I personally feel part of it is the host as I’m already having frustrations with retrieving emails. However this host has been, for the most part, polite and knowledgeable when I’ve called them. So it really is too bad that I’m having issues with service. I always like a host that has good customer service.

    bhpress here’s the info from the web site you provided me. Great site, BTW 🙂

    W/out changing my theme but with no plugins activated this is what I get:
    Ratings: F, A, A, A, F, X
    First View:
    Load Time: 5.309s, First byte: 2.429s, Start Render: 3.849s
    Doc Complete info:
    Time: 5.309s, Requests: 23, Bytes in: 337KB
    Fully Loaded:
    Time: 8.948s, Requests: 50, Bytes in: 724KB

    Repeat View:
    Load Time: 1.819s, First byte: 0.771s, Start Render: 1.442s
    Doc Complete info:
    Time: 1.819s, Requests: 9, Bytes in: 7KB
    Fully Loaded:
    Time: 2.356s, Requests: 10, Bytes in: 10K

    With Twenty Eleven activated as the theme- no plugins activated:
    Ratings: D, A, A, A, F, X
    First View:
    Load Time: 2.614s, First byte: 0.795s, Start Render: 1.526s, DOM Elements 163
    Doc Complete info:
    Time: 2.614s, Requests: 7, Bytes in: 118KB
    Fully Loaded:
    Time: 2.614s, Requests: 7, Bytes in: 118KB

    Repeat View:
    Load Time: 2.322s, First byte: 0.795s, Start Render: 1.201s, DOM Elements 163
    Doc Complete info:
    Time: 2.322s, Requests: 6, Bytes in: 99KB
    Fully Loaded:
    Time: 2.322s, Requests: 6, Bytes in: 99K

    So is this my theme or the theme AND the host? Or does the theme not play too much into this? I haven’t tried just a barebones WP site yet.

    UGGH the thought of doing a new theme is killer! I’m using a child Thematic theme.

    Thanks for your help! At this point I’m not sure what is the real issue.

    EDIT: Added what the site is currently doing – everything as is with my theme and Twenty Eleven:
    LIVE SITE (everything as is- my theme):
    Ratings: F, A, A, B, A, X
    First View:
    Load Time: 14.404s, First byte: 2.606s, Start Render: 12.162s, DOM Elements 624
    Doc Complete info:
    Time: 14.404s, Requests: 114, Bytes in: 1,953KB
    Fully Loaded:
    Time: 14.585s, Requests: 115, Bytes in: 1,954KB

    Repeat View:
    Load Time: 3.360s, First byte: 2.144s, Start Render: 2.382s, DOM Elements 624
    Doc Complete info:
    Time: 3.360s, Requests: 2, Bytes in: 17KB
    Fully Loaded:
    Time: 3.660s, Requests: 3, Bytes in: 20K
    ***************************
    With Twenty Eleven and all plugins activated:
    Ratings: F, A, A, B, A, X
    First View:
    Load Time: 17.748s, First byte: 2.721s, Start Render: 14.607s, DOM Elements 563
    Doc Complete info:
    Time: 17.748s, Requests: 90, Bytes in: 1,588KB
    Fully Loaded:
    Time: 19.288s, Requests: 101, Bytes in: 1,735KB

    Repeat View:
    Load Time: 3.511s, First byte: 0.369s, Start Render: 0.549s, DOM Elements 563
    Doc Complete info:
    Time: 3.511s, Requests: 2, Bytes in: 16KB
    Fully Loaded:
    Time: 3.789s, Requests: 3, Bytes in: 19K

    So with all of these numbers I’m thinking this isn’t really my theme (I’m hoping) and I just need more oomph from my host.. would you all agree or is it that I need to change what I’m using?

    Again, I really appreciate your help!!

    Jerry Bates (jerrysarcastic)

    (@jerrysarcastic)

    Documentation Master

    Well, things get pretty bad once you switch on your plugins, so I’d want to isolate which one is the culprit there.

    As for the theme vs. host issue, I’m going to say it’s a little of both. Without a link to your site (and an idea of how complex your theme is) it’s a little tough to know which is the greater of the two, but in any event, you need to focus on your plugins first.

    If you can afford a little better hosting, I say go for it. You’ll get more resources, which almost always leads to an improvement in site performance, and it is never a bad idea to get as much as you can afford.

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘Plugins and CPU usage’ is closed to new replies.