Email: 
Blog contents mailed once daily if updated.
Your email address is never shared
Thanks for visiting! If you're new here, you may want to subscribe to our RSS Feed. This blog posts regular updates about my personal insights, covering about me; my relationships, businesses, finances - whatever you can read about me! Go ahead, subscribe to our feed now! You can also receive updates from this blog via email (more RSS Subscription Options above).

BlueHost-WordPress Account Is Exceeding CPU Quota?

October 28th, 2007 by Wai Loong (10 Comments)

Just a few weeks ago, I offered some advices to a few individuals on how to select their first and new domain names. I learn a few of those tricks from several reputable marketers but now Iím seeing some troubles myselfÖNo, and I donít mean this domain nameÖ

You see, Iíve an excellent domain for personal branding. Itís great, and especially itís on ď.comď!

If youíve been a domain hunter, youíll know what I mean!

Unfortunately, branding building is only the first step. The next component of any web service is a reliable and affordable host.

Lately, the web host Iíve been subscribed on is giving me quite a bit of trouble. My eyes popped when the deadly message flashes across my screen for the first time from my web host:

ďThis Account Has Exceeded Its CPU QuotaĒ

?!!!

The InvestigationÖ

Iím no PHP expert – but Iíve tweaked quite a fair bit of unoptimized part of the theme for reasons obvious. Hey, Iíve even upgraded the blog software (WordPress) today, so whereís the real problem?

Feeling helpless, I decided to check the server logsÖ and boy am I surprised to find some nasty reports!

Hereís a snapshot of my investigation:

BlueHost Account Is Exceeding CPU Quota

Filename KB Type Permission
2007-04-28.log 1 KBtext/x-log 0644
2007-08-12.log 39 KBtext/x-log 0644
2007-09-14.log 29 KBtext/x-log 0644
2007-09-25.log 21 KBtext/x-log 0644
2007-10-04.log 109 KBtext/x-log 0644
2007-10-05.log 26 KBtext/x-log 0644
2007-10-07.log 47 KBtext/x-log 0644
2007-10-08.log 25 KBtext/x-log 0644
2007-10-11.log 25 KBtext/x-log 0644
2007-10-13.log 155 KBtext/x-log 0644
2007-10-15.log 44 KBtext/x-log 0644
2007-10-16.log 86 KBtext/x-log 0644
2007-10-17.log 16 KBtext/x-log 0644
2007-10-18.log 15 KBtext/x-log 0644
2007-10-19.log 14 KBtext/x-log 0644
2007-10-20.log 33 KBtext/x-log 0644
2007-10-21.log 29 KBtext/x-log 0644
2007-10-22.log 16 KBtext/x-log 0644
2007-10-23.log 17 KBtext/x-log 0644
2007-10-24.log 54 KBtext/x-log 0644
2007-10-26.log 61 KBtext/x-log 0644

It appears that October 2007 is badly hit. Anyone isnít dumb enough to realize something is wrong since September 2007. Poking further around reveals some gibberish on the latest log:

Fri Oct 26 23:46:13 2007: used 0.45 seconds of cpu time for HTTP Request: www.wailoong.com : GET /about/ HTTP/1.1

I googled around for evidences and I think Iíve found many similar ones faced by people all over the globe. In spite of many feedbacks on the host forum, many were not addressed at all.

SoÖ

Can I conclude that it has something to do with the web host?

How else can you explain, that a light load process such as this one:

Fri Oct 26 23:46:25 2007: used 0.08 seconds of cpu time for PROCESS : /usr/bin/php index.php

be even considered exceeding the hostís CPU quota?

Sourcing For My Next Web HostÖ

I decided to seek out and maybe consider some locally based (Singapore) web hosts. A quick googling reveals some very interesting information:

