Getting rid of the disks
Originally published 2002 in Atomic: Maximum Power Computing Last modified 03-Dec-2011.
Hard drives suck.
Oh, sure, they're several times faster and have thousands of times as much capacity as used to be normal, back in the days when most computers didn't have a hard drive at all. And, sure, they're cheap - 120Gb or more, as I write this, for the price of an unremarkable CPU. And modern drives are pretty reliable, and highly compatible with each other, and you haven't had to do low level formats or run head parking programs for years now.
But they still suck.
A fast consumer hard drive these days - which, these days, probably still means a 7200RPM parallel ATA unit, even though 10,000RPM speedsters are now available that use the Serial ATA interface - can manage maximum sustained transfer rates of about 50 and 30 megabytes per second, for read and write operations, respectively. Seek operations - moving the head assembly to where it needs to be to get at some data - take several milliseconds, at least.
Compared with RAM, that's appallingly slow.
Even basic PC100 SDRAM (remember that?) can shift a few hundred real-world megabytes per second each way, and has access times - analogous to seek speed - well below 100 nanoseconds. One millisecond equals one million nanoseconds.
RDRAM and DDR SDRAM are faster again. Well, for transfers, anyway. Let's not get into the fraught subject of RDRAM latency, lest Rambus sue us.
Now, there exist things called Solid State Disks - SSDs. You connect them like a disk drive, but they have no moving parts; they store data in RAM. Run your PC from an SSD instead of a regular disk drive and any "disk" operation will be blindingly fast.
But you can't buy SSDs for ordinary PCs.
[This article is old and dusty - of course, you now can get various kinds of SSD for ordinary PCs. I write about them here and here, among other places.]
Well, you can, but you don't want to. For two reasons.
The minor reason why you don't want an SSD is that you can't get them with an ATA (IDE) interface - well, not unless you use a CompactFlash memory card with an IDE connector adapter, or a larger capacity and more expensive Flash memory drive. That does qualify as an ATA SSD, and the CompactFlash option gives you a very physically small one too, but the flash memory will poop out after 100,000 to a million write cycles. Which it'll reach surprisingly quickly if you put a swap file on it.
There are quite a few Flash-based SSD products for applications where the word "rugged" features on the spec sheet; none of them are any good for big fat Microsoft OSes.
Besides Flash RAM widgets, every kind of SSD that can be used with an IBM compatible machine is SCSI. And many of them, unsurprisingly, use the fastest SCSI flavours, controller cards for which are the most expensive.
The prices of the SCSI cards fade into insignificance compared with the prices of the drives themselves, though. Even once you filter out the giant stand-alone Network Attached Storage appliances and look only at things made for 3.5 and 5.25 inch drive bays, you'll still find that $US3 per megabyte is a pretty good price.
Why the heck do SSDs exist, then?
Well, mainly so that people can add large amounts of fast storage to architectures that can't accept any more main memory. The PC architecture has this problem, but it doesn't generally matter, because a few gigabytes of RAM is still adequate for the jobs practically all PCs have to do. Minicomputers and other Medium-To-Big Iron, on the other hand, often have to handle very large data sets and can benefit from tens of gigabytes of RAM - but can't necessarily accept it.
If you're a corporation that really, really doesn't want to tear down its dinosaur pens and rewrite all of its software to run on a more modern architecture, but if you also really, really need that vast database of yours to stop crawling, then you upgrade one or more of your dinosaurs to SSDs instead of magnetic storage, and the problem's solved. From the point of view of serious corporate customers, $US100,000 can be a great big bargain.
What if someone started making SSDs for the consumer market, though? How cheap could they be?
Well, assuming you wanted a mere 20Gb drive (20 real 1024-megabyte gigabytes, not 20 fake 1,000,000,000-byte hard drive manufacturers' gigabytes...), you'd be talking an easy $US2000 just for the memory chips, and rudimentary packaging of same. Probably more, since you'd want to have fewer than 640 chips inside the thing. Getting the chip count down to a mere 160 would require 1024 megabit chips, which cost more per megabyte than the 256 megabit chips you'd have to use to get a mere $US2000 RAM price.
So there's that.
And then there's the uninterruptible power supply (UPS), and the 20Gb magnetic drive that you'd need to stick to the SSD proper, to save its contents when it was powered down. And the electronics to make all this happen, activating an automatic RAM-to-disk backup if the drive lost power. If you made the UPS huge enough then the SSD could stay powered up constantly and never need to do that backup, but you really want the magnetic backup to be there, in case there's no power for long enough that the battery runs out of juice, or if something happens to kill the RAM chips. If you want to add more RAM chips for RAID 5-ish protection from damage to any one chip, multiply your chip count by 1.5.
Writing the entire contents of your tiddly little 20Gb SSD to the magnetic drive will probably take something like a quarter of an hour, but if the SSD isn't full it'll be faster. A clever constant-mirroring system could reduce the wait further, by pre-writing whatever it could whenever there was a spare moment. At the price of wearing out the magnetic drive, of course.
Reading back the data on startup would be faster per megabyte; a full 20Gb drive could be ready to go in less than ten minutes. Again, clever backing electronics could let the drive work from magnetic storage while it filled its multi-gigabyte "cache", but do that and you say goodbye to your zooty five second system boot.
Anyway, for the components in the SSD besides the RAM, I doubt you'd get away for less than another $1000.
Add a conservative profit margin, and you've got a 20Gb drive that's really fast as long as you're not turning it on and off often, but which costs $US3,000 at the very least, and could quite easily be more than $US5,000.
A mere $US5,000 would be something of a price sensation by the standards of current large capacity SSDs, whose prices aren't dropping nearly as quickly as are those of magnetic media. But, as I write this, $US5,000 will buy you more than five terabytes worth of 120Gb 7200RPM commodity ATA drives. They're a lot slower, of course, but 250 times as much storage as a probably-unrealistically-cheap-SSD makes up for a lot.
If your operating system's virtual memory management isn't all that it might be, then putting your swap file in RAM one way or another - on a software-created RAM disk, or on an SSD - is a good idea. The same goes for any other temporary files that you don't mind losing when you reboot the computer. Stuff like that, you don't need to back up, so an SSD to hold them doesn't need to be backed by a regular drive.
But if all you want is a gigabyte or two of total system memory in a PC, then your PC can probably handle it already; you might as well just install a lot of system RAM and use that. It'll be faster, because RAM buses are way faster than hard drive buses. And it can't help but be cheaper than any SSD option.
You can't physically install 20Gb of RAM in a current PC, of course (it'll be possible if and when we're all using 64 bit CPUs...). If you want to do a task that needs that much RAM right now, then you need a serious workstation or server, and probably not one with an Intel-compatible CPU. The sensible solution is to buy that beefier non-Intel box, not to drop many kilobucks on an SSD for a PC.
In the olden days, there were computers that used mechanical magnetic storage as main memory - drum memory machines, for instance. Those sorts of designs benefited vastly from having the rotating part replaced with a solid state one; it was well worth the money, for any application that hit main memory at all heavily.
Modern PCs aren't like that.
If you're doing database serving or some other task that your main memory is far too small to effectively handle, then faster storage will give you proportionally faster system performance. Desktop computers that're doing desktop computer tasks and that aren't starved for physical RAM, however, gain little from faster drives.