IT

Networked storage on the cheap

As hard drives get denser, the cost of raw storage is getting ridiculously cheap – well under a dollar per gigabye as I write. The cost of managed storage, however, is an entirely different story.

Managed storage is the kind required for “enterprise applications”, i.e. when money is involved. It builds on raw storage by adding redundancy, the ability to hot-swap drives, to add capacity without disruption. In the higher-end of the market, additional manageability features include fault tolerance, the ability to take “snapshots” of data for backup purposes, and to mirror data remotely for disaster recovery purposes.

Traditionally, managed storage has been more expensive than raw disk by a factor of at least two, sometimes even an order of magnitude or more. When I started my company in 2000, for instance, we paid $300,000, almost half of our initial capital investment, for a pair of clustered Network Appliance F760 filers, with a total disk capacity of 600GB or so ($500/GB, when disk drives would cost $10/GB at the time). The investment was well worth it, as these machines have proven remarkably reliable, and the Netapps’ instant snapshot capability is vital for us, as it allows us to take instantaneous snapshots of our Oracle databases, which we can then back up in a leisurely backup window, without having to keep Oracle in the performance-sapping backup mode during that time.

Web serving workloads and the like can easily be distributed across farms of inexpensive rackmount x86 servers, an architecture pioneered by ISPs. Midrange servers (up to 4 processors), pretty much commodities nowaday, are adequate for all but the very highest transaction volume databases. Storage and databases are the backbone of any information system, however, and a CIO cannot afford to take any risks with them, that is why storage represents such a high proportion of hardware costs for most IT departments, and why specialists like EMC have the highest profit margins in the industry.

Most managed storage is networked, i.e. does not consist of hard drives directly attached to a server, but instead of disks attached to a specialized storage appliance connected to the server with a fast interconnect. There are two schools:

  • Network-Attached Storage (NAS), like our Netapps, that basically serve act as network file servers using common protocols like NFS (for UNIX) and SMB (for Windows). These are more often used for midrange applications and unstructured data, and connect using inexpensive Ethernet (Gigabit Ethernet, in our case) networks every network administrator is familiar with. NAS are available for home or small office use, at prices of $500 and up.
  • Storage Area Networks (SAN) offer a block-level interface (they behave like virtual hard drives that serve fixed-size blocks of data, without any understanding of what is in them). They currently use Fibre Channel, a fast and low latency interconnect, that is unfortunately also terribly expensive (FC switches are over ten times more expensive than equivalent Gigabit Ethernet gear). The cost of setting up a SAN usually limits them to high-end, mainframe-class data centers. Exotic cluster filesystems or databases like Oracle RAC need to be used if multiple servers are going to access the same data.

One logical way to lower the cost of SANs is to use inexpensive Ethernet connectivity. This was recently standardized as iSCSI, which is essentially SCSI running on top of TCP/IP. I recently became aware of Ximeta, a company that makes external drives that apparently implement iSCSI, at a price that is very close to that of raw disks (since iSCSI does not have to manage state for clients the way a more featured NAS does, Ximeta can shun expensive CPUs and RAM, and use a dedicated ASIC instead).

The Ximeta hardware is not a complete solution, and the driver software manages the metadata for the cluster of networked drives, such as the information that allows multiple drives to be concatenated to add capacity while keeping the illusion of a single virtual disk. The driver is also responsible for RAID, although Windows, Mac OS X and Linux all have volume managers capable of this. There are apparently some Windows-only provisions to allow multiple computers to share a drive, but I doubt they constitute a full-blown clustered filesystem. There are very few real-world cases in the target market where anything more than a cold standby is required, and it makes a lot more sense to designate one machine to share a drive for the others in the network.

I think this technology is very interesting and has the potential to finally make SANs affordable for small businesses, as well as for individuals (imagine extending the capacity of a TiVo by simply adding networked drives in a stack). Disk-to-disk Backups are replacing sluggish and relatively low-capacity tape drives, and these devices are interesting for that purpose as well.

Keyspan USB Server review

I saw the Keyspan USB Server at MacWorld SF a few months ago, but it has only recently started to ship (I received mine yesterday). This device allows you to connect a Mac or PC to up to 4 USB 1.1 peripherals remotely over Ethernet, much as a print server allows you to access remote printers. It also allows sharing of USB devices between multiple computers.

I use it to reduce clutter in my apartment by moving away bulky items like my HP 7660 printer and my Epson 3170 scanner away from the iMac in my living room, which has progressively become my main computer, even though it is probably the slowest machine I have.

You install the driver software (Windows 2000/XP or Mac OS X, no drivers for Linux so far), and it creates a simulated USB hub device that takes care of bridging the USB requests over Ethernet. There is a management program that allows you to configure the settings on the USB Server such as the IP address (zeroconf, a.k.a RendezVous is supported, a nice touch), password and access mode. The user interface is functional, if not perfectly polished. To use a USB peripheral hooked to the USB server, you fire up the admin client, select one of the USB devices and take a “lease” on it. I have links to some screen shots of the GUI below:

The process is as smooth as it can possibly be, given that USB devices are not designed to be shared between multiple hosts, and thus some form of locking had to be provided. I tried my scanner over the Ethernet, and have not noticed any perceptible degradation in performance. The software copes with sleep mode correctly. The only nit I would have to pick is that the power adapter “wall wart” DC connector slips off the device too easily (not enough friction to hold it in place), disconnecting it.

