The 10TB iSCSI SAN

From the, “I’m not entirely sure how I got here” section of the Internet comes this SAN on eBay. At $2,000 it’s a little out of my price range, but it’s pretty much what I’ve wanted for a long time: a box that will just sit in the corner, but that also kicks butt. Seven hot-swappable 1500GB SATA disks with 32MB cache each, behind a RAID controller that supports auto-rebuild and RAID 6. Speaks NFS, SMB, CIFS, AFP, and also FTP and HTTP(S). And apparently, an HTTP/FTP/BitTorrent download manager via its web interface.

And it seems to get good reviews, too. I initially thought it was just a cheap enclosure with 7x big drives, but it’s actually a full-blown computer, and it has some serious features, like the apparent ability to bond across its dual GigE ports, and to work over iSCSI. I’ve seen mention of it having ZFS support if you’re not happy enough with ext3. (ZFS supports a lot of cool features, though I’m not sure I’m familiar enough with it to use it on something important.)

$2,000’s some serious money, but it buys you a 10 terabyte SAN that speaks iSCSI, has bonded GigE, and has a “real” RAID card (one that does more than RAID 1/0). (Oh, shop around! It looks like it’s under $1,000 without disks. Which actually makes it seem kind of expensive.)

Unapologetic

Apparently, a company wrote an application for the iPhone called Baby Shaker. It depicts a crying baby, and you vigorously shake the iPhone to make it stop, at which point its eyes are replaced by X’s.

Apple pulled the application from its store and apologized, saying, “This app is deeply offensive and should not have been approved for distribution on the App Store.”

The Sarah Jane Brain Foundation, however, has had enough, with a spokesperson calling it “ the most cynical apology I have ever seen.” They plan to picket Apple stores, calling on them to “ mitigate the harm they’ve now caused.”

What I find so interesting is how the Sarah Jane Brain Foundation has had “The PETA Effect” here, at least for me: so vehemently overstating your cause that you steer people to the other side. If I’d seen the application distributed, I’d surely have joined the Sarah Jane Brain Foundation in finding it horrifically offensive. It’s in bad taste and makes light of an abusive practice that kills many babies and leaves even more with permanent injuries and brain damage.

And yet, with them coming across as so overzealous, my “That’s really kind of funny” sense is triggered, just a tiny bit. I guess I find their position so outrageous since:

  • I don’t like Apple having sole control of what I can run on my iPhone. Apple pulled the app, which means that, unless I jailbreak my iPhone (voiding my warranty), I can’t have the application. I’m not sure I want this application, but it’s a sore spot with me. The fact that Apple pulled the app just drives home Apple’s exclusive control.
  • Apple promptly pulled the app. The “most cynical apology” actually seemed to be a pretty emphatic, “That application was horribly offensive. We screwed up big time in approving it!” from Apple. I’ve definitely heard much more cynical. (I’m sorry you feel that way…)
  • The application shows that shaking babies kills them. Sure, it demonstrates it in an awful way, but it’s like showing tapes of babies’ skulls being crushed to lobby against abortion. Isn’t this exactly what the Sarah Jane Brain Foundation should enjoy?
  • I think that, and then get the sneaking suspicion that they are loving this, because it’s giving them tremendous publicity. And calling for protests outside Apple stores, weeks after they pulled the application and apologized for it, only furthers that point.

What do you think? Was Apple’s apology (and prompt retraction) of the app good enough? Should Apple have left it up even though it was controversial?

Free Mac Programs I Love

I’ve been running a Mac as my work machine for a while now. (And, since it’s a laptop, it tends to become my personal machine somewhat, too.) Excluding things that are specific to programming, here are a few tools I don’t think I could live without–and they’re all free!

  • smcFanControl. (Wow, my version is way out of date.) My machine can hit 75 degrees Celsius, at which point parts of the laptop are too hot to touch, and things inside can’t be happy. Apple seems to have designed the machine to stay quiet: even as I’m at 75 degrees, the fans don’t ever exceed 1,000rpm. But they go to 6,000 rpm, and smcFanControl will take you there. It’s not until somewhere around 3,000rpm that I even start to hear the fan, and it makes a big difference. (6,000 rpm can bring the CPU and chassis down 20 degrees Celsius in under a minute.)
  • iStat Menus, which place helpful (and customizable) things like network speed, memory utilization, and CPU graphs in the Apple bar (whatever it’s called: the menu bar across the top of the screen). With 2GB RAM (and a tendancy to have way too much stuff open), it’s handy to keep an eye on its usage, and it takes maybe 20×20 pixels to do so. Clicking on the graph brings up a spiffy graph and a breakdown of the top processes using RAM.
  • QuickSilver, and I don’t even use it for half its potential. Ctrl+Space and start typing, and it’ll match things. “fir[Enter]” and I’m in Firefox, “ter[Enter]” and I’m in the terminal, “tex[Enter]” and I’m in TextMate… It’s actually capable of much more, too.
  • Firefox and Thunderbird. Even though the Mac comes with Safari and a pretty slick mail client, I think power users will feel most comfortable with these. And both are quite customized (and plugin-ized) just to my liking.

Building a Better Camera

Thinking about a $22,000 lens got me thinking about “real” cameras a bit more. And it occurred to me that Canon is in kind of a weird spot right now.

Their flagship camera has always been the EOS-1. With digital it was the 1D, which was followed by a 1Ds. The s designates that it’s meant for studio work, with a higher resolution but lower framerate. After a while Canon replaced them with the “Mark II” edition of the 1D and 1Ds, and a few years (?) ago, the Mark III edition.

The Mark IIIs were well received. The 1D Mark III supported up to ISO6400 if unlocked, allowing great low-light performance. The 1Ds Mark III is what really got people drooling, though, with a 21-megapixel resolution. I think it was around 10 megapixels that people started saying that resolution wars should really be considered over. 21 megapixels, in the eyes of many, bests medium-format cameras. People shoot for two-page magazine spreads and billboards with lower resolutions.

The awkward sitution comes from the Canon 5D Mark II. The 5D is still a very high-end line, but it’s meant to be second fiddle to the 1D. But the 5D Mark II boasts 21 megapixels, the same as their flagship 1Ds Mark III. It records 1080p video. And what really wins me over is that it gives Nikon’s D3 a run for its money: ISO6400 out of the box, and you can enable “High ISO” support for ISO 12,800 and 25,600, allowing photos to be taken in absurdly low light. It sells for $2,700, less than half of the $7,000 1Ds Mark III.

So it’s high time for a Mark IV series. I haven’t even seen rumors about it yet, which tend to start long before the camera’s released. But here are some of the things I’d really like to see Canon release in a Mark IV edition:

  • Higher ISO support with lower noise. I’m not sure many people even imagined ISO6400 in the days of film (though it looks like there may have been such a thing, though it certainly wasn’t sold in Walmart), but the trend has been started. ISO12,800 and ISO25,600 are kind of experimental modes that remain very noisy (grainy). When I’m in the market for a new digital SLR in a few years, I hope it’s got a noise-free ISO25,600, or higher. Consider that increasing sensitivity just twice more would bring “ISO 100K.” Canon and Nikon, it’s a race. You heard it here first. I want the 1D Mark IV to put Canon in the lead, and Nikon to come out with a D4 to try to one-up them, with the end result being a camera that can take photos in dimly-lit rooms without five-figure lenses.
  • Get rid of the mechanical shutter. Sample the sensor for the necessary duration. It seems there are design challenges in eliminating the shutter, but it’s really a vestigial organ on a digital camera. This removes a common spot of mechanical failure, and paves the road to higher shutter speeds. I don’t think any camera (possibly excluding ultra-expensive scientific gear) can exceed 1/8000th of a second shutter speeds right now. Accidentally shoot outside at f/1.8 and ISO1600 on a sunny day and tell me it’s not a limit. (Yes, yes, why would you want to do that? Because I needed the shallow depth of field and forgot my camera was cranked to ISO1600. The real question is: why couldn’t the camera handle it?)
  • RAM is cheap. Like $10 for a 1GB DIMM. I doubt cameras have DDR2 DIMMs, but why can I only take a couple shots in rapid succession before I have to wait for the camera to write things out to the card? On the flagship model, give us a crazy-huge buffer.
  • For the love of God, give us an LCD that we can see when we’re working outside. And while you’re at it, spend the money on a great LCD. Look at an iPhone screen for a while, in fact, and see what 150 dpi looks like.

Photography: Sigma’s 200-500mm f/2.8 lens

Thanks to Rusty for pointing out a lens that, apparently, made its debut more than two years ago, yet went entirely unnoticed by me. The Sigma 200-500mm f/2.8 lens.

f/2.8 means that this lens lets in a lot of light, allowing you to shoot in dimmer light or to get really high shutter speeds for freezing motion in sports. You rarely see zoom good lenses above 200mm, much less with an f/2.8 aperture. But Sigma has done it, and it goes all the way to 500mm. (Bonus: they include a 2x tele-extender, allowing the lens to serve as a 400-1000mm f/5.6 lens.) 500mm is a pretty long telephoto.

There’s a problem with crossing a really long lens with a really wide lens, though. The fact that it’s $22,000 worth of glass is one of them. The other is that it’s ludicrously large.

