Wear leveling

Wear leveling

Wear leveling (also written wear levelling) is a technique[1] for prolonging the service life of some kinds of erasable computer storage media, such as Flash memory used in solid-state drives (SSDs) and USB Flash drives. There are a few wear leveling mechanisms used in Flash memory systems, each with varying levels of longevity enhancement.[2][3]

The term preemptive wear leveling (PWL)[4] has been used by Western Digital to describe their preservation technique used on audio-video hard disks, but hard disk drives are not generally wear-leveled devices in the context of this article.

Contents

Rationale

EEPROM and flash memory media have individually erasable segments, each of which can be put through a limited number of erase cycles before becoming unreliable. This is usually around 3,000/5,000 cycles[5][6] but many flash devices have one block with a specially extended life of 100,000+ cycles that can be used by the Flash memory controller to track wear and movement of data across segments. Erasable optical media such as CD-RW and DVD-RW are rated at up to 1,000 cycles (100,000 cycles for DVD-RAM media).

Wear leveling attempts to work around these limitations by arranging data so that erasures and re-writes are distributed evenly across the medium. In this way, no single erase block prematurely fails due to a high concentration of write cycles. In flash memory, a single block on the chip is designed for longer life than the others so that the memory controller can store operational data with less chance of its corruption.[3]

Conventional file systems such as FAT, UFS, HFS, ext2, and NTFS were originally designed for magnetic disks and as such rewrite many of their data structures (such as their directories) repeatedly to the same area. Some file systems aggravate the problem by tracking last-access times, which can lead to file metadata being constantly rewritten in-place.

Types

There are three basic types of wear leveling mechanisms used in Flash memory storage devices:[2]

  • No wear leveling
  • Dynamic wear leveling
  • Static wear leveling

A Flash memory storage system with no wear leveling will not last very long if it is writing data to the flash. Without wear leveling, the Flash controller must permanently assign the logical addresses from the Operating System (OS) to the physical addresses of the Flash memory. This means that every write to a previously written block must first be read, erased, modified, and re-written to the same location. This is very time consuming and highly written locations will wear out quickly with other locations even being completely unused. Once a few blocks reach their end of life the drive is no longer operable.[2]

The first type of real leveling is called dynamic wear leveling and it uses a map to link Logical Block Addresses (LBAs) from the OS to the physical Flash memory. Each time the OS writes replacement data, the map is updated so the original physical block is marked as invalid data, and a new block is linked to that map entry. Each time a block of data is re-written to the Flash memory it is written to a new location. However, blocks that never get replacement data sit with no additional wear on the Flash memory. The name comes from only the dynamic data is being recycled. The drive may last longer than one with no wear leveling, but there are blocks still remaining as active that will go unused when the drive is no longer operable.[2][3]

The other type of wear leveling is called static wear leveling which also uses a map to link the LBA to physical memory addresses. Static wear leveling works the same as dynamic wear leveling except the static blocks that do not change are periodically moved so that these low usage cells are able to be used by other data. This rotational effect enables the SSD to operate until most of the blocks are near their end of life.[2][3]

Comparison between Static and Dynamic wear leveling[3]
Item Static Dynamic
Endurance Longer life expectancy Shorter life expectancy
Performance Slower Faster
Design Complexity More complex Less complex
Typical Use SSDs[2] USB Flash Drives

Techniques

There are several techniques for extending the life of the media:

  • A checksum or error-correcting code can be kept for block or sector in order to detect errors or correct errors.
  • A pool of reserve space can also be kept. When a block or sector does fail, future reads and writes to it can be redirected to a replacement in that pool.
  • Blocks or sectors on the media can be tracked in a least recently used queue of some sort. The data structures for the queue itself must either be stored off-device or in such a way that the space it uses is itself wear-leveled or, in the case of flash memory, in a block with a specially extended life.

M-Systems' product DiskOnChip used a software driver named TrueFFS which performed wear-leveling of NAND flash chips and made them appear to OS like a conventional disk drive. On most contemporary flash memory devices, such as CompactFlash and Secure Digital cards, these techniques are implemented in hardware by a built-in microcontroller. On such devices, wear leveling is transparent and most conventional file systems can be used as-is on them.

