Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Wear leveling

From Wikipedia, the free encyclopedia
Operating principle for certain storage media
A fragment of a road surface, heavily rutted by car wheels following the same path.
Deep ruts from car wheels following the same path. Repetitive use of memory cells leads to a similar effect. Wear leveling attempts to distribute "traffic" more evenly.

Wear leveling (also written aswear levelling) is a technique[1] for prolonging theservice life of some kinds of erasablecomputer storage media, such asflash memory, which is used insolid-state drives (SSDs) andUSB flash drives, andphase-change memory.

A view on stairs, where the central part deteriorated from people using mostly the middle section of each step.
Uneven wear on the central section of stairs, from pedestrians following a single path. Another everyday-life example of a similar issue.

The idea underpinning wear leveling is similar tochanging position of car tires, avoiding repetitive load from being used on the same wheel. Wear leveling algorithms distribute writes more evenly across the entire device, so no block is used more often than others.

The termpreemptive wear leveling (PWL) has been used byWestern Digital to describe their preservation technique used onhard disk drives (HDDs) designed for storing audio and video data.[2] However, HDDs generally are not wear-leveled devices in the context of this article.

Rationale

[edit]

EEPROM and flash memory media have individually erasable segments, each of which can be put through alimited number of erase cycles before becoming unreliable. This is usually around 3,000/5,000 cycles[3][4] but many flash devices have one block with a specially extended life of 100,000+ cycles that can be used by theflash memory controller to track wear and movement of data across segments.[citation needed] Erasableoptical media such asCD-RW andDVD-RW are rated at up to 1,000 cycles (100,000 cycles forDVD-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.[5] 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.[6][7]

Conventionalfile systems such asFAT,UFS,HFS/HFS+,EXT, andNTFS were originally designed for magnetic disks and as such rewrite many of their data structures (such as their directories) repeatedly to the same area. When these systems are used on flash memory media, this becomes a problem. The problem is aggravated by the fact that some file systems track last-access times, which can lead to filemetadata being constantly rewritten in-place.[8]

Types

[edit]

There are several wear leveling mechanisms that provide varying levels of longevity enhancement in such memory systems.[9][6]

No wear leveling

[edit]

A flash memory storage system withno wear leveling will not last very long if data is written to the flash. Without wear leveling, the underlying flash controller must permanently assign the logical addresses from theoperating 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 approach is very time-consuming and frequently written locations will wear out quickly, while other locations will not be used at all. Once a few blocks reach their end of life, such a device becomes inoperable.[9]

Dynamic wear leveling

[edit]

The first type of wear leveling is calleddynamic wear leveling and it uses a map to linklogical 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 asinvalid 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, flash memory blocks that never get replacement data would sustain no additional wear, thus the name comes only from the dynamic data being recycled. Such a device may last longer than one with no wear leveling, but there are blocks still remaining as active even though the device is no longer operable.[9][6]

Static wear leveling

[edit]

The other type of wear leveling is calledstatic 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 an SSD to continue to operate until most of the blocks are near their end of life.[9][6]

Global wear leveling

[edit]

Both dynamic and static wear leveling are implemented at the local level. This simply means that in a multi-chip product, every chip is managed as a single resource. The number of defective blocks in different chips within a NAND flash memory varies: a given chip could have all its data blocks worn out while another chip in the same device could have all its blocks still active. Global wear leveling addresses this problem by managing all blocks from all chips in the flash memory together―in a single pool. It ensures that all the cells in all the chips within the product are worn out evenly.[10][11]

Comparison

[edit]

The following table compares static and dynamic wear leveling:[6]

ItemStaticDynamic
EnduranceLonger life expectancyShorter life expectancy
PerformanceSlowerFaster
Design complexityMore complexLess complex
Typical useSSDs,[9]
industrial-grade flash drives[12]
Consumer-grade flash drives

Techniques

[edit]

There are several techniques for extending the media life:

  • A checksum orerror-correcting code can be kept for each block or sector in order to detect errors or correct errors.
  • A pool ofoverprovisioned 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 aleast frequently used (LFU) queue. 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. However, usualcache algorithms are designed to manage the data flow into and out ofRAM-based caches, making them not directly suitable forflash-based storage devices as they have an asymmetrical nature – reads are usually much faster than writes, and erase operations can be performed only one "block" at a time.[13]
  • Garbage collection

OnSecure Digital cards andUSB flash drives,[12] techniques are implemented in hardware by a built-inmicrocontroller. On such devices, wear leveling istransparent, and conventional file system such asFAT can be used on them as-is.

Wear leveling can also be implemented in software by special-purpose file systems such asJFFS2 andYAFFS on flash media orUDF on optical media. All three arelog-structured file systems in that they treat their media as circular logs and write to them in sequential passes. File systems which implementcopy-on-write strategies, such asZFS, also implement a form of wear leveling.

See also

[edit]

References

[edit]
  1. ^U.S. patent 6,850,443 Wear leveling techniques for flash memory systems.
  2. ^"Western Digital AV Hard Drive Product Information". Western Digital. Archived fromthe original on 2010-01-02. Retrieved2010-06-01.
  3. ^"So you wanna buy a SSD? Read this first".Hardware Canucks. 10 January 2011.
  4. ^"SSDs Shifting to 25nm NAND - What You Need to Know | StorageReview.com - Storage Reviews".www.storagereview.com. February 12, 2011. Archived fromthe original on December 5, 2019. RetrievedDecember 5, 2019.
  5. ^"Algorithms and data structures for flash memories", E. Gal, and S. Toledo, ACM Computing Surveys, 2005
  6. ^abcde"USB Flash Wear-Leveling and Life Span"(PDF).Corsair. June 2007. Archived fromthe original(PDF) on 13 October 2007. Retrieved27 July 2013.
  7. ^Arnd Bergmann (2011-02-18)."Optimizing Linux with cheap flash drives".LWN.net. Retrieved2013-10-03.
  8. ^Jonathan Corbet (2007-08-08)."Once upon atime".LWN.net. Retrieved2014-01-21.
  9. ^abcdePerdue, Ken (2010-04-30)."Wear Leveling Application Note"(PDF).Spansion. Archived fromthe original(PDF) on 2011-06-07. Retrieved12 August 2010.
  10. ^"Wear Leveling".Transcend. Retrieved20 November 2019.
  11. ^"Wear Leveling – Static, Dynamic and Global"(PDF).Cactus: 5. Retrieved20 November 2019.
  12. ^ab"Swissbit Industrial SD Memory Cards".Mouser Electronics. Retrieved21 April 2017.
  13. ^Qing Yang (2012-02-25)."Why Standard Cache Algorithms Won't Work For SSDs". velobit.com. Retrieved2013-11-26.

External links

[edit]
Key terminology
Flash manufacturers
Controllers
Captive
Independent
SSD manufacturers
Interfaces
Configurations
Related organizations
Retrieved from "https://en.wikipedia.org/w/index.php?title=Wear_leveling&oldid=1283566497"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp