Google File System

Some random thoughts about the Google File System:

  • It uses libraries which must be linked into applications instead of standard VFS/vnode layer integration. In some people’s opinions (including mine, most of the time) this means it’s not really a filesystem.
  • Certain decisions, such as the lack of data consistency or appends occurring “at least once”, make it unsuitable for a large variety of potential applications.
  • The master/client relationship very closely resembles that used in HighRoad (my second-to-last project at EMC) except for the aforementioned lack of OS integration. In particular, the I/O flow description in section 2.3 and the use of leases as described in section 3.1 look extremely familiar to me.
  • The client/chunkserver relationship closely resembles that of the distributed block store that was my last project at EMC, except that it’s at a much coarser granularity and non-consistent.
  • Based on my own experience implementing versions of both layers, I can say with confidence that they need not be implemented together. In fact, doing so is IMO a mistake; separating these two functions makes for a much more maintainable system, and allows the lower layer to be used by things other than filesystems as well.

It might sound like I’m dismissing GoogleFS (sorry guys, but the name GFS is already taken and it’s obnoxious for you to reuse it like that). That’s really not the case. Nobody knows as well as I do what a bitch it can be to make something like this work, and my hat’s off to anybody who can do it even if they sidestep the kernel-integration and consistency parts. The atomic-append piece makes a great deal of sense in general, and particularly for their application. There’s a lot of good work here. The above are just the things that first struck me as a read the paper.

Fun with Style Sheets

Here’s an experiment that any web-design geek can do. Grab a style sheet from one website, tell your browser to use it, and then go view some websites. This will reveal three things:

  • Some sites are just plain broken, and don’t even render properly unless you use their style sheet.
  • Some sites abuse HTML in ways that become much more obvious with a different style sheet. Today I’ve been noticing how many sites use the <blockquote> tag for things that aren’t quotes (e.g. to separate entries in a blog).
  • Some sites work, and don’t seem to be abusing HTML too badly, but are the victims of absolutely terrible font/color choices.

There are some sites that do not fall into one of the above categories and don’t really need any improvement. Those are in the minority, though. I’m about half-way through my regular morning surf right now. I’ve already found at least a dozen sites that became much more readable using my own style sheet instead of theirs; except for those that are clearly broken, I’ve yet to find one that looks worse.

Demand the Real Stuff

Cindy and I were wondering this morning where the word “shampoo” came from. I guessed French, probably something to do with “eau” (water). Google found an entry at Etymology Online indicating that the word’s origins are much more interesting:

1762, “to massage,” from Anglo-Indian shampoo, from Hindi champo, imperative of champna “to press, knead the muscles,” perhaps from Skt. capayati “pounds, kneads.” Meaning “wash the hair” first recorded 1860. The noun meaning “soap for shampooing” first recorded 1866.

Iron Jeff

Since my last post about losing weight, several people have asked for more details about my diet and exercise programs. There’s really not that much to tell, but here goes. Let me start by saying that, according to the experts, I’m pretty much doing everything wrong. For example:

  • I skip breakfast and, usually, lunch.
  • I snack between meals.
  • I don’t pay any attention at all to whether calories are from complex carbs, sugars, or even fats.
  • I exercise way above my recommended heart rate.

Yeah, oh well. If anything I say should be considered advice, it’s this: figure out what works for you. I don’t think there’s an approach to diet and exercise that works for everybody, or that everybody can stick to. If I’ve been successful, it’s primarily the result of just being aware. I’m aware of what I’m consuming, of how hungry I feel, of how my body feels when I’m exercising.

OK, I said I only had one piece of advice, but here’s a second bonus piece. Don’t obsess over this stuff. Sometimes I just can’t resist the temptation to have a cheeseburger or a candy bar. Sometimes the idea of exercising is just too horrible to contemplate. So I eat the cheeseburger, or I skip the exercise session, and I don’t even feel guilty. It’s just what my body needed at the time, and the next time I’ll do the “right” thing.

