dmo.ca/ tag/ linux
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

Posted Thu 27 Oct 2011 10:54:57 PM EDT Tags: 4kb disk filesystem gpt linux parted sectors
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.

Posted Thu 25 Feb 2010 01:38:04 PM EST Tags: linux
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

Posted Tue 14 Jul 2009 12:20:18 PM EDT Tags: linux
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

Posted Fri 01 May 2009 10:35:36 AM EDT Tags: linux
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

Posted Thu 09 Oct 2008 02:37:54 PM EDT Tags: linux
How to detect virtualization

Update: You may be interested in [[the perl module|perl-module-for-virtualization-detection]] implementing these tricks.

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.

more

Posted Fri 30 May 2008 03:11:07 PM EDT Tags: linux
Continuous integration with git -- some thoughts

At work we use git, and have an extensive suite of tests for our code, and a set of scripts we use to kick them off manually. Unfortunately, we don't have a nice way to run them automatically.

Here's what I want, described here so I don't forget it. Tomorrow, I'll start looking for something that meets these needs, or can be hacked to do so. Maybe I'll have to implement it all, maybe not.

more

Posted Thu 08 May 2008 04:47:52 PM EDT Tags: linux
Setting up etckeeper

etckeeper is a tool, packaged in Debian, that lets you track revisions to /etc in a Git repository. Here's how to install and configure it.

more

Posted Sat 12 Apr 2008 05:32:01 PM EDT Tags: linux
Configuring Bind9 in a chroot

Every now and then, I move my nameserver to a new machine, and I have to google for the recipe for chrooting it on Debian. So, this time, I'm documenting it here.

more

Posted Sat 12 Apr 2008 04:56:27 PM EDT Tags: linux