Rank Hosting Company Market Share Total Domains
1 IPMIRROR.COM 5.0532 % 3,216
2 HOSTULTRA.COM 4.9479 % 3,149
3 WEBVIS.NET 4.9463 % 3,148
4 NETDNS.NET 4.6918 % 2,986
5 CYBER-SITE.COM.SG 4.2283 % 2,691
6 IWI.COM.SG 4.1057 % 2,613
7 READYSPACE.COM 3.2117 % 2,044
8 USONYX.NET 2.7623 % 1,758
9 POZHUB.COM 2.3475 % 1,494
10 ACTIVE-VENTURE.COM 2.2312 % 1,420
11 W3HUB.COM 1.8619 % 1,185
12 NEWMEDIAEXPRESS.COM 1.6043 % 1,021
13 HOSTSOLN.COM 1.5131 % 963
14 SKYDIO.COM 1.3874 % 883
15 ILABS.COM.SG 1.3796 % 878

Top Hosting Companies in Singapore

Sources: Web Hosting Singapore

IPMirror looks interesting enough as Iíve always been on the lookout to do some detective work that reveals where folks register and host their online services. Unfortunately, IPMirror did not reveal critical information such as monthly bandwidth, CPU quota, types of hardware the various plans offer etc.

Whatís the use of telling me that Iím given x number of MySQL databases and disk space? Furthermore, itís a LOT more expensive than most entry shared hosting services anyone can find in Canada and USA.

Hereís a listing of some criteria Iíve gathered from the wisdom of many other experienced guys:

  • Bandwidth. Youíll never know if you need this especially if your site becomes a target of spammers and botnets.
  • SSH access. Secure shell allows you to remotely control your hosted services.
  • No artificially low limits. Hosting is CPU/RAM/Bandwidth/Storage driven. Those should be the limits, not resources like number of MySQL databases, emails etc.
  • Fast customer response time. You can spy and get a feel of the host from existing customers on forums or blogs.
  • mod_rewrite, AllowOverride. This is an Apache configuration on Linux so you can forget about using a Windows IIS web server. If youíre running Wordpress, this is to enable permalinks for SEO.

If youíre interested to research deeper, I highly recommend that you at least take a peek at 2 of Lorelleís blog post that has very constructive discussions:

ó

As I dig deeper, I found 2 web hosts which seem to fit my budget, and they appear reputable (both having at minimum of Pagerank 6, with long business track record on WayBackMachine):

At $20/mth hosting at MediaTemple, it looks great at the first glance. I havenít seriously consider switching to a new web host, but since the cost works out to be similar at BlueHost (slightly more than BH actually), I donít rule out that possibility when it expires in about 160 days.

ASO looks neat too, but Iíll give MediaTemple a shot if Iím not tight on budget.

ó

Wait! Before You Commit To Pay a PennyÖ

Note: This is only relevant if your concern is running WordPress (one of the biggest shot in blog software) CMS.

Later this evening, I did more digging around the Web and found some light for desperate users who are not quite ready to bail out their hosting service. These are plugins you can use on your existing WordPress installation that may shed more light to your problem, and hopefully save you a few hundred bucks a yearÖ

#1: How to Detect CPU hogs cause by WordPress Plugins:

Before you throw in the towel, here is one more step you can take (and itís free!).

Lucia Liljegren has developed a very interesting plugin specifically for WordPress bloggers that can help identify CPU hogs on your installation. Here is a quote from the plugin page:

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.

Since thereís no harm in trying, I got it uploaded and activate itÖ
Following the instructions on the plugin page, I disable all the caches (ĒgzipsĒ) before running the test on my site. I repeated the measurement 3x.

Ah ha!

I was pleasantly surprised that some of my customized code (possibly the ones I modified for SEO) appear to be sucking up some CPU time at the end loops and footer. Now I know where to look out for when I go optimize those code later (Here, I mean when Iím really free since Iím a PHP novice)!

Below are the worst timings Iíve gotten:

Time To Serve in Seconds:

Point: End Header Begin Loop End Loop End Footer
Total Time 0.32 0.33 1.09 1.10
Incremental Time 0.32 0.01 0.76 0.01
Incremental Time Associated with Header only. Most templates: Nothing. Others: Sidebar. Content and comments. Most templates: Footer & sidebar. Others: Footer only.

Resource link to download the PluginHogDetector Plugin

#2: Creating Static versions of your Blog Post/Pages using WP-CacheAny geek (if youíre reading this far, youíre probably one too!) will tell you what a cache is.Because WP is a CMS that serves dynamic pages, itís entirely possible to convert less updated posts or pages to static ones (until cache expiration).

This may help shave a few milliseconds off your host box and hopefully that will earn you 1 more visit.Just imagine if a page gets serve frequently. Itís literally time saving of milliseconds or worse, seconds, if not for the ingenuity of caching designs for cutting down precious processing time!

WP-Cache (now in version 2), as it explains itself, makes your post load faster than the ordinary interpreted codes that comes with any standard WP installation. Hereís an extract from the pluging page:

WP-Cache is an extremely efficient WordPress page caching system to make your site much faster and responsive. It works by caching Worpress pages and storing them in a static file for serving future requests directly from the file rather than loading and compiling the whole PHP code and then building the page from the database. WP-Cache allows to serve hundred of times more pages per second, and to reduce the response time from several tenths of seconds to less than a millisecond.

WP-Cache started from the ďStaticize ReloadedĒ by matt and billzeller. Most of their recommendations also apply to WP-Cache. Current version, WP-Cache2, is a huge improvement over previous versions of WP-Cache.

I downloaded the latest copy, got it installed and activated – all under a minute.

Setting up is pretty fast and you can test itís performance immediately!

So how does it performs?

All I can say is WOW!

Youíve got to see it yourself. This baby now becomes one of the most important plugins in my WP plugin collection.

You can download it all at WP-Cache @ WordPress.org | WP-Cache Pluginís homepage

ó

#3: Turbo Charge Your Blog Post/Pages using WP Super Cache!

If you think WP-Cache is amazing, wait until you see WP Super Cache!

As of now, Iím running WP-Super Cache on my host, attempting to maximize performance.

As the plugin expains it best:

WP Super Cache gets around that. When it is installed, html files are generated and they are served without ever invoking a single line of PHP. How fast can your site serve graphic files? Thatís (almost) as fast it will be able to serve these cached files. If your site is struggling to cope with the daily number of visitors, or if your site appears on Digg.com, Slashdot or any other popular site then this plugin is for you.

Setting up is slightly tricky if you have no access to your Apacheís ď.htaccessĒ file on your server. However, it can be setup in no more than 15 minutes if youíve the right tools and knowledge. The plugin has a detailed readme documentation on how you can setup with it.

Digg is one of the most CPU intensive plugin – according to my own in-house test. A more convincing performance review has been included on the creator of WP-Super Cache.

And if you ever run into trouble, Iím sure youíll be able to find assistance on the plugin homepage.

You can download it all at WP-Super Cache @ WordPress.org | WP-Cache Pluginís homepage

ó

#4: XCache/eAccelerator + WP Super Cache = Super Combo!

As if thereís nothing more you can do, this might be the icing on the cake to really supercharge your PHP code on your host!

Here is what the developer of XCache says:

eAccelerator and XCache are the two most-popular open-source opcode caching engines for PHP, and we highly recommend that any and all hosts use them to improve PHP performance by several folds. In particular, we recommend XCache for best performance.

The update to the WordPress opcode caching plugins brings a very important stability/reliability update to the table, especially for those of you running PHP as a multi-threaded (worker_mpm, PHP as ISAPI, PHP as NSAPI, etc.) extension to your application server (which isnít recommended with PHP!).

To use XCache, youíll need to download XCache and install it on your server first!
Next, you can download this plugin at XCache/eAccelerator Pluginís homepage

Iím still experimenting with this recommendation so Iíll better keep my finger crossed. Until then, Iíll keep this post updated on my further findings!

