gentoo

Running 512 containers on a laptop

LXC is a management system for lightweight virtual machines called containers. LXC relies on the Linux kernel for several key features including process isolation and resource limitation. Compared to virtual machines, LXC containers have a few limitations, however none of them affect the vast majority of use cases. My laptop (Thinkpad X220) is by no measure a speed demon, although it still has the required resources to host a seemingly arbitrarily large amount of containers thanks to a few key deduplication technologies.

Munin-cron overlap fix

One solution I tried was to turn up the time between tests from 5 minutes to 10 minutes. This still had generated problems, as munin-cron runs still weren’t done after 10 minutes, and any greater time between polls meant subpar graph granularity. My final solution was to modify munin’s cron entry to the following: */7 * * * * munin test ( ! "$(pidof /usr/bin/munin-cron)" ) && test -x /usr/bin/munin-cron && nice -19 /usr/bin/munin-cron I ran a test to see if there’s still a PID active from munin-cron, and if not check to see if the munin-cron executable exists.

Part III: Munin[node] in cfEngine

A tarball of all relevant files can be found here. All files are hereby released under the GNU Public License version 2, and are apparently copyrighted by Oregon State University. There are 2 major parts to this system. The first is the cf.classes file, which simply describes which hosts belong in each class. The relevant classes are as follows: service_munin_host = ( larch ) service_munin_node = ( binhost columbia coos fir fraxinus g1 g2 g3 g4 ) package_munin_node = ( service_munin_node www_phpbb_com ) The second part is the cf.

Part II: The Munin-master

First off, you’re going to have to install the munin package. You’ll also need to have a web server installed, I prefer apache: # For Gentoo, emerge munin apache # For CentOS/Fedora yum install munin apache # For Debian aptitude install munin apache Gentoo and CentOS both install the HTTP root in /var/www/localhost/htdocs/munin. After setup, the graphs will be available at http://localhost/munin Debian requires a bit more attention. Debian munin installs the HTTP root in /var/www/munin.

Part I: Setting up Munin-Node

Munin showed the most promise and compatibility with many of the services we run at the OSL, such as memcached and varnish. I liked how the plugin system is set up independently on each host, and that each plugin can be managed, configured, and consolidated through symlinks. For the benefit of the uninitiated the setup on each node goes something like this: #For gentoo emerge munin #For Fedora/CentOS yum install munin-node #For Debian/Ubuntu apt-get install munin-node Each client is a “node”, and runs the daemon ‘munin-node’.

Gentoo on the Fujitsu P1620

Kernel Support is in the mainline kernel except for: Fingerprint reader Touchscreen Panel buttons Wireless It’s an Atheros 5008 card, supported fully by the ath5k driver. Early driver versions in old kernels such as 2.6.30 have very shaky hardware support, therefore unless you’re running the latest available code, I would recommend swapping it out. I’ve removed the integrated wireless card in favour of an Intel 5350AGN, which has been working well in the laptop.

Tiling Window Managers: A Comparison

I started the journey long ago with >Ion3. My main problem with it was the terrible default configuration. Hundreds of lines of incomprehensible Lua means that it’s very difficult to write a proper laptop status bar. I slogged through, learned Lua, and eventually came up with something that was usable. Then I learned of the author’s bat-shit insane-ness. Not wanting to get sued, I switched away. I wanted something that was easy to understand and script with a “large” install base.