My exercise program is really pretty simple to explain. My machine of choice is the stairclimber. It’s not an actual StairMaster because those are ridiculously expensive. I got a Diamondback HRT 1000ES, which they don’t sell any more, but the 600ES (not the 1100ES) seems to be the current equivalent. The reason I like the stairclimber is that it’s the only kind of machine I’ve tried that both provides an intense enough workout and doesn’t make me feel like I’m knocking the breath out of myself all the time. I’ve always hated running because it never seemed like my stride and my breathing matched properly. For me the stairclimber just provides that balance.

I generally exercise three times a week, most often M/W/F. I do it either in the late afternoon or in the evening, as my schedule allows. I know it’s supposed to be better to exercise in the morning, but every time I’ve tried it in the past I’ve had a really lousy workout (or half of one) so I don’t even try any more. I exercise for 24-60 minutes, generally trying to increase the duration each time; when I get up to 60 I drop down to 24 at the next intensity level. The actual rules I use for when to increase or decrease the duration or intensity are kind of complicated, mostly to give me something to think about while I’m working out, and there’s no point in describing them here. The important thing is that I do slowly ratchet up the difficulty, and I pay attention to how my body’s reacting. I have good days and bad days; mostly I take advantage of the good days to step it up and tough out the bad ones to stay even, but if I really feel bad I throw out all the rules and quit early. I just pick up where I left off next time. I’ve gone from about 450 calories in 24 minutes to 1400 in 60 since I started exercising again.

That’s really about it. As I said, I do just about everything wrong…but it seems to be working. When I’m in shape I’m faster than just about anyone on a hiking trail, and I’m in better shape now than I have been in at least nine years…possibly ever. On my last hiking trip I was going very fast on some very challenging trails, I did some extra up-and-down looking for the missing members of our party, and I still felt like I had plenty of gas left in the tank. If that’s not a definition of real-world fitness I don’t know what is.

Jeff Sixpack

OK, now that I’ve lost about 25 pounds or so, I think I’ve earned the right to talk about it the process a little. First, here’s some perspective. When this picture was taken last December, I was up to about 210 pounds (you metric folks can figure it out). That’s not exactly extra-jumbo size, but you can see I had a somewhat noticeable spare tire around the middle. Starting some time in June – I honestly don’t remember when, and there certainly wasn’t any specific reason – I decided to start doing something about both my weight and my declining fitness level. I don’t happen to have an “after” picture, and I’m too lazy to take one right now, but suffice it to say that the gut is effectively gone. Yeah, there’s a little bit still there, but you’d only notice if I took my shirt off and you were looking for it. Under normal (i.e. clothed circumstances) I’d say I look pretty trim. 185 is supposedly my ideal weight, whatever that means, and less than about 70% of guys my height and age. My fitness level has also gone from average to excellent in the same time.

There’s really no secret to how I did it. It all boils down to two things: eat less, and exercise more. While I’m sure you can optimize the process by eating (or not eating) certain foods, or certain combinations of foods, at certain times, and so on, the key to weight loss will always be burning more calories than you take in. That means you have to know how many calories various foods contain, and that’s been a real eye-opener. I don’t have any simple rules, but for me calories are kind of like money. If something’s going to “cost” me 200 calories, it darn well better have a lot of flavor and leave me feeling pretty satisfied. It’s amazing how many foods are simply “inefficient” in terms of the ratio between calories and satisfaction. There are some surprises in the other direction, too. My latest is big globs of salsa on water crackers. Not only is it very satisfying for very few calories, but the crackers are also firmer than chips so you can dig in a little deeper. Apart from selecting foods more carefully, I just generally try to eat less. I rarely eat a full lunch any more, and I eat smaller or lighter dinners. Because I know I’ll be eating less, I try to savor my food a little more and not just chew mindlessly. Perhaps most importantly, I let myself be a little bit hungry. When I was younger I was often hungry of necessity, and I kind of got used to it. Even when I had a cushy programming job and could afford to eat whatever/whenever I wanted, I’d often work through meals just because I didn’t want to distract myself from what I was doing. Being hungry was simply no big deal. It was like a slightly uncomfortable chair, or a little too much noise: I’d just ignore it and move on. Somewhere along the way I got away from that, and I sort of wanted to get back to it. Now, I often quell the urge to eat, not to the extent that I’d say I’m depriving myself so much as that I’m just making a conscious decision about whether I’m really hungry enough to justify “spending” the calories. The result is that I probably take in 1000-1500 calories total on the average weekday (I splurge a little more on weekends). I’ve had quite a few days when I’ve taken in fewer calories than I’ve burned on the exercise machine. I don’t knock myself out about any of this, I don’t feel deprived or anxious about my intake, I basically just do it.