Wear leveling can also be implemented in software by special-purpose file systems such as JFFS2 and YAFFS on flash media or UDF on optical media. All three are log-structured file systems in that they treat their media as circular logs and write to them in sequential passes. File systems which implement Copy-on-write strategies, such as ZFS, also implement a form of wear leveling.

See also

  • Flash file system
  • Write amplification

References

  1. ^ U.S. Patent 6,850,443 Wear leveling techniques for flash EEPROM systems.
  2. ^ a b c d e f Perdue, Ken (2010-04-30). "Wear Leveling Application Note". Spansion. http://www.eettaiwan.com/STATIC/PDF/200808/EETOL_2008IIC_Spansion_AN_13.pdf. Retrieved 12 August 2010. 
  3. ^ a b c d e "USB Flash Wear-leveling and Life Span". Corsair. June 2007. http://www.corsairmemory.com/_faq/FAQ_flash_drive_wear_leveling.pdf. Retrieved 12 August 2010. 
  4. ^ "Western Digital AV Hard Drive Product Information". Western Digital. http://www.wdc.com/en/products/products.asp?driveid=285. Retrieved 2010-06-01. 
  5. ^ http://www.hardwarecanucks.com/forum/storage/39762-so-you-wanna-buy-ssd-read-first.html
  6. ^ http://www.storagereview.com/ssds_shifting_25nm_nand_what_you_need_know

External links



Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Wear-Leveling — Ein Solid State Drive (SSD, dt. Festkörperlaufwerk), auch Solid State Disk (dt. Festkörperplatte) genannt, ist ein Speichermedium, das wie eine herkömmliche Festplatte eingebaut und angesprochen werden kann, ohne eine rotierende Scheibe oder… …   Deutsch Wikipedia

  • Wear leveling — Wear levelling Le wear levelling en informatique vise à prolonger la durée de vie d un support de stockage non volatile tel qu une mémoire flash en distribuant uniformément le nombre d écritures et d effacements sur toute l espace de stockage . L …   Wikipédia en Français

  • Static Wear Leveling — articleissues article=y context=December 2007 technical=June 2008 copyedit=June 2008Applications of NAND flash memory have now grown much beyond its original design goals. For instance, Intel proposed the Robson solution by using flash memory as… …   Wikipedia

  • Wear levelling — (also written wear leveling) is a techniqueUS patent|6850443 Wear leveling techniques for flash EEPROM systems.] for prolonging the service life of some kinds of erasable computer storage media, such as flash memory. The term has also been used… …   Wikipedia

  • Flash memory — Computer memory types Volatile RAM DRAM (e.g., DDR SDRAM) SRAM In development T RAM Z RAM TTRAM Historical Delay line memory Selectron tube Williams tube Non volatile …   Wikipedia

  • CompactFlash — A 64 MiB CompactFlash Type I card Media type Mass storage device format Encoding Various file systems Capacity 2 MB to 128 GB …   Wikipedia

  • Comparison of memory cards — This table provides summary of comparison of various flash memory cards, as of 2011[update]. Contents 1 Common information 2 Physical details 3 …   Wikipedia

  • Festkörperlaufwerk — Ein Solid State Drive (SSD, dt. Festkörperlaufwerk), auch Solid State Disk (dt. Festkörperplatte) genannt, ist ein Speichermedium, das wie eine herkömmliche Festplatte eingebaut und angesprochen werden kann, ohne eine rotierende Scheibe oder… …   Deutsch Wikipedia

  • Flash-Laufwerke — Ein Solid State Drive (SSD, dt. Festkörperlaufwerk), auch Solid State Disk (dt. Festkörperplatte) genannt, ist ein Speichermedium, das wie eine herkömmliche Festplatte eingebaut und angesprochen werden kann, ohne eine rotierende Scheibe oder… …   Deutsch Wikipedia

  • HHDD — Ein Solid State Drive (SSD, dt. Festkörperlaufwerk), auch Solid State Disk (dt. Festkörperplatte) genannt, ist ein Speichermedium, das wie eine herkömmliche Festplatte eingebaut und angesprochen werden kann, ohne eine rotierende Scheibe oder… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”