Courting the Masses?

June 3, 2006 / Michael Hampton, creator of the excellent PHP-scripted Bad Behavior spam-fighting software (which, along with Spam Karma, has saved me from numerous junk-comment migraines of a modest but repetitive nature), was slash-dotted a couple of days ago…

Michael Hampton, creator of the excellent PHP-scripted Bad Behavior spam-fighting software (which, along with Spam Karma, has saved me from numerous junk-comment migraines of a modest but repetitive nature), was slash-dotted a couple of days ago. Being that he had submitted the article himself, he admits to having a hand in his server’s subsequent pummelling:

The server started showing signs of trouble fast. By 1:55 am the load average had passed 35. By 2:00 it had passed 50. At one point I saw the load average as high as 112, and I was over 500MB into swap on a box with 1GB of RAM. I noted that accesses were going VERY slowly and realized that neither Apache nor MySQL had had much performance tuning, and could do a lot better than this.

If you run your own web server, or use dedicated hosting, he includes some useful tips on tuning Apache, MySQL and PHP. One of his suggestions however, available to anyone with WordPress, is the use of Ricardo Galli’s WP-Cache 2.0. WP-Cache is a plugin that creates static versions of your most popular WordPress pages, saving the server from parsing dynamic code and connecting to the database each time one of these posts is requested. The plugin’s admin panel allows you to construct rules to determine which pages will be cached. You can also wrap certain functions in comment tags that allow the function (or file include) to be run dynamically within the cached pages (if you use a calendar, report the time, etc.).

So if you’re beckoning the hordes it might pay to take a look at Hampton’s advisory. Good news is that, in light of recent experience, his upcoming Bad Behavior 2 release will now be reassessed to fine-tune the software’s database performance. But for the many ‘Spheroids whose blogs reside in a shared hosting environment, use WordPress, and are secretly courting the masses, WP-Cache may be their only recourse when the legions come howling at the gates.

(PS. This author believes that—despite not using the aforementioned product—DR is quite safe for now, though it must be remembered that the price of freedom is eternal vigilance…)

3 responses

  1. Michael Hampton

    You’re only safe as long as nobody reads what you’ve written, thinks it’s good, and submits it to somewhere. I’m told that earlier today I was on the digg front page, and I DIDN’T submit there. Fortunately the server can now easily handle anything digg can throw at me.

    The lesson here for those of you on shared hosting is this: Your host has likely not made any of these performance tweaks and will be unable to stand up to a large crowd of users coming in all at once. The usual shared-host response to getting /.ed is to suspend your account.

    June 3rd, 2006 at 5:35 pm #

  2. Ads

    You make a good point. I did a little digging through my webhost’s forums: inconclusive on the question of exactly what would happen to a shared account if the owner’s site was hit heavily enough. The vibe I got was that being throttled or taken offline would not be out of the question, although it seems like they are better prepared than most for dealing with the effects of a “full frontal slashdot” (i.e. front page slashdot on a shared account).

    June 3rd, 2006 at 8:08 pm #

  3. Michael Hampton

    Considering that TXD have had people /.ed before, I’m not terribly surprised.

    June 4th, 2006 at 12:12 am #


Zero to One-Eighty contains writing on design, opinion, stories and technology.