The Italian JuzaPhoto has a review of the lens, the only site I’ve found that far that actually used the lens prior to reviewing it. There are a lot of 100% crops from what appear to be Arab postage stamps, with a link to some real shots with the lens. The shots are quite remarkable, though I find it odd that there are maybe 8 photos in the world known to be taken with this lens.

But one pressing question remains: why, Sigma, would you make the lens green?

If I Made Computers

I think you could say with relative accuracy that there are three main bottlenecks in a computer: CPU, memory, and disk. There are some outliers that people might try to pile in: video card performance, or network throughput if you’re tweaking interrupts on your 10GigE card. But the basic three are pretty universal.

To cut to the chase: I hit disk bottlenecks sometimes, CPU bottlenecks almost never, and RAM bottlenecks all the time. And sometimes high load that looks to be on the CPU is really just I/O wait cycles. But RAM is special: if you have enough RAM, disk throughput becomes less important. At least, redundant disk I/O, which seems to account for a lot of it.

What interests me, though, is that almost everything is RAM starved in my opinion. My laptop has 2GB and I get near the limit fairly often. I’m thinking of trying to take it to 4GB. The jury’s out on whether or not it’ll see more than 3GB, and others complain that 3GB causes you to lose out a bit on speed.

But here’s the thing. I maintain things like a MySQL server with 32GB RAM. It’s not RAM-bound per se: we could switch to a machine with 1GB RAM and MySQL would still run fine. The memory is overwhelmingly configured for various forms of cache. But it’s not enough: there’s still a steady stream of disk activity, and a non-negligible number of queries that have to write temporary tables to disk.

RAM is cheap. It’d cost me about $50 to buy 4GB of RAM for my laptop. The reason RAM stops being cheap is that most motherboards don’t give you enough room. Both of my laptops can only take two DIMMS, which means I need dual 2GB sticks. They’re both based on older 32-bit chipsets, so I can’t exceed 4GB, but if I wanted to, I’d need dual 4GB sticks, and those are expensive. Even on decent servers, it’s hard to find many that give you more than 8 slots, making 32GB hard to exceed.

So what I’d really like to see someone bring to market is a 1U box with as many memory slots as it’s physically possible to fit in. 1U is still tall enough to have standard DIMMs standing up, and most of them are extremely deep. I bet you could fit 256 slots in. Then throw in a compact power supply, a standard LGA775 slot (allowing a quad-core chip), a good Gigabit NIC or four, and an optional FibreChannel card. No hard drives. Maybe a 4GB CompactFlash card if you really want it to have its own storage. Oh, and make sure the motherboard is pretty versatile in terms of RAM requirements and FSB. Oh, and don’t force me to go with ECC. If this were a single database server, it might be worth buying top-notch ECC RAM. But if this were just for caching things, I don’t care. Cache isn’t meant to be permanent, so an error is no big deal.

256 slots, and you could fill it with ultra-cheap 1GB DDR2 DIMMs. (Heck, at work, we have a bag of “useless” 1GB sticks that we pulled out.) You can get ’em for $10 a pop, meaning 256GB RAM would cost about $2,560. I suspect the system would command a high premium, but really, it’s just $2,560 worth of RAM and a $200 processor. A 2GB DIMM is about twice as much ($20/stick), but $5,000 for half a terabyte of RAM isn’t bad. Though 4GB DIMMs are still considerably more: they’re hard to find for under $100.

I think this would be a slam-dunk product. memcache is pretty popular, and it’s increasingly being used in previously unheard of roles, like a level 2 cache for MySQL. There are also a lot of machines that just need gobs of RAM, whether they’re database servers, virtual machine hosts, or application servers. And tell me a file server (sitting in front of a FibreChannel array) with 256GB RAM for caches and buffers wouldn’t be amazing.

So, someone, hurry up and make the thing. The key is to keep it fairly cheap. Cheaper than buying 4GB DIMMs, at least.

Cool MySQL Projects

I think part of the thing I love about MySQL is the same thing I love about Firefox and Thunderbird. Even though I sometimes wonder if there are databases that would work better than MySQL or have fewer bugs, MySQL has an incredibly rich community that’s home to myriad fascinating projects.

I’ve looked into MySQL Proxy at work a bit, and found it pretty interesting, but it’s still considered alpha-level code, and we don’t really need a proxy in front of our database right now.

I’m not even going to pretend that the links that follow are all things I’ve just found on my own. They’re inspired from this Xapbr post, with Xapbr being a blog run by one of the top guys at Percona, and Percona being a well-known MySQL consulting firm, perhaps best known for the O’Reilly High Performance MySQL book. (A must-read even for people who aren’t full-time DBAs!)

