and hard drives; flash is interesting
because it falls in a sweet spot between
those two components for both cost
and performance in that flash is significantly cheaper and denser than DRAM
and significantly faster than disk. Flash
can accordingly augment the system to
form a new tier in the storage hierarchy—perhaps the most significant new
tier since the introduction of the disk
drive with RAMAC in 1956.
Properties of flash
Flash has two distinct categories:
NAND and NOR—designations that
refer to the way the flash cells are arranged. NOR flash allows for random
access and is best suited for random
access memory, while NAND must be
treated as blocks and is ideal for persistent storage. The rest of this article
examines only NAND flash, the cheaper and more common variety, of which
again there are two types: single-level
cell (SLC) and multilevel cell (MLC).
SLC stores a single binary value in
each memory cell. The binary value is
distinguished by two threshold voltages. MLC supports four or, recently,
eight distinct values per memory cell
corresponding to two or three bits of
storage. Because of its improved longevity and performance, the conventional wisdom is that SLC is best suited
for enterprise (that is, not consumer-grade) solutions, so our focus here is
on SLC flash, its cost, power dissipation, performance, and longevity as
compared with DRAM and disk drives
(see Figure 1).
The cost per unit storage is what
has brought flash to the forefront in
recent years (see Figure 2). Earlier this
decade, flash costs were on par with
those of DRAM; now, flash devices
are much less expensive: $10–$35 per
GB for an SLC flash device compared
with around $100 per GB for DRAM.
The cost trend appears to be continuing to widen the gap between flash
and DRAM. Disk drives are still much
cheaper than flash, weighing in at less
than $1 per GB for 7,200RPM drives
and in the neighborhood of $3 per GB
for 15,000RPM drives.
The other exciting attribute of flash
is its low power consumption. As the
cost of power and the impetus toward
green computing rise, so does the attractiveness of lower-power solutions.
While completely accurate comparisons between flash, DRAM, and hard
drives are difficult because of differences in capacity and interfaces, it’s fair to
say that flash consumes significantly
less power than those other system
components, especially on a per-giga-byte basis. The accompanying table records the power consumption for some
typical components to provide a broad
sense for each type of device.
The performance of flash is a bit
unusual in that it’s highly asymmetric, posing a challenge for using it in a
storage system. A block of flash must
be erased before it can be written,
which takes on the order of 1– 2 ms for
a block, and writing to erased flash requires around 200–300 µs. For this reason flash devices try to maintain a pool
of previously erased blocks so that the
latency of a write is just that of the program operation. Read operations are
much faster: approximately 25 µs for
4k. By comparison, raw DRAM is even
faster, able to perform reads and writes
in much less than a microsecond. Disk-drive latency depends on the rotational
speed of the drive: on average 4. 2 ms for
7,200RPM, 3 ms for 10,000RPM, and 2
ms for 15,000RPM. Adding in the seek
time bumps these latencies up an additional 3– 10 ms depending on the quality of the mechanical components.
SLC flash is typically rated to sustain
one million program/erase cycles per
block. As flash cells are stressed, they
lose their ability to record and retain
values. Because of the limited lifetime,
flash devices must take care to ensure
that cells are stressed uniformly so
that “hot” cells don’t cause premature
device failure, a technique known as
wear-leveling. Just as disk drives keep
a pool of spare blocks for bad-block
remapping, flash devices typically
present themselves to the operating
system as significantly smaller than
the amount of raw flash to maintain a
reserve of spare blocks (and pre-erased
blocks to improve write performance).
Most flash devices are also capable of
estimating their own remaining lifetimes so systems can anticipate failure
and take prophylactic action.
today’s Storage hierarchy
Whether over a network or for local access, primary storage can be succinctly
summarized as a head unit containing
CPUs and DRAM attached to drives either in storage arrays or JBODs (just a
bunch of disks). The disks comprise
the primary repository for data—
typical modern data sets range from a few
hundred gigabytes up to a petabyte or
more—while DRAM acts as a very fast
cache. Clients communicate via read
and write operations. Read operations
are always synchronous in that the client is blocked until the operation is serviced, whereas write operations may be
either synchronous or asynchronous
depending on the application. For example, video streams may write data
blocks asynchronously and verify only
at the end of the stream that all data
has been quiesced; databases, however, use synchronous usually writes to
ensure that every transaction has been
figure 1: DRam, 15K RPm drives and SSD: Price and performance.
DRAM
SSD
15K RPM
10000
5500
1000
125
100
85
25
10
3
1
0.9
0.1
access μsecs