Scale and speed and spam

Obligatory Laugh-and-head-shake digression: I’ve been fighting email spam for 12 years plus, and I still see stupid spammers – pardon the tautology – indiscriminately junkmailing abuse@  role addresses. Idiots. Why not just offer crack to a cop?

With that thought out of the way…

Mike McGrath’s memcached plug prompted me to give it a go here, for well, two reasons.

a) I’ve had some (good) experiences in the workplace with it – it’s a boon for database intensive web apps especially and b) because I can and it’s there (which is always a good reason in my ever humble view)

Memcached itself is always a fairly simple install for Fedora – Install via yum (including memcached-selinux if you’re running SELinux – and if you aren’t why not! :-)), give it some options via /etc/sysconfig/memcached eg. CACHESIZE=”64″ (at home, usually “1024” at work because their app is a lot heavier) start it up and point clients at it.

WordPress was a touch trickier – there isn’t an “official” WordPress plugin, with a client available buried in WordPress Plugins version control ( – which has worked well – if you’re reading this it’s not killed my blog.

To install, grab the above file(s) and drop the object-cache.php file in /usr/share/wordpress/wp-content, set “WP_CACHE” to “true” in wp-config.php and you’re most of the way there.

On the server side, memcached-tool’s “stats” command should start seeing increases in cache hits/misses and cached object numbers.

Adding Andy Skelton’s batcache plugin can help to fine-tune what and how it caches – it’s functional but not as “click-and-drool” as many WP plugins, but how much tweaking do you need to do really?

Drupal was a similar adventure I’ll go into elsewhere; there’s a reasonably simple to install plugin from – download, drop into /etc/drupal/all/modules, configure and enable –  and the results just as good.

I was surprised to find related Perl packages not in the main repository (Other major languages are covered – my workplace couldn’t survive without the Python bindings :-)) so I whipped up a package of Cache::Memcached 1.26 (also for RHEL/CentOS) on my own repository, plus I’ll be uploading it for review for Fedora proper[2] as a Perl-using systems admin it’s just too useful not to have (monitoring / stats-gathering scripts for a start :-))

In my continued masquerade as a web developer/SEO maven (which isn’t fooling anyone, I know!) I’ve spent too much time looking at analytics to the point of my poor old eyes turning square and developing line graphs burnt in to my retinas.

At least that’s been a little successful. I have one sticking point in the development side, which is avoiding / dumping web form spam. I could use CAPTCHA but I forsee a lot of visitors finding it off-putting, which is undesirable (it’s for my girlfriend’s business venture). I could use Akismet but that seems more suited to blogging, alas (and I’d need to package the PHP PEAR apps for it anyway).

I’m welcome to other suggestions as always.

[1] well, if you’re not reading Planet Fedora via an aggregator anyway..
[2]  Update at 9:07pm AEST: Bug #504403 if someone is keen.

3 Replies to “Scale and speed and spam”

  1. I’m a GNOME user myself but still I’d hardly say it’s being victimised by Fedora – Rex Dieter (amarok’s package maintainer and one of the benevolent overlords of the Fedora KDE SIG) has been pushing updates to this quite regularly to fix bugs / regressions coming from the upstream releases.

    This isn’t the old Bero/no-love-from-Red-Hat days – KDE users are quite passionate about their desktop and apps, and the KDE SIG members and packagers “eat their own dog food” and thus care greatly about the quality of their work – trust me bugs that you see affect them too.

    Have you asked around the mailing list, IRC channels (#fedora on about your problem? Tested any new, pending package releases via Fedora’s Updates System site? If it’s a bug submitted to Bugzilla?

    If you have an issue that needs to be fixed then send something with some helpful detail to the right people. Vague claims of vicimization aren’t helpful – tell us what problem needs to be solved!

  2. Web form spam? That’s my specialty. How about a solution that not only eliminates the need for a CAPTCHA but works with WordPress, Drupal, MediaWiki, or some random PHP script you found on the net somewhere (or more likely whipped up in 10 minutes while heavily caffeinated)? You can find a SRPM here if you want to play with it.

    As for memcached, I decided not to go that route to improve performance on my web server running a bunch of WordPress sites; I’m using php-eaccelerator, wp-super-cache and nginx. After using nginx for a year or so, I’m firmly convinced Apache can go to hell. (nginx supports IPv6 since 0.7.36.) Memcached has its place, but if you can avoid hitting the database or interpreting and running PHP code at all, then you’re ahead of even what it will give you.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.