Monday, September 25, 2006

Homebrewing is Like Pipelining

In an attempt to convince you of my not-saneness, I offer the following. This transcript somewhat modified to protect your hardworking bandwidth.

[16:16] ktorrek0: somehow i've managed to find $60 worth of brewing supplies THAT I CAN'T LIVE WITHOUT
[16:19] ktorrek0: it took all my willpower to not buy another recipe kit too, let me tell ya
[16:19] ktorrek0: but i did buy another secondary fermenter so i can dangerously have two batches going at the same time
[16:19] martiank9: that can't end well
[16:19] ktorrek0: considering i barely have enough bottles for the one batch, it sure can't
[16:20] martiank9: i think that means you have to buy more bottles
[16:20] ktorrek0: or drink more beer
[16:20] martiank9: and really, can't you be content with one batch at a time?
[16:20] ktorrek0: um, no
[16:25] martiank9: I don't think this is a good hobby for you
[16:25] martiank9: there's too much waiting
[16:25] ktorrek0: this is why i need more bottles
[16:25] martiank9: how will more bottles help? Do they accelerate time?
[16:26] ktorrek0: no but you can keep more beer going so that you get a new batch every week
[16:26] ktorrek0: think of it like pipelining
[16:26] ktorrek0: which is probably not something that anyone's ever done
[16:27] martiank9: you can't be the only home brewer who has wanted to stagger batches so they get new beer every week
[16:27] ktorrek0: yeah but i'm probably the only one who's ever tried to explain by using an obscure microprocessor reference

For those who are unfamiliar with the term, Pipelining is roughly defined as breaking up a big instruction into multiple baby-steps so you can keep every unit of the processor doing something rather than hanging out waiting for the next instruction. No, that sentence wasn't run-on. Bear with me here.

In the bad old days CPUs did an entire instruction from start to finish in one clock cycle. This worked pretty well except that, hrm, those math units are sitting around doing nothing most of the time, and arg, that memory subsystem is just hangin' out there and...well you get the idea. So we can make this thing better, stronger, faster by chopping up our instructions into smaller bits that can all be done in parallel putting those lazy units to work! Hence pipelining.

Your old instruction took N microseconds to complete for pretty much every instruction. NOW you get N microseconds for the first to complete then N/pipeline depth microseconds for every additional the ideal case of course. So now in your ideal case you can get more work done per unit time. Woot.

Enter Homebrewing
Now, I'm a total homebrewing n00b (I've had my first batch going right now for about a week). The basic phases of brewing beer defined as "me having to do any work", are primary fermentation, secondary fermentation, and bottling. In places where I read about such things, the generally accepted rule of thumb is 1 week in primary fermenter, 2 weeks in secondary fermenter, and 3 weeks in bottle before consumption. Basically. So we're talking six weeks per batch here...and jeez if I'm not killing myself just waiting around...*lightbulb*.

So enter a couple pipeline registers (gigantic bottles to hold not-quite-ready-beer) and I can now have multiple batches going at the same time. Granted, 5 gallons of beer in a week is a bit excessive even for me so I'm probably going to wait another 2 before starting the second batch.

So there you have it: Homebrewing is Like Pipelining.

No comments: