Pay attention to the default IO scheduler

With recent versions of Ubuntu running as Xen DomU’s I’ve noticed that the default scheduler is deadline.  I’ve read documentation that noop should be the preferred scheduler.  However, I make use of ionice, as do disk intensive programs such as fcheck.  It’s not often noted but ionice only works with the cfq scheduler and because of that cfq is probably the best default for any system.

Getting more entropy for virtual servers

It is not uncommon for people to have performance problems with the their virtual servers and chalk it up to virtualization as the problem instead of insufficient entropy.  Running a mail server or SSL web server are particularly vulnerable to virtual servers without much entropy.  I have noticed that my virtual servers have had a lot less entropy in the past 6 months or so.  I decided to revisit what simple and effective solutions exist to solve this problem.

Continue reading ‘Getting more entropy for virtual servers’ »

My kingdom for the perfect Linux filesystem

It is extremely difficult to keep up with all the filesystems being developed for Linux these days.  Clearly, so much activity represents an understanding that the current filesystems do not address the needs of users.  However, as is all too often the case, development is extremely fragmented with very small groups each trying to build the 1 true filesystem and thus each effort taking longer than a collaborative project.

What I want from a filesystem: snapshots, replication (local, aka RAID and network), checksums (at least optionally), compression (at least optionally), and some basic intelligence such as when a checksum fails and replication is used to get the data from another replica.  Yes, fast error recovery and good performance are important too.

Continue reading ‘My kingdom for the perfect Linux filesystem’ »

Researching Solid State Drives

I’ve been researching the value range of SSD’s.  The most important thing to find out with an SSD is what controller it’s using.  SSD’s with the same controller tend to have nearly identical performance characteristics.  Since hdparm supports TRIM I started looking for an SSD which supported TRIM in the $100 – $200 range.  Here’s what I’ve uncovered:

Continue reading ‘Researching Solid State Drives’ »

Resources for working with ICalendar, Ruby, and Rails

Icalendar is not fun to work with. If only there was a library that would make it easy and pleasant. Alas, that does not seem to be the case, but there are places to start.

There are 3 ICalendar libraries available as gems:

Beyond that I’d say anyone planning to work with ICalendar files should be prepared to dig into the reference.  I found iCalendar Specification Excerpts particularly useful.

Simple way to capitalize the first letter of each word in a string using Ruby

I am not infrequently looking to translate a string of either all lowercase or all uppercase characters to a string with the first character of each word capitalized.  I decided to see if I could come up with a quick and easy way to do this in Ruby.  This is what I came up with:


"STRING TO CAPITALIZE".gsub(/b(w+)/) {|x| x.capitalize}
=> "String To Capitalize"
"string to capitalize".gsub(/b(w+)/) {|x| x.capitalize}
=> "String To Capitalize"

It’s not perfect as I think it will choke on quotes but good enough for 5 minutes worth of work.