I have noticed a couple of strange things during this process. One is plateaus. I hit my first one quickly, at 200, then 195 and 190, with very sudden drops in between. Each one was longer than the one before, and I’ve never quite figured out why they happen. Another strange thing is that weight changes are unpredictable. I’m keeping a pretty close eye on both my input and my (ahem) output, and I’m often still surprised when I step on the scale. There have been times – such as the Baxter trip – when I was sure I must have gone down; I’d gone up. Other days I’ve felt like I was a little bit piggish, then I get on the scale and I’ve lost a pound. Here’s the really weird part: if there’s any correlation at all, it seems to be with whatever I was doing a week ago. What’s up with that? I strongly believe that people’s bodies react to things – food, exercise, drugs – more differently than doctors and physiologists generally admit, but that still seems strange to me.

So I’m a little bit thinner, and a lot fitter. Does that make me happier? Yeah, a bit. It’s not something I think about all the time, but when I do think about it I feel slightly proud that I’m physically back to being a little more like I should be. And hey, this is my blog, so if the idea of me patting myself on the back bothers you then tough. At least I’m not describing my exercise program, which is basically simple but involves a set of rules for increasing duration and intensity that would simply numb your mind if I were to describe them. Count your blessings. Patting myself on the back reminds me of something, too: now that I’m back on track with respect to the aerobic part of the fitness equation, my next goal is to work some on strength and flexibility. Yoga class, here I come.

Fake Poppy Syndrome

A cretin who shall remain nameless recently accused me of “Tall Poppy Syndrome”. It supposedly refers (particularly in Australia) to an attitude that discourages achievement, much like the old “nail that sticks out gets hammered down” maxim. What’s amusing to me is that the person using the term didn’t seem aware of the term’s real origin. In that parable, the “poppies” did not have their heads cut off merely because they had grown but because they had overreached or overstated their success. Perhaps a couple of examples will illustrate what I mean.

  • Do I resent everyone who’s richer than me? Certainly not. I know a bunch of people richer than me. Most of them became richer through old-fashioned talent, hard work, and savings. A few became that way because of dumb luck. No problem. However, do I resent the person who became richer than me through nepotism and corruption, and then claims to be a great businessman (like George W. Bush)? I certainly do.
  • Do I resent everyone whose technical achievements are better known than mine? Nope. I’ve met a few Turing Award winners, and a bunch of open-source luminaries, and the only envy I feel is of the sort that encourages me to follow their example. I have no desire to tear them down. However, if someone throws together a bunch of other people’s ideas in a not-particularly-innovative way, gets other people to complete their severely deficient implementation, then takes credit for being some technical genius whose ideas are saving the world…yeah, that annoys me.

In both cases the problem is not that the poppies are tall. It’s that they’re presented as being taller than they really are, like the unripe tomato that’s reddened artificially and then sold at a premium. It annoys me partly because people tend to trade on these inflated reputations, and harm others. What happens when either of the “Fake Poppies” in the above examples use their reputation to start a company which flops, screwing investors and (more importantly) coworkers or employees whose livelihoods are threatened by having believed the lie? What about the other people who have made achievements, who deserve their own moment in the limelight but never get it because the Fake Poppies hog the stage? No, I don’t crave the limelight myself; I’m talking about other people.

Perhaps the person who mentioned Tall Poppy Syndrome will read this and realize it’s not about envy. Truth be told, I see nothing to envy in his case. What it’s about is honesty, about presenting one’s accomplishments (whether great or small) in a fair light, and giving credit where credit is due. Tall poppies are fine, but imitation poppies are not.