hand, disk prices have also tumbled ($15,000 per disk in 1987), and disk latency and bandwidth have improved considerably (from 15 accesses per second to about 100 on consumer disks and 200 on high-performance enterprise disks).

For RAM and flash disks of 32GB, the break-even interval is

 

(256 / 6,200) × ($999 / $0.047) = 876 seconds ≈ 15 minutes

 

If the 2007 price for flash disks includes a “novelty premium” and comes down closer to the price of raw flash memory—say, to $400 (a price also anticipated by Gray and Fitzgerald13)— then the break-even interval is 351 seconds ≈ 6 minutes.

An important consequence is that in systems tuned using economic considerations, turnover in RAM is about 15 times faster ( 90 minutes / 6 minutes) if flash memory rather than a traditional disk is the next level in the storage hierarchy. Much less RAM is required, resulting in lower costs for purchase, power, and cooling.

Perhaps most interesting, applying the same formula to flash and disk results in the following:

 

(256 / 83) × ($80 / $0.03) = 8,070 seconds ≈ 2¼ hours

 

Thus, all active data will remain in RAM and flash memory.

Without a doubt, two hours is longer than any common checkpoint interval, which implies that dirty pages in flash are forced to disk not by page replacement but by checkpoints. Pages that are updated frequently must be written much more frequently (because of checkpoints) than is optimal based on Gray and Putzolu’s formula.

In 1987, Gray and Putzolu speculated 20 years into the future and anticipated a “five-hour rule” for RAM and disks. For 1KB records, prices and specifications typical in 2007 suggest 20,978 seconds, or just under six hours. Their prediction was amazingly accurate.

All break-even intervals are different for larger page sizes (64KB or even 256KB). Table 3 shows the break-even intervals, including those just cited, for a variety of page sizes and

flash memory falls
between traditional
RAM and persistent
mass storage
based on rotating
disks in terms
of acquisition
cost, access
latency, transfer
bandwidth, spatial
density, power
consumption, and
cooling costs.

combinations of storage technologies. (“$400” stands for a 32GB NAND flash drive available in the future rather than for $999 in 2007; in fact, 32GB SLC SATA drives are available at retail for $400 in 2009.)

The old five-minute rule for RAM and disk now applies to 64KB page sizes (334 seconds). Five minutes had been the approximate break-even interval for 1KB in 198715 and for 8KB in 1997.14 This trend reflects the different rates of improvement in disk-access latency and transfer bandwidth.

The five-minute break-even interval also applies to RAM and the expensive flash memory of 2007 for page sizes of 64KB and above (365 seconds and 339 seconds). As the price premium for flash memory decreases, so does the break-even interval (146 seconds and 136 seconds).

Two new five-minute rules are indicated with values in bold italics in Table 3. We will come back to this table and these rules in the discussion on optimal node sizes for B-tree indexes.

Page Movement

In addition to I/O to and from RAM, a three-level memory hierarchy also requires data movement between flash memory and disk storage.

The pure mechanism for moving pages can be realized in hardware (for example, by DMA transfer), or it might require an indirect transfer via RAM. The former case promises better performance, whereas the latter design can be realized entirely in software without novel hardware. On the other hand, hybrid disk manufacturers might have cost-effective hardware implementations already available.

The policy for page movement is governed or derived from demand-paging and LRU replacement. As mentioned earlier, replacement policies in both file systems and database systems may rely on LRU and can be implemented with appropriate data structures in RAM. As with buffer management in RAM, there may be differences resulting from prefetch, read-ahead, and write-behind. In database systems these may be directed by hints from the query execution layer, whereas file systems must detect page-access patterns

References:

Archives