return to OCLUG Web Site
A Django site.
October 28, 2011

Dave O'Neill
dmo
blog
» Drives with 4k sectors

I have a new disk that uses 4kb sectors. Unfortunately, on the system it's installed in, none of the partitioning tools deal with this automatically, leading to near-guaranteed misalignment and slower performance, or so says the Googled results (JFGI yourself... I'm too lazy to paste the links here). So, here's what I did:

more

December 9, 2010

Dave O'Neill
dmo
blog
» Fun With Perl, Dynamic Linking, and C++ Exceptions

I'm hacking on some tools that use the Search::Xapian module to build up search indexes. It's an excellent Perl interface to Xapian, but unfortunately it seemed to be too slow for our purposes. Tracing our code showed that much of the slowness was in passing data back and forth between Perl and the C++ library for every call.

I decided to write my own XS module to speed things up. Instead of using Search::Xapian, I'd bundle everything up into a Perl datastructure, and pass it down to libxapian through my own module, once, and do all the indexing work in C++. This worked great -- until I started trying to do some exception handling.

more

May 22, 2010

Dave O'Neill
dmo
blog
» Migrating issues from Google Code to Github

I'd much rather use Git over Subversion, but I still have one project (leaguerunner) using Subversion on Google Code. Migrating the code itself to git is fairly simple, but being unable to migrate the issues still needs some tool development.

more

March 11, 2010

Dave O'Neill
dmo
blog
» WIND mobile towers in Ottawa

You may have heard that WIND Mobile is going to be offering service in Ottawa shortly. I got curious as to what their coverage might be and started looking for coverage maps. I didn't find any, but I ended up graphing their wireless backbone instead.

more

February 25, 2010

Dave O'Neill
dmo
blog
» Perl module for detecting virtualization

A while back, I posted about detecting virtualization on Linux from a shell, using various tricks. Around that time, I also implemented those tricks as a perl script for internal use at work with the intent of eventually cleaning it up for public consumption. I finally got around to doing it, and the result is Sys::Detect::Virtualization availabe from CPAN, or from GitHub.

Currently, it can only handle Linux, and is only tested on a small number of virtualization hosts. Patches are welcome.

September 23, 2009

Dave O'Neill
dmo
blog
» Thinkpad Voodoo Zombie Resurrection

Today, my Thinkpad T61 decided to stop working. While I was in the middle of reading email, it just stopped. Completely blacked out -- no AC light, no battery light, nothing. Here's how I got it working again.

more

July 14, 2009

Dave O'Neill
dmo
blog
» VServer and 127.0.0.1

I recently moved our automated testing systems from a KVM+Qemu setup to Linux-VServer. We didn't need the overhead of a full virtual environment, even one as lightweight as KVM. However, there was a little snag -- 127.0.0.1 didn't work correctly.

more

May 17, 2009

Dave O'Neill
dmo
blog
» Converting vimblog to ikiwiki

Until today, this blog ran on vimblog, a hand-rolled minimal script for displaying blog entries. In the last year or so, though, I've become a convert to git, and so what I really want to do is edit my posts on any system, commit them to a git repository, push to a remote and have them end up as blog entries on my server. Fixing vimblog to do this would have been more work than I want to deal with, but thankfully ikiwiki exists, and can do most of what I need.

