Phoar! What a spike!

I released WP Super Cache 0.5.3 on Friday last. From the stats it looks like people are upgrading which is good news!

This version has a number of fixes and improvements:

  • If your blog is installed in a sub-directory you’ll want to upgrade. This version fixes the mod_rewrite rules that search for the cached files. If upgrading, make sure you delete the Super Cache rules so they’ll be upgraded. (Thanks Otto42)
  • With a click of a link in the backend page you can view your mod_rewrite rules to check that they are ok. This may help the adventurous who want to upgrade those rules manually too.
  • The plugin now warns if your blog’s root directory is writeable. Most of the time there’s absolutely no reason for this so it’s good to be reminded to fix it.
  • Check that $mutex is set. This is really only useful if your server is borked and the filesystem is mounted read-only but it’s good to be complete.

Wondering about the title? Check out this traffic graph Scott Beale posted a few weeks ago and you’ll understand. One of his posts hit the front page of Digg (twice) then Slashdot.org, and was covered by lots of other blogs and media. Wow.

On December 12th our blog hit a record high of 222,523 views in one day.

Best Buy Cease & Desist Traffic Stats

Digg users will love this

Version 0.5.1 of WP Super Cache is now available! This release of the plugin will be especially useful for Digg and Slashdot users who experience really huge traffic spikes.

This post has been dugg! Add your Digg here! I doubt it’ll get anywhere near the front page at this stage as it’s only collected 3 diggs in 7 hours. Once it hits 24 hours it disappears forever.

supercache-directfiles

After submitting a site to Digg, some people do the following to get every last ounce of performance out of their WordPress blog, especially on an underpowered server:

  1. Clear the cookies from their browser so the comment form won’t be filled in. (or use a second browser).
  2. Visit the page they submitted to Digg and save it to their desktop.
  3. Open an ftp programme, and recreate the path to the page. Then upload the saved file as “index.html” to that directory.
  4. Finally, after the Digg subsides 24 hours later, remember to remove the directory structure and index.html.

The new version of WP Super Cache automates all the above. You do have to make your blog’s root directory writable by the webserver, but you’re warned continually that this is a major security risk and reminded to make it read-only again.

Download it here: wp-super-cache.0.5.1.zip

How does it perform versus the regular static files the plugin creates? In most situations you won’t notice any difference, but when there are tens of thousands of requests hitting your server for one particular page, I find that Apache has trouble keeping up.

In other developments, I added checks for PHP safe_mode. Unfortunately safe_mode stops WP Super Cache working properly. I’m glad to see Mark applied my patch for Subscribe to Comments! No more stray emails if you use the moderation queue to approve comments from many posts!

The real way to improve server performance

If you want to improve server performance, the best way is to move as much of the processing off it and onto the client machine. All those visitors of yours are running souped up AMD and Intel CPUs with their big screens and fat harddrives. No wonder your small little hosting plan can’t keep up. Here are some very good ideas from a Slashdot comment I read this morning.

  • Databases can get pretty slow with complicated queries, so upload your database to the client when they load the page and then your database queries are distributed.
  • PHP isn’t very fast, and neither are Perl or Python, so you don’t want to be running them on the server either. Write an interpreter for the language of your choice in Javascript and move your business logic to the client. This will also interface better with the client side database copy.
  • SSL is a performance killer, don’t use it. If you need to send something securely just prefix it with a predetermined number of random letters and numbers, no one will think to look beyond them.
  • Writing to databases can be pretty bad too. Try discarding all your changes, your users might not notice the difference, but they will appreciate the performance gain.

Check out the original post for a few more invaluable nuggets. If you follow all these tips you’ll be well on your way to becoming a respected and l33t hacker.

And now the big news. I’m really excited about this. The next version of WordPressMU will have a special Javascript client-side db (JCSDB) library built in. JCSDB will enable distributed and parallel access to your WPMU db without the danger of harming your servers. The best thing about it? If your site is dugg or slashdotted then your visitor’s machines will handle the load transparently. Instead of using slow and ungainly TCP/IP the library will use super-quick UDP to communicate. It really is the best way of sending data over the Internet.

I expect Matt will roll out JCSDB on WordPress.com just as soon as a few of the final bugs are ironed out. It might be a bit of headache for Barry and Demitrious to administer, but at least we can get rid of at least half our servers and use them to power a massive game of Counter Strike at the next WordCamp.

Update on May 31st! You all thought this was a joke didn’t you? Well, Google Gears has just been released and “is an open source browser extension that enables web applications to provide offline functionality”.

  • Store and serve application resources locally.
  • Store data locally in a fully-searchable relational database
  • Run asynchronous Javascript to improve application responsiveness.

It’s still in beta but Google Reader already supports it by allowing you to download up to 2000 items to read offline. This could be useful when I’m flying to SF next July!

And here's a mirror of that 16 …

And here’s a mirror of that 1660 diary, slightly modified though. hehe

Jan 11, 1660: Not much happening today. Lost one o my kids in the bog.

Jan 12, 1660: Damne bog ate my dog. Off to the pub for a pint.

Jan 13, 1660: Walking back from the pub early this morn, almost fell into the bog.

Jan 14, 1660: Good Lord.. the Mayor fell into the bog. Presumed lost. Kenny Axeblood wants to take over. ‘Aye’ I say.

Jan 15, 1660: God hates our wee village; Kenny Axeblook walked into the bog and disappeared from our sight. We think it’s that woman with the wart. Off to burn her.

Jan 16, 1660: Burnt the witch and threw her remains into the bog.

Slashdot | Larry Rosen on the …

Slashdot | Larry Rosen on the Microsoft Penalty Ruling – good reading.

How do consumers benefit? No, really! by Enry

Both Bill Gates and John Ashcroft talked about how the decision benefits consumers. But there’s nothing really in the decision that changes the way MSFT does business. I can’t call IBM and get a discount on a system without Windows installed, if I load XP onto a machine, MSFT can take it over and install software without my permission, and the APIs can be buried in MSDN, forcing OSS software developers to not only subscribe to MSDN, but also follow whatever licensing MSDN forces on users.

For the most part, this is MSFT business as usual.