Unfortunately, the folks at Bluehost does not seem to be happy with users installing XCache onto their severs.† This may become a huge problem for you if you can’t use the WP-Super Cache plugin for some unknown reason.† Here’s the reply I got sometime ago:

Using XCache with BlueHost

ó

To sum it up all:

Dedicated servers are the only real solution to all your hosting problems.

Unfortunately, cost is usually the real consideration factor that pushes us to make sound business decisions. Only by proper evaluations can you ultimately decide based on real reasons why you should move on to a more expensive solution.

I really hope youíve benefited somehow.

Enjoy and do live life with passion!

Posted in Geek Hacks

Other Interesting Writings...

Previous Posts:

Newer Posts:

::Comments::

10 Responses:

1
Darran on October 28th, 2007 at 12:17 pm

If you are interested in cheap webhosting, try computinghost.com I have been on it since May and no problems whatsoever. I am also running WordPress but without any of the plugins you mentioned.

2
Wai Loong on November 4th, 2007 at 10:53 pm

Thanks Darran!
Computinghost.com looks easily attractive for the budget guys and gals! Any idea how CPU utilization is divided on your services?

3
Roger Clemens on November 9th, 2007 at 1:26 am

Just another vote for the XCache plugin, it’s a HUGE performance boost!

4
Wai Loong on November 9th, 2007 at 6:36 am

Roger, I’m hosted on BlueHost and it seems like I need both root and shell access to the server to build from XCache source.

I haven’t apply for ssh access so it looks like there’s no way I can do this myself… unless you can advise on something that I’ve missed out?

Meanwhile, I’m waiting for a ticket reply from the tech support at BlueHost.

5
colbert low on November 10th, 2007 at 11:46 am

this Super cache is still working well on my 2.3 blog at http://www.probloggerwedding.com – thanks for the great plugin

6
Crazy Penguin on January 20th, 2008 at 2:39 am

Bluehost is the only hosting company that has problems hosting WordPress.

Bluehost Blues

7
Wai Loong on January 20th, 2008 at 12:30 pm

LOL! Crazy Penguin is probably right!

Ever since I’ve plugged WP Super Cache, things are a lot better now. However, that does not stop me from sourcing for alternatives before my plan expires in May.

MediaTemple looks great on the surface and it looks professional enough, although it’s a little more than I would pay for hosting on Bluehost. This might force me to consider adding advertisement to offset the added expense. Anyone can offer some wisdom to MediaTemple option?

8
Web Talk on January 7th, 2009 at 5:51 am

Just a quick note. I am with bluehost and i am on a shared server. i had slow queries issue. I installed xcache succesfully and i dont have any issue anymore since then. the guys at bluehost dont seem to care about xcache. i use xcache because, weird to say, super cache increased my slow queries!

9
Andrew on January 14th, 2009 at 4:07 pm

I have tried a bunch of shared hosting companies, but all of them seem to be the same. Unlimited this, unlimited that! Bluehost just goes further then the rest to cut people off! I am looking more and more into cloud hosting, what about mosso, gogrid, uptimehost?

10
http://www.affordableweb-hosting.com on February 1st, 2009 at 4:35 am

Ya there is alot to know about the web hosting industry.And There are a ton of web hosting companies to choose from. sometimes it’s hard to find good information on the web. Thanks for the good input.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

About Insights, Inspirations, Tranquility, Peace and Harmony

Ng Wai Loong

Wai Loong is an electronics engineer by profession. He currently resides in Singapore, a thriving hub at the heart of South-East Asia. When he is not so stress out on the computers or laboratory, he enjoys value reading, jogging at his own pace and blogging in his spare time. Other times, he likes to catch up with some close friends over a cup of latte or teh tarik. As a gift from this friend, you are invited to interact freely with him on his personal blog.

PS: May the person reading this blog transforms his/her businesses, finances, relationships and life for ALL to WIN!