Courting the Masses?
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…)