Big Bucks Blogger

Lucia Liljegren comments on blogs about making money blogging.

PluginHogDetector Plugin:
Helps you find CPU hogging plugins.

Has your service provider complained you are using too many server resources? This could happen because you have a really popular blog or blogs (like Tricia) or it could happen if you have installed a poorly written plugin that’s a real CPU hog or it could be a combination of both! Regardless of the reason, you can continue to run your blog by paying more for a dedicated server, but that costs big money.


If all your plugins are reasonable efficient and provide essential services, then spending for a dedicated server is well worth the money.But how can you make a lot of money if you waste money paying for a dedicated server just to run a CPU hogging plugin?

Unfortunately, it’s difficult to identify which of the zillions of plugins you use is the hog. Bloggers randomly turn things on and off hoping to find the problem. Now “PluginHogDetector” will at least help you identify the problem.

How to detect the CPU hog!

  1. Dowload PluginHogDetector. Unzip, upload into your plugin folder, activate.
  2. Turn off WP-Cache. Load a page of your blog. (If you are using any plugins that modify comments in any way –for example, a dofollow plugin — I strongly advise you pick a page that displays an article and comments. )

    After you load the page, scroll down, you will find a hideous table that resembles the one below:

    Find the  CPU hog!

    Note the time circled in blue; record it. That’s pretty much the time it took for Wordpress to serve your whole page.

    Reload the page, and record that time again. Do this a third time. That’s probably enough data.

  3. Go to your plugin control panel. Turn off the plugin you suspect might be “the hog”. Reload the same exact page you loaded previously and note the total time to circled in blue. Do this three times.

    Compare these values to the ones you got when the plugin was not running. If the times required when the plugin is running are distinctly higher than those when the plugin is not running, you have found a CPU hogging plugin!

That’s the basic procedure. But you can use other data to help guess which plugins are “suspicious”.

Advanced Troubleshooting.

I’m sure you noticed I provided “incremental times” in the third row of the table? By repeating the procedure described above and recording times in the “incremental time” row, you can isolate where the big jump in CPU is occurring.

Notice the final row in the table suggests which “areas”, like “content & comments”, “header”, “sidebar” or “footer”, where your plugin may be bogging down your blog.

Some plugins do most their work in the header. These include spam filters and a few others. You need the spamfilter, but it’s worth being aware of this fact.

Some plugins do their “heavy lifting” in contents or comments. For example that’s where Kontera Control and Do Follow plugins do their work in contents and comments. If you see the time for comments & contents jumping, you should suspect plugins that do “something” in contents or comments!

Other plugins do their heavy lifting in the sidebar; very few do anything CPU intensive in the footer. If you read the final row, you’ll notice the time sucked up by the sidebar affect the second or the fourth incremental time listed in the row.

Where is your sidebar data? Well, I started writing a four paragraph explanation of template organization, but all you need to know is that, for most templates, the time to load both sidebar affects the last time in the “Incremental time” row. For these templates, the second time in that row will be very, very close to zero, because that’s “time to do nothing”. Notice that time is listed as “0″ in my table? It rarely takes more than 0.03 seconds to “do nothing”.

But what if you don’t see a “0″ or at worst a “0.03″ in that box? Well, you’ve found the time to required to load your sidebar!

What type of plugins run in the sidebar? Well, look at your sidebar. See recent comments? Recent posts? Cloud tags? If a plugin affects something that displays in the sidebar, it could be a sidebar CPU hog.

Quick trouble shooting to identify the “suspicious” plugins.

Now, you can use this information to do some quick trouble shooting. Turn off all your plugins, check the incremental times. Turn all the plugins on. Did the time jump in the “contents & comments” area, or the sidebar? If it’s one and not the other, you now can start guessing which plugins are worth looking at first. That will save you some time testing every single plugin!

Hope this saves you Big Bucks

I hope this plugin helps you find your the plugins that may be hogging CPU at your site. Then you can deactivate and save money by staying with your current low cost hosting serving.

Or, maybe it will help you discover that it’s not your plugins and you will need to get the dedicated server. (In which case, I envy you your traffic!) Or, you’ll discover it’s something else altogether.

Either way, good luck with your blogging. (And let me know if you have any trouble with the plugin.)Tags:

 

If you like my post, please use click orange to subscribe, green to bump or blue to sphinn! Better yet, Stumble using your toolbar. :)