It turns out that MySQL Proxy has a competitor, Dormando’s Proxy for MySQL, better known as dpm. It’s a BSD-licensed proxy created by SixApart’s DBA. (SixApart used to own LiveJournal, which is well-known for releasing memcached to the community.) Given that I’ve worked with neither dpm nor MySQL Proxy, I’m not able to comment on the merits of either, but it’s a handy link to have.

I’m also interested in the Tungsten Replicator, an Open Source project providing (emphasis mine) “database-neutral master/slave replication,” which was interesting enough to keep me reading past the words “JDK” and “Ant,” which are technical terms meaning “bloat” and “memory leaks.” (I kid… Sort of.) It looks like the project is mostly MySQL-centric right now, but capable of replicating MySQL databases into Oracle. (But apparently not the other way, probably since Oracle binlogs aren’t as publicly-documented as MySQL’s.)

And then there’s WaffleGrid, a project using memcache as an L2 cache. That is, MySQL will first look in its own caches, but in the event of a cache miss, will check memcache before turning to disk. It looks like it gives stellar results, even though it’s one of those things that seems kind of wrong. (You’d think that, if you’re adding memory to better cache your database, you’d want to put it in the MySQL machine, and if you needed to scale to a cluster of memcache boxes, you might be better off spreading the load around several MySQL boxes… But at the same time, clustering isn’t something MySQL excels at right now.)

Drizzle is “a lightweight SQL database for [the] cloud and web,” which is forked from MySQL 6. (And for those of you scratching your heads: yes, I said version 6. Yes, 5.1 is the latest release branch.) There are some big names working on Drizzle, and besides “the cloud,” they talk a lot about “massive concurrency,” which is something that should be of interest even to people running more traditional databases.

And, of course, there’s Percona’s XtraDB engine for MySQL, a significant overhaul to InnoDB. It seems a bit of a young technology for production environments, and yet it seems like it’s production environments where it would have the best impact.

This is only tangentially related to MySQL, but I’ve seen Sphinx mentioned in at least three distinct places today, a SQL-based fulltext search index. I’d be curious in seeing how it compares with Lucene.

Damages, Season II

Although you probably shouldn’t take your reviews from someone who watches very little TV, the first season of Damages was absolutely, positively the best show to ever air on television. Besides being a thrilling show to watch, it was brilliantly produced. One of the lead character’s mottos was “Trust no one,” which can easily be adapted to what should be the show’s motto: Trust nothing.

Season 2 finished this week. From the very first episode I was uneasy. While the first season left lots of loose ends, it was a hard act to follow. A second season was bound to be like Mona Lisa II: even if it were done with the utmost of skill, it’s following something that’s difficult to top. And that’s mostly how I still feel about Season 2: a great TV series, but really not on par with the first.

But I disliked Season II for some other reasons. For one, it was a largely different cast of characters, and it took me a long time to figure out who was who. And I really didn’t care for Ellen in the second season: perhaps she was just burned out from all that happened in the first season, but I found her personality thoroughly unlikeable.

While Season 1 had a thrilling aspect where the characters you liked suddenly turned out to be evil and vice versa, Season II sometimes took this to ridiculous extremes. It almost became predictable: if you liked a character, they were bound to be bad, and if you disliked a character, they were bound to be good. The show’s affinity for playing with time by abruptly shifting to “5 Months Later” or “3 Months Earlier” also grew tiresome at times, too. Since very early on in the second season, every episode would feature a flash-forward to a scene that was explained in the final 15 minutes of the season. I won’t give anything away, other than to say that I found what actually transpired to be lame and implausible. I’d use that same expression to describe a few other events that occurred.

Overall, I’d give the show a solid “B.” It’s still a great show, but Season 1 was a tough act to follow, and I had a persistent feeling that Season 2 wasn’t up to those standards. If you haven’t seen Season 1, don’t watch Season 2: the show should really be experienced in chronological order. To the question of whether Season 1 fans should watch Season 2, my conclusion is “Meh.” It’s not a bad show, and it has great parts, but it won’t live up the standards that Season 1 set.

Delete Old Files in Linux

Here’s a good one to have in your bag of tricks: all the time I wind up with a directory where I just want to delete anything older than a certain number of days. Here’s a pretty simple one:

DELETE_PATH='/var/backup/full_dumps/' DAYS_TO_KEEP='7' for i in `find $DELETE_PATH -ctime +$DAYS_TO_KEEP`; do ls -lh "$i" #rm -vf "$i" done

The delete is commented out, so it will just list the files. Uncomment when you’re convinced it does what you want. Obviously, change the top two lines to suit your needs, and play around with find (for example, there’s an atime instead of my ctime). But it’s a handy little thing to have around and just adapt as needed.