Many families are becoming multi-computer households. The Keyspan USB Server is a surprisingly effective way to share peripherals or to move bulky and seldom used peripherals out of the way. At a street price of around $100, it is not inexpensive, but I found it a very worthwhile accessory for my home network.

Information Lifecycle Management and the cost of forgetfulness

Maxwell’s demon is a classic thought experiment that illustrates the second law of thermodynamics. The conundrum drove Ludwig Boltzmann to suicide. Leo Szilard, a contemporary and friend of Einstein, and one of the first proponents of the atomic bomb, provided the first refutation in 1929 – Maxwell’s demon appears to create energy from scratch, but what it is really doing is transferring entropy to the outside world.

In his analysis, Szilard considered alternative demons that would overcome his objection, and for one of them, now known as the Szilard Engine, his interesting conclusion is that it cannot work because forgetting information from memory in itself incurs thermodynamic costs. To make a real-world analogy – you may pay to get information in the form of your daily newspaper, but disposing of all that paper also incurs real costs in the form of garbage hauling taxes, even if you are not aware of them. In the cosmic order, getting rid of data is as important as acquiring it in the first place.

One of the buzzwords of the day in IT is Information Lifecycle Management, This basically means using a fancy database to track information assets, how they are stored, backed up and disposed of in accordance to retention policies and various legislative mandates like the Sarbanes-Oxley law. Companies like Microsoft discovered to their dismay the consequences of having incriminating information dragged into court under subpoena.

It seems the price of forgetfulness is eternal vigilance…

A side note – one of the things that seems consistently forgotten whenever designing a database is archiving and deleting old historical data – the data just keeps accumulating, usually until the database becomes obsolete and is decommissioned or the original designers have moved on to other jobs. In large scale databases, the efficient archiving of data requires partitioning, and is several orders of magnitude harder if the partitioning was poorly designed in the original data model. For instance, if some classers of historical data have to be held for longer retention period than others, make sure they are stored in different partitions as well, otherwise separating them will require lengthy batches. If you are specifying a database today, for your successors’ sake, plan for the orderly disposal of data once it is no longer relevant.

Tracing telephone number prefixes

I recently had a project where I needed to find out what telco served users based on their phone number (US only). Area code tables are a dime a dozen, but only give you the state, and I needed finer granularity than that, including the ability to drill down to the first three digits of the local phone number, for a total of 6 digits known in industry parlance as the NPA-NXX.

The solution I found is to go straight to the source: the website of the company tht administers the North American numbering plan on behalf of the FCC (the NANP actually covers more than the US, including Canada and some Caribbean countries, but the registrar I am refering to only covers the US).

They have a very convenient page with downloadable tables of NPA-NXX to carrier assignments. As an example, here is the entry for my home phone number:

Entry for 415-359-0918
StateNPA-NXXOCNCompany name Rate centerSwitchUse
CA415-3599740Pacific Bell SFNC CNTRLSNFCCA12DS0Assigned

OCN is the operating company number, a numeric code they use for carriers. The “rate center” (usually the city or town name) is unfortunately encoded using the proprietary Telcordia Common Language standards rather than in plain English, and you need to pay a license fee to get that database. The carrier name also varies wildly. Pac Bell has been fully subsumed under the SBC brand name, but the old identity still linger in these tables (Verizon, in contrast, has been much more diligent at having these tables updated, even when the pre-merger name is still mentioned).

With number portability, specially the forthcoming wired to wireless number portability required by the FCC, this information will be less useful as you will be able to have, say a New York phone number but actually be in Tokyo using a Vonage VoIP box (possibly even one with a ported number), but it is still a useful resource that is not widely known.

Update (2004-10-25):

This page is the most popular Google search on my website. If all you want is to look up a phone number and don’t want to go through the hassle of importing all the NANPA tables, there are a number of NPA-NXX search pages available on the web.

Sessions must die

Many e-commerce sites have session timeouts. Dawdle too long between the moment you enter the site and the moment you actually want to buy something, and you will be presented with an unpleasant message. The words “session timeout” will be there, drowned in a sea of technobabble, and you will have to restart from scratch. Using a bookmark will often have the same effect.

At this point, you may well be tempted to go shop elsewhere; indeed, it is the only principled response to such blatant contempt for customers. You will notice that successful sites like Amazon.com do not make their customers suffer such hassles – once you’re in, you are in, whether you have to take a lunch break or not. I don’t buy the security argument either – there is nothing sensitive about the contents of a cart, security belongs at checkout time, not browse time.

The reason why such crimes against usability are perpetrated is that business requirements too often take a back seat to technical expediency, paradoxically most often due to lack of technical competence. Many web development environments keep track of what you do on a website, the contents of your cart, and so on, in “sessions”, portions of memory that are set aside for this book-keeping purpose. They cannot be set aside forever, and must be purged to make room for new customers.

The tyro programmer will leave the default policy in place, which is to dump the session altogether and place the burden of recovering state on the customer. More experienced programmers will implement the session mechanism in a database so it can be kept almost indefinitely. In an era where disk space costs a dollar or two per gigabyte, and a desktop computer has enough processing power to crunch tens of thousands of transactions per minute, there is no justification for not doing so.