Related Posts:

  • No Related Posts

Comments

36 Responses to “PluginHogDetector Plugin: Helps you find CPU hogging plugins.”

  1. Marisa (2 comments.) on July 20th, 2007 4:35 pm

    I just activated it and ran it a few times. I’m getting good speeds right now. Later, after I get my new theme finished, I’m going to try it again and then I’m going to re-activate some of the plugins that I think may have been giving me problems previously.

    I’ll be sure to give your plug in a good write-up, too!

    Thanks!

  2. Tricia (29 comments.) on July 21st, 2007 3:42 pm

    well my sites are down today so I didn’t get a chance to try out your plugin. GRRRRR I’m so friggin mad right now.

    I’ve written to my hosts support twice and left them a phone message … no reply yet. I need to get my sites back up.

  3. MacBros (3 comments.) on August 1st, 2007 1:19 am

    OMG! You don’t know how handy this will be. I’ve been having them dreaded CPU Exceeded errors pop up on my site.

    I’ll have to download this and test it when I get the chance.

    You should have a list of the plug-ins you found to be resource hogs.

  4. Vlad (12 comments.) on August 1st, 2007 8:01 am

    Lucia,

    I just tried your plugin. I have been having similar problems as Tricia, but my seites would never go down for more than 5 minutes due to CPU issue. I host with Bluehost.

    The plugin showed a total load time in a post with commnets 0.67. This is the time with CGI acceleration feature on- something BlueHost introduced recently. The number is slightly higher than what PHP is configured to. However I am not sure which numbers I should compare plugins data to. Is it execution time or parsing time?

    Thanks in advance for your help.

  5. Vlad (12 comments.) on August 1st, 2007 8:03 am

    Also, could CPU overload be caused by the theme itself???

  6. Vlad (12 comments.) on August 1st, 2007 12:59 pm

    Lucia,

    I thought it would be good if I answered your questions here, maybe others can benefit from it.

    #1 re: parsing time- I am not really a programmer. I was however able to locate info on PHP configuration on my host. That is why I asked the question.

    #2 I am not using widget on my blog, however I am not ware if functions are coded into the theme.

    I think my problem with CPU usage may be related to the fact that I do have other websites in that account (the downside of multiple domains in one account), however my blog is the busiest than the other websites.

    Blogger seems to be an attractive alternative with every CPU related message lol.

    I do think that many people will benefit from your plugin. Great job!

  7. Lucia on August 3rd, 2007 7:03 am

    Thanks Vlad
    I did a little fishing. I think the wordpress time function just looks at the clock and gets the time. I’m not sure I can get more detailed information to find out whether that time was spent parsing (which does take cpu) or computing or what-not.

    For a quick diagnostic, I think this plugin does pretty well for a plugin. (People can also dig through their servers logs to get more information, but some of these plugins can be so bad, you really don’t need to dig to see the problem.)

    You could, for example, read through the problems “Alas a blog” had with most-recent-comment plugin. That plugin was written in a way that worked ok on small blogs, but scaled so poorly, it could just shut any medium sized blog down.)

    Someone asked me privately if a template itself can suck cpu. I’m not sure, but I think generally no. That is to say, when templates consist of the images, ccs sheet etc. the templates don’t hog cpu because all that happens is pre-existing files are served.

    However, these days, when someone gets a template, it sometimes includes “widgets” and / or plugins required to achieve features of a theme. Widgets are generally bits of code that must be processed, all plugins are code that must be processed. If there is a widget or plugin that does anything dynamically every time a page is run, that can hog a lot of cpu.

    So, if you consider a widget “part” of the theme, then that widget may hog cpu.

    On a general note: When looking at CPU hogging features, I usually examine the comments plugins first.

  8. Vlad (12 comments.) on August 3rd, 2007 10:22 am

    I were absolutely correct about plugins that do heavy lifting in the comments area. The bigger number of comments, the heavier lifting, the more resources are used… At least that what I noticed. Since turning on the CGI acceleration I did not see the CPU related notice yet. But I am hanging onto this little plugin! ;)

  9. Lucia on August 3rd, 2007 10:41 am

    Believe it or not one of the reasons I wrote Lucia’s Linky Love was to lower the CPU use! The original Linky Love was a great idea. However, I’d just read Tricia’s problems with CPU use, so I took a look at the plugin and noticed it made 4 databased calls per comment in comments threads.

    That’s more than 4 times to many. In addition to adding features that let the user control things, I also reduced the number of database calls to be 1 for most comment and 0 for some. (Since I’ve already commented on this thread, it “remembers” who I am and doesn’t ‘count’ again.)

    Over the next few weeks, I’m adding

    * an additional time delay option (someone asked. It’s easy. I’ll add.),

    * the option to not follow one selected ‘visitor’s’ comments. (I’m using it for me! I’ll explain why.)

    * the option of only counting the number of comments in the past 1000, 2000 or 3000. (I’ll also check whether this option might save CPU, which would be the intention at older busier blogs. I’m not quite sure if it will or won’t.)

  10. lilian (3 comments.) on August 6th, 2007 6:01 am

    Lucia
    I just installed the plugin and the numbers are confusing to me. I will analyse them step-by-step and hope I can go back to my normal server instead of the VPS I am using now. I will report back. Thanks and shall pass the word around on my make money blog.

  11. Lucia on August 6th, 2007 6:26 am

    Hi Lilian,
    Which numbers are you trying to analyze? You could send me a screen shot and I may be able to explain a bit.

  12. Vlad (12 comments.) on August 16th, 2007 12:02 am

    Hi Lucia,

    Reporting back with more testing….

    You were absolutely right about “widgetized” themes the can hog CPU. I actually thin that DoFollow that I use on my blog does the most damage.

    I even thought that Spam Karma is at fault, but Andy (Beard) assured me that unless my blog is being attacked with 1000s of spams simultaneously, Spam Karma should not cause much of a problem.

  13. Lucia on August 16th, 2007 6:22 am

    Dofollow plugins can be hogs!

    I did some coding to minimize the number of databased calls. I will be wanting to find out how this one is doing on blogs with lots of comments in the archive. There is one minor coding change that may have a big effect on that type of blog. (I don’t know enough to know for sure, so I need to do some testing.)

  14. WordPress: Removing Nofollow Without A Plugin | My Affiliate Journey - Affiliate Marketing Blog by Vlad on August 16th, 2007 7:23 pm

    […] last few days have been testing my website (hopefully when most of my readers were asleep), with Lucia’s CPU hogging detection plugin to find out if any of my plugins hog the CPU […]

  15. Ron Pemberton (1 comments.) on September 22nd, 2007 10:58 am

    Thanks for this plugin. I seem to be addicted to downloading every col sounding plugin I come across. but yours is actually beneficial. I’ve been wanting to weed out some of the plugins I’ve made excuses for having, and i think you have helped me a great deal.Thanks again!

  16. lucia on September 22nd, 2007 1:37 pm

    You’re welcome, Ron.

  17. BlueHost-Wordpress Account Is Exceeding CPU Quota? | Insights, Inspiration, Tranquility, Peace and Harmony on October 27th, 2007 9:12 pm

    […] Resource link to download the PluginHogDetector Plugin […]

  18. monso (4 comments.) on October 28th, 2007 8:55 pm

    Hi,
    Im already activate the plugins but im not see the hide table stated? how can i see it?

  19. Lucia on October 28th, 2007 9:11 pm

    @Monso: Do you mean the plugin hog detector plugin? Or the “Hide Sponsored Categories ” Plugin? If you mean the second, a revised version will be posted tomorrow.

  20. monso (4 comments.) on October 28th, 2007 9:47 pm

    hi Lucia, tq for reply, i mean the hog detector plugin..

  21. Scott Frangos (3 comments.) on October 29th, 2007 12:31 pm

    Hello -
    Thanks for a great plugin. I have been having slow loading issues, and have started a post on the subject — featuring your plugin as a “savior” — at the wordpress forum. See:
    http://wordpress.org/support/topic/141011?replies=2

    I have posted reference screenshots there (showing performance at WebHelperMagazine.com) and suggested others with similar issues do same, so it should be an interesting thread. Right now I am looking hard at the plugin, Configurable Tag Cloud, as a possible resource HOG candidate. Ever heard of that one?

    I think the thread at WordPress will help folks learn to use your plugin to nail the load hog culprits. I plan to write an article on the subject at WebHelperMagazine.com.

    Thanks again for your plugin. Do you plan to put up a donation link?

    Yours, Scott

  22. Scott Frangos (3 comments.) on October 29th, 2007 12:34 pm

    Hi Lucia -

    Hey… just tried to leave a comment, but got a blank page on submit. I apologize if this is a duplicate. I’ll make it brief. Great plugin- thanks (you should put up a donate link). I have set-up a troubleshooting thread featuring your plug-in at:
    http://wordpress.org/support/topic/141011

    I am suggesting people leave screenshots of PluginHog detector running on their sites to help with troubleshooting. I will look forward to your comments and thoughts on that thread.

    Yours, Scott

  23. Lucia on October 29th, 2007 12:38 pm

    @monso: Some blog themes don’t call the “wp_footer();” function. That function puts the finishing touches on the WP layout– and should be called. More importantly, if you don’t call it, plugins can’t load stuff in your footer. So, check to see if your theme calls the function.

  24. Scott Frangos (3 comments.) on October 29th, 2007 1:06 pm

    Hey Lucia -

    I have a problem with your plugin at WebHelperMagazine.com. Seems that it remains in effect even after disabling it under PLUGINS in Admin, and EVEN after deleting it via FTP from the Plugins Directory. It has gotten into my sidebar, somehow, and is displacing elements there.

    Please help.

    - Scott

  25. monso (4 comments.) on October 30th, 2007 4:20 am

    hi lucia,

    my index theme only call this get_footer not the wp_footer . so where i can put the code wp_footer ?

    thanks

  26. Lucia on October 30th, 2007 7:13 am

    @Monso.
    In my blog footer, I put the this:

    <?php wp_footer(); ?>
    </body>
    </html>

    (I hope this shows in comments! Your email is bouncing– if you send me your real one, I’ll send you the exact code.)

  27. monso (4 comments.) on October 30th, 2007 7:46 pm

    hi lucia,
    please send me the code at mrsmthsmth@gmail.com.

    TQ

  28. links for 2007-11-15 at orioa on November 14th, 2007 9:25 pm

    […] PluginHogDetector Plugin: Helps you find CPU hogging plugins. : Big Bucks Blogger 負荷調査用プラグイン (tags: wordpress plugin) […]

  29. » Cleaning Your LAMP - Troubleshooting Slow CMS Issues - Sevenseek Tutorials Blog on November 19th, 2007 1:08 pm

    […] of sites), but in the busy rush of things, I could not “prove” it. This is where the PlugInHog Detector Plugin can help us. I am going to finish this step with a comparison of the table generated when I click […]

  30. Laura’s Daily Life: » Blog Archive » Exceeded CPU quota Error on November 27th, 2007 7:14 am

    […] had some help from Snoskred’s Blog and I tried the Plugin Hog Detector from […]

  31. WebHelperMagazine.com » Blog Archive » WebHelperMagazine.com - Essential tutorials and articles for WebMasters & BlogMasters(new comment) on December 9th, 2007 1:56 pm

    […] of sites), but in the busy rush of things, I could not “prove” it. This is where the PlugInHog Detector Plugin can help us. I am going to finish this step with a comparison of the table generated when I click […]

  32. Ceredigion Car(new comment) on December 10th, 2007 3:27 am

    This really comes into itself when you are getting 400 plus viewers an hour, in which case server resources make or break their impression of your site.

  33. Matt Ellsworth(new comment) on December 13th, 2007 8:36 am

    Interesting. I host on mosso - so I have unlimitd use of the CPU of the server… But that is a great way to figure out what makes your blog lag or load slower.

  34. WebFadds.com » Cleaning your LAMP - Troubleshooting slow CMS issues(new comment) on December 18th, 2007 11:30 am

    […] of sites), but in the busy rush of things, I could not “prove” it. This is where the PlugInHog Detector Plugin can help us. I am going to finish this step with a comparison of the table generated when I click […]

  35. PHP Performance Profiling With APD On Windows | More Than Scratch The Surface(new comment) on December 27th, 2007 2:29 am

    […] insight into the effectiveness of the changes. It’s also worth mentioning Lucia’s PluginHogDetector plugin for WordPress. This works by reporting how long it takes to process various parts of the page. To […]

  36. madCPU(new comment) on February 19th, 2008 9:30 am

    This is one of the coolest WP plugin ever! But does this work for the WP 2.3.3 ?

Leave a Reply




PluginHogDetector Plugin: Helps you find CPU hogging plugins. was posted on July 20, 2007 - Filed Under PluginHogDetector My Plugins |  

 
  • Blog Rush

  • The footer loaded. :)