Here we go!

Polls are beginning to close. Everything I’ve been working on for the last eleven months or so has been building up to this evening. Shaving down slow queries, optimizing perl, writing and improving Chef cookbooks, building custom Debian packages, even some C work. All these things and more were for tonight. We weathered one storm last week. Now, as they say in retail, it’s time for Christmas.

Building Data::Alias on Mountain Lion

It’s a bear. For some ungodly reason I was having a really hard time building perl’s Data::Alias on Mountain Lion just now, where trying to build Data::Alias kept blowing up with errors about RETURN_PROBE. The problem proved to be frustratingly ungoogleable, but eventually I found the solution. Add the line #undef USE_DTRACE" to Alias.xs at some point before #if defined(USE_DTRACE) && defined(PERL_CORE) in Alias.xs, make clean, re-run perl Makefile.PL, make, make install.

Perl Tiered Cache Benchmarks

These benchmarks are for the Perl tiered caching modules discussed here originally. Ruby tiered cache benchmarks shall follow later.

All tests performed on a Xen virtual machine with 512MB of RAM using one core of an Intel Core2 Duo E8500 @ 3.16GHz. The Perl version is 5.10.0 running on Debian 5.0. The remote memcached server is 1.2.5, local memcached is 1.2.2. The modules tested were Cache::Memcached::Fast, Cache::Mmap, Cache::FastMmap, and the custom Cache::Tiered and Cache::TieredFast modules (modules and benchmarking code are here.

The tiered configurations all use a remote memcached server. Cache::Tiered using a local Cache::Mmap cache, Cache::TieredFast uses a local Cache::FastMmap cache, and Cache::TieredLmc uses a local memcached server.

Benchmarking results below the fold. The first set of benchmarks is read-heavy, setting a value and reading it back 50,000 times (and resetting it if need be), the second set of benchmarks set and read a value 50,000 times. The test value used is the zlib HOWTO html file. NB: Right now, with the tiered cache modules, you pass in the memcached or mmap objects you want to use. Eventually, they will make them themselves.

Update:Forgot to add that the mmap files are stored in /dev/shm, but any memory based filesystem should perform the same. Disk-based mmap were not tested, but they don't seem as likely to give the same speed benefit.