WordPress.org

Forums

[resolved] Plugins and CPU usage (27 posts)

  1. feelinfae
    Member
    Posted 2 years ago #

    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!!

  2. 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.

  3. bhpress
    Member
    Posted 2 years ago #

    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.

  4. feelinfae
    Member
    Posted 2 years ago #

    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!!

  5. bhpress
    Member
    Posted 2 years ago #

    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.

  6. 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.

  7. feelinfae
    Member
    Posted 2 years ago #

    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!

  8. 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?

  9. feelinfae
    Member
    Posted 2 years ago #

    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!!

  10. feelinfae
    Member
    Posted 2 years ago #

    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!

  11. bhpress
    Member
    Posted 2 years ago #

    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.

  12. 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.

  13. feelinfae
    Member
    Posted 2 years ago #

    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.

  14. feelinfae
    Member
    Posted 2 years ago #

    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

  15. feelinfae
    Member
    Posted 2 years ago #

    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!!

  16. 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.

  17. feelinfae
    Member
    Posted 2 years ago #

    Thanks Jerry!

    I'm almost done for today so I may not work on it until tomorrow (or later tonight) but I will def. test out all of my plugins. Hopefully its just one plugin, and one I can get rid of or change it :)

    For my theme I'm using a child theme of Thematic and pretty much its that theme with the main change being the navigation menu. Otherwise, its that theme's settings on the majority of the site. No comments allowed and posts are there primarily to post pics of their adoptees which works with there slideshow. Otherwise, its a site with static pages. The worst thing is that there are a lot of images as they have a lot of adoptees. I added the Smush.it plugin and the Imsanity to prevent them from uploading large images/compress their images and its using the standard WP image settings (thumb, med, large, original). I really just tried to make it as simple and with the least amount of stuff that I could, but apparently I have a lot of plugins :(

  18. As a "gold standard" I like to test http://twentyelevendemo.wordpress.com/ which is on as optimized an environment (hosting) as possible, and runs no 3rd party plugins.

    How they rank in WebPageTest is not too far off from how yours is, when you turn everything off.

  19. Try to narrow it down a bit and find which plugins are being the hogs, and see if you can work around not having them, or find alternatives that offer similar functionality.

    At the same time, it wouldn't hurt to treat your site to something other than "basic" hosting either. None of the plugins you list above give me any red flags in terms of quality, but in combination I bet they might need more resources to function properly.

    Most basic offerings can barely be described as adequate for all but the most simplistic of WordPress sites, so your just might be pegging the meter, so to speak, even though you're doing your best to keep it simple.

  20. feelinfae
    Member
    Posted 2 years ago #

    Hi Jerry,

    So... the real hog is my slider. Not really a surprise since that's when all my images load. And this one I cannot be without. It took me ages to find a slider that did the features I needed and that worked with WP. Plus its already paid for. Sigh.

    There are some others that are sort of hogs which are:
    White Label CMS
    Imsanity

    Now I can remove the CMS but as they use lots of images and they are uploading from the full, uncompressed file I do need something to really squish their images.

    With that said, running the report with all plugins except the slider and the cache turned on (using my theme) this was my results:
    Ratings: F, A, A, A, F, X
    First View:
    Load Time: 4.630s, First byte: 1.169s, Start Render: 2.747s, DOM Elements 257
    Doc Complete info:
    Time: 4.630s, Requests: 49, Bytes in: 427KB
    Fully Loaded:
    Time: 7.803s, Requests: 76, Bytes in: 819KB

    Repeat View:
    Load Time: 2.857s, First byte: 1.137s, Start Render: 2.335s, DOM Elements 257
    Doc Complete info:
    Time: 2.857s, Requests: 46, Bytes in: 16KB
    Fully Loaded:
    Time: 2.857s, Requests: 47, Bytes in: 18K

    Now these (above) numbers are LOWER on first view than my test with all plugins turned off. You'd think this number would be higher.

    The slider only is:
    Ratings: F, A, A, B, F, X
    First View:
    Load Time: 10.482s, First byte: 1.190s, Start Render: 9.306s, DOM Elements 597
    Doc Complete info:
    Time: 10.482s, Requests: 93, Bytes in: 1,486KB
    Fully Loaded:
    Time: 10.482s, Requests: 93, Bytes in: 1,4865KB

    Repeat View:
    Load Time: 5.274s, First byte: 1.113s, Start Render: 3.419s, DOM Elements 597
    Doc Complete info:
    Time: 5.274s, Requests: 86, Bytes in: 27KB
    Fully Loaded:
    Time: 5.274s, Requests: 86, Bytes in: 27K

    So... If I move hosts will this allow this plugin to load faster or do I need to do something more with the images?

    Thanks again!

  21. I think the variability of your test results points to the fact that you need better hosting. You're on a "basic" plan now, right? These numbers are significantly lower than yesterday, when you tested the same loads (theme and plugins) if I'm not mistaken, yes?

  22. At the same time, I'd also look to try and remove the number of slides I'm loading, which can be a big factor.

    How many slides to you load now? 3-5 is about the max, in my book. Do what you can on your end to reduce load on the server first. There is no such thing as a site that is "too lean" and "too fast" I say! :)

  23. feelinfae
    Member
    Posted 2 years ago #

    Hi Jerry,

    Yep, I didn't make any changes to the plugins except what was turned off or on when doing the testing. Looking for a new host but not sure what to look for regarding CPU usages. Any thoughts?

    Yeah 3-5 slides would be great but they wanted to show all of their available adoptees on the main page ... I think they have like 25 pets on the slideshow right now :(

    So, is there any code I can do to load the site first then the images? I'm thinking that it's not loading the site until all the images are loaded first. Does that make sense? I'm not a PHP coder so if there is something that does this can you point me in the right direction on where to look?

    Thanks!

    I will also ask the slider developer if he has any suggestions too.

    Again, thank you, thank you, thank you both for helping me!!

  24. Wow, 25 slides is ridiculous! I'd recommend leveling with your client so they understand the repercussions of what they're trying to accomplish.

    With that many slides, there is only so much that better hosting will get you. The site will need a very fast host, but the user will also need a very fast internet connection on their end just to download all that data. If they're coming from a mobile device, or on a crowded public wi-fi connection, that site would take FOREVER to load, for example. Hosting can never truly fix that issue.

    Every website is a balancing act between speed and features. Your client needs to decide if 25 slides is really worth having a site that is slow, will cost a lot of money to host, will frustrate visitors, and may lead to people bailing before the page has finished loading.

    I'm not above "bullying" my clients a bit if need be, just to save them from themselves. This sounds like one of those situations IMHO.

  25. feelinfae
    Member
    Posted 2 years ago #

    I will talk to them but if I cannot talk them down and other suggestions?

    Is there a way to load the page 1st, then images 2nd? Or more specifically a way to load those in the upload file last?

  26. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    An easy solution will be to show a single image on your homepage (or a link there) and redirect the visitors to a page like this. You can even have more images. But it is built using old style tables and can work well even in your front page with all the images. Have a look at the page. If you like the idea, you can go ahead with it. It is simple and easy.

  27. feelinfae
    Member
    Posted 2 years ago #

    Marking this as resolved.

    Changed slides to 12, same issues, no difference. Turned off slides completely. Same issues, very little difference. Tried it on another version of this family of hosting companies with a new, unvisited, private bare bones basic WP site = SAME ISSUES! Switched to Host Gator and I don't have these issues anymore.

    So this was a hosting problem.

    FYI: the hosts with the issues were BlueHost and I also tried JustHost (which is the cheaper version of BlueHost).

    What irks me is that WordPress.org advertises BlueHost as being a good choice for WP sites. I'd have to very much disagree. Tried on another "BH" site, JustHost, and had the same issues on an unvisited, very basic WP site (with about 3 plugins installed). I'd personally recommend anyone interested in a new hosting company that has a WP site to stay away from this family of hosting companies.

    Re: Host Gator I've been monitoring three WP sites I have under one account- the one I first brought up in this discussion as well as another one with the same amount of visitors (around 6-7K a month) and a testing WP site. These are all on the same HG account. My first bite averages from C - A. Much better than BH or JH. My CPU usage is non-existent on HG where I was getting throttled on BH and JH. The "C" rating is due to being on a shared server however it is not my account that is causing the slow-down. Whereas BH was telling me I had to upgrade to their PRO version. HG has better settings for a WP site (like memory usage and file size) unlike BH or JH. Anyway, just posting this for those that may have run into the same issue with the BH family of hosting companies. I hope it helps!

Topic Closed

This topic has been closed to new replies.

About this Topic