So, as of now, this blog is in ikiwiki. To get there, I followed (more or less, since I'm documenting after-the-fact) these steps:

more

May 1, 2009

Dave O'Neill
dmo
blog
» Benchmarking BDB, CDB and Tokyo Cabinet on large datasets

At my job we have need of a high-performance hash lookup database in our antispam product. It's used to store Bayes tokens for quick lookups on individual scanning systems, and is read-only in the fast path (mail scanning) with updates taking place in another process. For the last few years, we've been using a plain old BerkeleyDB hash database via Perl's DB_File, but with all the hype about Tokyo Cabinet and its benchmark results I figured it was time to take a look.

[Read More]

» Benchmarking BDB, CDB and Tokyo Cabinet on large datasets

At my job we have need of a high-performance hash lookup database in our antispam product. It's used to store Bayes tokens for quick lookups on individual scanning systems, and is read-only in the fast path (mail scanning) with updates taking place in another process. For the last few years, we've been using a plain old BerkeleyDB hash database via Perl's DB_File, but with all the hype about Tokyo Cabinet and its benchmark results I figured it was time to take a look.

more

April 6, 2009

Dave O'Neill
dmo
blog
» How to detect virtualization

Frequently, our customers want to install our software in a virtual machine. This can be OK, but frequently they hit a CPU, memory, or IO limit caused by running in a constrained virtual environment. When this happens, we really like to know if they're running under virtualization when we try to support them. Here's some tricks to detect, from a shell, if the system is virtualized.

[Read More]

March 6, 2009

Dave O'Neill
dmo
blog
» Fixing the name of App::Ack on Debian

ack is a great "programmer's grep" tool. If you don't already use it, check it out. Now, ack is packaged as part of Debian Testing (Lenny), but unfortunately there's a name conflict. Debian already ships a Kanji code converter named ack, so the ack that I want gets renamed to ack-grep.

I want to run 'ack' on all my systems, not 'ack' on some and 'ack-grep' on others, so I abused Debian's 'alternatives' system to let me do this with:

    update-alternatives --install ack ack /usr/bin/ack-grep 100

And voila, it creates me a /usr/bin/ack that Just Works, and is known to Debian so future packages won't (I hope) break that symlink.

October 9, 2008

Dave O'Neill
dmo
blog
» Configuring bind9 in a chroot, lenny version

A while ago, I blogged the chrooting of bind9 on Debian, so I wouldn't forget how to do it. Things have changed slightly for Lenny, so here's the update.

[Read More]

» Configuring bind9 in a chroot, lenny version

A while ago, I blogged the chrooting of bind9 on Debian, so I wouldn't forget how to do it. Things have changed slightly for Lenny, so here's the update.

more

September 10, 2008

Dave O'Neill
dmo
blog
» Perl test output in a temporary vim buffer

I recently came across a Vim tip explaining how to display shell commands in a different buffer. While useful, it opens a separate scratch buffer every time you run the command. I wanted to make it reuse the same scratch buffer, so that whenever I ran my unit tests using it, they overwrote the previous run's output. As it turns out, Vim has a way to do this.

[Read More]

» Perl test output in a temporary vim buffer

I recently came across a Vim tip explaining how to display shell commands in a different buffer. While useful, it opens a separate scratch buffer every time you run the command. I wanted to make it reuse the same scratch buffer, so that whenever I ran my unit tests using it, they overwrote the previous run's output. As it turns out, Vim has a way to do this.

more

July 4, 2008

Dave O'Neill
dmo
blog
» Fixing the name of App::Ack on Debian

ack is a great "programmer's grep" tool. If you don't already use it, check it out. Now, ack is packaged as part of Debian Testing (Lenny), but unfortunately there's a name conflict. Debian already ships a Kanji code converter named ack, so the ack that I want gets renamed to ack-grep.

I want to run 'ack' on all my systems, not 'ack' on some and 'ack-grep' on others, so I abused Debian's 'alternatives' system to let me do this with:

    update-alternatives --install ack ack /usr/bin/ack-grep 100

And voila, it creates me a /usr/bin/ack that Just Works, and is known to Debian so future packages won't (I hope) break that symlink.

June 25, 2008

Dave O'Neill
dmo
blog
» YAPC::NA 2008, Day One

This year's Yet Another Perl Conference has come and gone, and I didn't bother to write anything during the conference. So, to make up for that, here's what I meant to post but didn't get around to.

[Read More]

June 23, 2008

Dave O'Neill
dmo
blog
» YAPC::NA 2008, Day Three

Here's my Day Three summary for YAPC::NA 2008. Day two consisted of talks throughout the morning, with lightning talks and the closing keynote in the afternoon.

If you haven't read the day one and day two summaries, start there first

[Read More]

» YAPC::NA 2008, Day Three

Here's my Day Three summary for YAPC::NA 2008. Day two consisted of talks throughout the morning, with lightning talks and the closing keynote in the afternoon.

If you haven't read the [day one]{yapc-na-2008-day-one} and [day two]{yapc-na-2008-day-one} summaries, start there first

more