antimac.org
Dan's homepage

Archive for November, 2009

Cyber Monday

Monday, November 30th, 2009

This year, I thought Black Friday would be the killer day for camelcamelcamel and co., but now I hear there’s a new thing called Cyber Monday, and that seems to be driving some good traffic our way.  It is good timing since Mozilla finally released v1.2 of our Firefox add-on, the Camelizer.

Which meaningless shopping day will be most fruitful for the camel farm?  Hard to say until tomorrow!

FusionIO io-Drive 80gb

Friday, November 20th, 2009

Thanks to a friend (who bravely rode as part of our team, the dot-com bombs, in the 24-hour electricross earlier this year), an 80gb FusionIO io-Drive (a superfast PCI Express-based SSD-like storage device) has landed in my lap.  Here is a picture which interprets that statement literally:

After some firmware upgrade issues (this is apparently a very early unit) I have one thing to say about this drive – it is incredibly fucking fast.  How fast?  I’ll use my 150gb WD Raptor and the benchmarking tool HD Tune Pro 3.50 for comparison.  Obvious note: the WD is in use and has a formatted partition but neither applies to the io-Drive; I’m sure this affects the WD’s benchmarks but they are fair enough for me.

Update: When you initialize an io-Drive, you choose from three performance options, with each modifying the ratio of storage to performance.  For my original write up, I used the maximize performance option.  This cut storage capacity in half, which makes it probably not the best benchmark in the world when the database I want to store on it is larger than the 40gb it provides.  The middle tier is 56gb or so.  Anyway, the options do change the results but not by much.  Off the top of my head, I’d say there’s maybe a 10% spread between the three of them.

Read/Write Benchmark

The “benchmark” tests are just raw reads and writes from what I understand.  This means that I cannot provide a write test for the WD, as I don’t want to overwrite it.  You can see which drive is which in the top left corner of each screenshot.

Notice how sexy?  No less than 400MB/sec throughput at all times and 0.1ms access time.  How does the Raptor fare?

Terrible by every measure of comparison and delivers diminishing returns to boot.

Random Access

This is probably the most important benchmark when it comes to the thing for which I’ll be using this drive (MySQL.)  And as the previous screenshots have already made painfully obvious, the io-Drive pummels the Raptor.

The Raptor is surprisingly awful.  And it’s not that the difference between the drives is so surprising, but that I (and most people) probably have no idea what we’re missing in terms of normal hard disks vs SSDs.  It’s akin to upgrading directly from an Apple IIe to some fast quad core machine these days, the difference seems that large.

Tomorrow I’ll install this wonderful device into the camelcamelcamel database server.  It will replace a SAS RAID and will assuredly be faster, though I wonder how to solve the redundancy / backup issue…at least with the RAID, it has a battery backup in case the power suddenly goes out (and the UPS fails too for whatever reason).  For now I guess I will just place the MySQL data on the io-Drive, cp it to its old RAID hourly, and see what happens.

Barring catastrophe, this could drastically increase the peformance of the DB server.  Maybe the CPU use will even go up when it no longer has to wait 9-25ms between accesses!

Update

On second thought, I have decided to test other drives in my system to see how much of an impact being the OS drive had on the Raptor’s results.  Here are the results for a 1tb WD drive.

Read Benchmark

Again, I’m only doing read here due to wanting to keep my data intact.

Interestingly we see that this drive has a higher transfer rate than the Raptor but is slower on accesses.

Random Access

If there’s one word to describe the 1tb WD drive it is consistent.

Conclusion

Being in use had a huge impact on the Raptor and/or it was a lot slower than the other WD drive.  Irrespective to this is the fact that the io-Drive still brutalizes them both; just the access time differences alone are enough to make one weep.

Miscellaneous Screenshots

Interesting hardware requirements for a hard drive.

This drive was apparently quite old (a whole year!) and had probably never had its firmware updated.

Here are the aforementioned storage:performance ratio formatting options.

http://stashbox.org/706754/1091020192635-HD-Tune-Pro-3.50-Hard-Disk-Utility-trial-version.png

Rails 2.3: Session cookie expiration

Thursday, November 12th, 2009

For some reason the key used to set the cookie expiration in Rails changed as of 2.3.  Now you set it like this:

ActionController::Base.session = {
:expire_after => 1.day()
}

I set this in both config/environments/production.rb and in config/environment.rb just in case it matters, and it seems to work: cookies are now being set with an expiration date, where before they were not.