You are on page 1of 3

Media Management in Solid State Drives: Multistep WRITE Operations

Doug Rollins, Senior Strategic Applications Engineer


Micron Technology, Inc. Technical Marketing Brief

Solid state drives (SSDs) may appear very similar to conventional rotating hard drives, but the similarity is only supercial. An examination of the data-handling processes of an SSD reveals that SSDs actually share very little in common with legacy drives. One key example is the difference in the way that each type of drive overwrites existing datarotating drives overwrite in a single step, whereas NAND Flash-based SSDs require additional steps. This brief examines the multistep write process for SSDs.

Background: The Basics of SSD Design


To understand how SSDs overwrite data, we must rst understand how they are constructed. Any SSD (Micron or otherwise) has the following basic components: Host interface Printed circuit board NAND controller NAND

NAND

Printed circuit board

NAND controller

HOST interface

Figure 1: SSD components

Multistep WRITE Operations

Write Process Differences


Data is written differently to NAND than it is written to a rotating hard driveNAND that contains data (whether valid or invalid) must rst be erased; only then can it have new data written to it. In a nutshell, the erase process rst erases an entire block; only then can the pages in that block have new data written to them. Because NAND that already has data in it must be erased before new data can be written to it, the write sequence for a device that is full (has no empty/erased pages) is very different from that of a device that is empty (or has enough empty/erased pages to absorb the incoming write trafc).

Empty/Erased Pages Available


Suppose we were able to ensure we had empty/ erased pages ready at all times. As the write comes into the SSD, the process ow would look similar to that of a rotating drive: 1. Data comes into the SSD from the host interface, resulting in a write request (that will eventually be written to the NAND). 2. Are there any empty/erased pages (that is, pages that are ready to be written to)? In Figure 1, empty/erased pages are available. 3. Write the data to the available pages. This write process is accomplished in a single step, just like rotating drives. Typically, this is much faster than writing to an SSD with no empty/erased pages (as shown in Figure 2).

Data comes in to SSD

Are there sufficient empty/erased pages? Yes

Write data

DATA

DATA

DATA

Figure 2: Sufcient empty/erased pages available

Data comes into SSD

Are there sufficient empty/erased pages?

Write data

DATA

DATA

DATA

No

Locate a block that can be erased

Erase block

Figure 3: Insufcient empty/erased pages available

Multistep WRITE Operations

Insufcient Empty/Erased Pages Available


Suppose now that we have an SSD with insufcient empty/erased pages. As new data is written to the SSD, it requires that cells be erased immediately before that write happens: 1. Data comes into the SSD from the host interface, resulting in a write request (that will eventually be written to the NAND). 2. Are there sufcient empty/erased pages (that is, pages that are ready to be written to)? In Figure 2, insufcient empty/erased pages are available. 3. Locate a block whose data has been invalidated or whose valid data can be moved, making it a good erase candidate, and then call the garbage-collection routine (see the New Drives vs. Used Drives section that follows) to enable this block for erasure. 4. Erase this block. (Repeat as necessary to store the data in the write request.) 5. Write the data to the newly erased/empty pages. Step 4 can be slow to complete because erasing NAND takes much longer than writing to itany NAND erase cycle is slow (typically, it takes 250 microseconds [s] to write to an MLC cell, but 1500s to erase it).

Conclusion
If a NAND-based SSD is full, writing new data to it is a very different process compared to writing to an empty SSD. If the drive is empty, the write process is very similar to rotating drives. However, if the SSD already contains data, additional steps are required: 1. The SSD must determine if sufcient free space exists to accept the data. 2. If not, it calls its garbage-collection routine to group and move valid data so that an entire block can be erased (so that the pages in the block can receive new data). 3. The block is erased. 4. The data is written. These extra steps are all handled by the SSD controller without host intervention, but results in performance variation. See the SSD Performance States white paper: micron.com/ssd_performance_states on Micron.com for more information.

New Drives vs. Used Drives


If you are using a brand-new SSD, the write process proceeds in the same way as Figure 1. A new SSD is empty; all its pages will be empty and ready to receive new data, so the erase step is rarely performed as data is being written. However, as the drive fills, the number of these empty/erased pages decreases and will eventually be consumed. There is a background process in SSDs that frees up pages whose data has been invalidated, making them good candidates to be erased. This background process is called garbage collection. Garbage collection is the process of examining blocks that contain some invalid (deleted) data and moving the remaining valid data to another location in preparation for block erasure.

micron.com
Products are warranted only to meet Microns production data sheet specications. Products and specications are subject to change without notice.
2012 Micron Technology, Inc. Micron, the Micron logo, and RealSSD are trademarks of Micron Technology, Inc. All other trademarks are the property of their respective owners. All rights reserved. 04/12 EN.L M:11841

You might also like