Archive for the 'Software' Category

Nov 25 2007

How to run WordPress over ADSL or Cable modem effectively

Published by Jiwei under Software

There are basically three ways to publish your blog with WordPress.

  1. Open an account on a blog service such as http://wordpress.com/. This is the easiest to set up.  But you cannot always customize to your heart’s content and you don’t earn from AdSense.
  2. Run WordPress on your own server at home.  You really emerge yourself in the wonderful world of open source technology and experience the thrill of making money on-line.  Well, it’s pocket changes to start with but you’ll have a chance to grow the traffic and look for the next alternative.
  3. Use a web hosting service such as 1&1, when you reach your stardom in the blogosphere.

If you decide to start with Option No. 2 and have got WordPress going (otherwise, WordPress.org offers everything you need), this HowTo is for you.  If you don’t have a static IP address at home, you can still run your own domain using dynamic DNS, e.g. http://dynadns.org/

This HowTo focuses on running WordPress over your ADSL or cable modem effectively.  ”Effectiveness” here is defined by your readers not noticing that your blogs are streamed over your ADSL/cable modem.  To do so, you have to overcome two hurdles:

  1. Long latency caused by the limited upload bandwidth (normally in the ~650kbit/s range), and
  2. The limited capacity of your home server (a P4 3GHz running at 95% CPU produces 3.5 dynamic pages per second; And an older P3 1GHz produces barely 1 dynamic page per second).

Combining the two hurdles, how bad is the delay to load your home page.  It takes about 1.2~2 seconds within North America. DNS lookup adds a few more milliseconds on top and cross continents delays it further. This is not too bad.  However, if you have AdSense ads along with your blog, it’ll take 5~15 seconds to display a page.  That is eternity on today’s Internet. Readers would have clicked away or turned attention to something else.  Don’t despair. There are ways to overcome the hurdles.

Firstly, why does Adsense slow down the page loading so much?  Because Adsense analyses your page on the fly to find the right AdWords ads and the Reader’s browser waits for the complete page before displaying. Safari browser performs poorer on this regard.  Secondly, if we can reduce the latency in generating the page and the size of the page in transmission, we’ll reduce the latency substantially.  So here is the recipe for the cure.

  • You need to avoid generating the dynamic page twice for Adsense. WP-Cache plugin by Ricardo Galli Granada. http://mnm.uib.es/gallir/wp-cache-2/ gives you the perfect solution. Cached page/post are discarded as soon as you modify it. There’s also WP Super Cache http://wordpress.org/extend/plugins/wp-super-cache/ which improves the throughput even further.
  • All major browsers can handle compressed pages. Your fully loaded home page (normally ~50KB in size) can be compressed to 8.5KB on the fly by Apache/PHP. Hey, this increases your bandwidth and reduces the latency by over 5 times. However, neither WP-Cache nor WP Super Cache tolerates compressed pages. You’ll have to configure your PHP for this task. In your /etc/php.ini file, change or uncomment the line “zlib.output_compression = on” and restart Apache.

How well does your blog perform after these two steps?  The latency comes down to 0.3~0.4 seconds (from previously 1.2~2 seconds) and your readers can enjoy your opinion with AdSense within about a second. This is on par with any major hosting service.

Good luck and have fun blogging knowing that there is no more digital distance between the readers and your blog.

Related

The dsl is an effective way to provide intuitive interface for optimizing the internet connectivity of a basic isp. The underlying technology can aid both the intermediary as well as the high-end in tweaking their broadband networks. These advanced concepts work in collaboration with the related adsl parameters to bring forth the specific dsl connection speed.

  • Digg
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • YahooMyWeb
  • Technorati
  • Google

2 responses so far. Leave a comment

Next »