TWI643069B - Dynamic management of flash memory - Google Patents
Dynamic management of flash memory Download PDFInfo
- Publication number
- TWI643069B TWI643069B TW106146456A TW106146456A TWI643069B TW I643069 B TWI643069 B TW I643069B TW 106146456 A TW106146456 A TW 106146456A TW 106146456 A TW106146456 A TW 106146456A TW I643069 B TWI643069 B TW I643069B
- Authority
- TW
- Taiwan
- Prior art keywords
- flash memory
- nand flash
- memory
- slc cache
- slc
- Prior art date
Links
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Abstract
在一種NAND快閃記憶體的動態管理方法中,首先從一個主機接收寫入指令。接著,判斷該NAND快閃記憶體是否過了其壽命的初期。若該NAND快閃記憶體尚在其壽命的初期,則取該NAND快閃記憶體的第一部分當作SLC快取記憶體。若該NAND快閃記憶體過了其壽命的初期,則取該NAND快閃記憶體的第二部分當作SLC快取記憶體。該第二部分小於該第一部分。依該寫入指令把資料寫入該SLC快取記憶體。 In a dynamic management method of NAND flash memory, a write command is first received from a host. Next, it is determined whether the NAND flash memory has passed the initial stage of its life. If the NAND flash memory is still in its early life, the first portion of the NAND flash memory is taken as the SLC cache memory. If the NAND flash memory has passed its initial life, the second portion of the NAND flash memory is taken as the SLC cache memory. The second portion is smaller than the first portion. The data is written to the SLC cache according to the write command.
Description
本發明有關於快閃記憶體,特別是快閃記憶體的快取記憶體的動態管理。 The invention relates to dynamic management of flash memory, in particular flash memory.
快閃記憶體可分為SLC(single-level chip)快閃記憶體及MLC(multiple-level chip)快閃記憶體。MLC快閃記憶體通常是TLC(triple-level chip)快閃記憶。把資料寫入SLC快閃記憶體的速度大於把資料寫入TLC快閃記憶體的速度,因可用突發寫(burst write)模式把資料寫入SLC快取記憶體。然而,SLC快閃記憶體貯存資料的密度小於TLC快閃記憶體貯存資料的密度。因此,NAND快閃記憶體通常被規劃成兩區,亦即SLC及TLC,求兼顧寫的速度及貯存的密度。 The flash memory can be classified into SLC (single-level chip) flash memory and MLC (multiple-level chip) flash memory. MLC flash memory is usually TLC (triple-level chip) flash memory. Writing data to the SLC flash memory is faster than writing the data to the TLC flash memory, because the burst write mode can be used to write data to the SLC cache. However, the density of SLC flash memory storage data is less than the density of TLC flash memory storage data. Therefore, NAND flash memory is usually planned into two regions, namely SLC and TLC, to achieve both the speed of writing and the density of storage.
參考圖4,一個主機10用一個固態硬碟32。固態硬碟32有一個NAND快閃記憶體34。NAND快閃記憶體34被規劃為兩個快閃記憶體,一個是SLC快閃記憶體36,另一個是MLC(multiple-level chip)快閃記憶體38。依傳統,SLC快閃記憶體36的貯存空間的尺寸及TLC快閃記憶體38的貯存空間的尺寸都是固定的。 Referring to FIG. 4, a host 10 uses a solid state hard disk 32. The solid state hard disk 32 has a NAND flash memory 34. The NAND flash memory 34 is planned as two flash memories, one being the SLC flash memory 36 and the other being the MLC (multiple-level chip) flash memory 38. Conventionally, the size of the storage space of the SLC flash memory 36 and the size of the storage space of the TLC flash memory 38 are fixed.
在一種常見的快取記憶體的用法中,先以突發寫模式,把資料寫入SLC快取記憶體36。然後,在即將用完SLC快取記憶體36的貯存空間時,把資料從SLC快取記憶體36移到 TLC快閃記憶體38。 In a common use of cache memory, data is first written to the SLC cache memory 36 in burst write mode. Then, when the storage space of the SLC cache memory 36 is about to be used up, the data is moved from the SLC cache memory 36 to TLC flash memory 38.
然而,受限於NAND快閃記憶體34的貯存空間及超容量(over-provision),SLC快取記憶體36的貯存空間通常只佔NAND快閃記憶體34的貯存空間的一小部分。依實務,SLC快取記憶體36的貯存空間通常小於NAND快閃記憶體34的貯存空間的3%。因此,突發寫模式只能持續一小段時間,然後把資料寫入快閃記憶體的速度就大降。在移動較大檔案或執行基準工具的過程中,寫資料的速度常大降。 However, limited by the storage space and over-provision of the NAND flash memory 34, the storage space of the SLC cache memory 36 typically only occupies a small portion of the storage space of the NAND flash memory 34. By convention, the storage space of the SLC cache memory 36 is typically less than 3% of the storage space of the NAND flash memory 34. Therefore, the burst write mode can only last for a short period of time, and then the speed of writing data to the flash memory is greatly reduced. In the process of moving larger files or executing benchmark tools, the speed of writing data is often greatly reduced.
有鑑於上述習知技藝之問題,本發明之目的在於提供一種兼顧速度與壽命的快閃記憶體的動態管理方法。 In view of the above-mentioned problems of the prior art, it is an object of the present invention to provide a dynamic management method for a flash memory that combines speed and life.
為達成上述目的,該快閃記憶體的動態管理方法包括從一個主機接收寫入指令的步驟。接著,判斷該NAND快閃記憶體是否過了其壽命的初期。若該NAND快閃記憶體尚在其壽命的初期,則取該NAND快閃記憶體的第一部分當作SLC快取記憶體。若該NAND快閃記憶體過了其壽命的初期,則取該NAND快閃記憶體的第二部分當作SLC快取記憶體,其中該第二部分小於該第一部分。最後,依該寫入指令把資料寫入該SLC快取記憶體。 To achieve the above object, the dynamic management method of the flash memory includes the step of receiving a write command from a host. Next, it is determined whether the NAND flash memory has passed the initial stage of its life. If the NAND flash memory is still in its early life, the first portion of the NAND flash memory is taken as the SLC cache memory. If the NAND flash memory has passed its initial life, the second portion of the NAND flash memory is taken as the SLC cache memory, wherein the second portion is smaller than the first portion. Finally, the data is written to the SLC cache according to the write command.
10‧‧‧主機 10‧‧‧Host
12‧‧‧固態硬碟 12‧‧‧ Solid State Drive
14‧‧‧NAND快閃記憶體 14‧‧‧NAND flash memory
16‧‧‧SLC快取記憶體 16‧‧‧SLC cache memory
18‧‧‧TLC快閃記憶體 18‧‧‧TLC flash memory
32‧‧‧固態硬碟 32‧‧‧ Solid State Drive
34‧‧‧NAND快閃記憶體 34‧‧‧NAND flash memory
36‧‧‧SLC快取記憶體 36‧‧‧SLC cache memory
38‧‧‧TLC快閃記憶體 38‧‧‧TLC flash memory
S10‧‧‧主機下達寫入指令 S10‧‧‧ host write command
S12‧‧‧FTL處理寫入指令 S12‧‧‧FTL processing write instructions
S14‧‧‧平均抹除次數>閾值? S14‧‧‧Average erasure times>Threshold?
S16‧‧‧取NAND快閃記憶的第一部分當作SLC快取記憶體 S16‧‧‧ takes the first part of NAND flash memory as SLC cache memory
S18‧‧‧取NAND快閃記憶的第二部分當作SLC快取記憶體 S18‧‧‧ takes the second part of NAND flash memory as SLC cache memory
S20‧‧‧把資料從主機寫入SLC S20‧‧‧Write data from host to SLC
第1圖是以本發明的方法管理的資料貯存裝置的方塊圖;第2圖是圖1所示的資料貯存裝置的動態管理方法的流程圖; 第3圖顯示以本發明的方法管理的資料貯存裝置的效能與以習知方法管理的資料貯存裝置的效能的比較;及第4圖是以習知方法管理的資料貯存裝置的方塊圖。 1 is a block diagram of a data storage device managed by the method of the present invention; and FIG. 2 is a flow chart showing a dynamic management method of the data storage device shown in FIG. 1; Figure 3 shows a comparison of the performance of a data storage device managed by the method of the present invention with the performance of a data storage device managed by a conventional method; and Figure 4 is a block diagram of a data storage device managed by a conventional method.
以下請參照相關圖式進一步說明本發明的快閃記憶體的動態管理方法的較佳實施例。為便於理解本發明,以下用相同符號標示相同元件。 Hereinafter, a preferred embodiment of the dynamic management method of the flash memory of the present invention will be further described with reference to the related drawings. In order to facilitate the understanding of the present invention, the same elements are denoted by the same reference numerals.
如第1圖所示,一個主機10連接一個固態硬碟12。固態硬碟12有一個NAND快閃記憶體14。NAND快閃記憶體14被規劃成兩個快閃記憶體,一個是SLC快閃記憶體16,另一個是TLC快閃記憶體18。依本發明,動態調整SLC快閃記憶體16的貯存空間及TLC快閃記憶體18的貯存空間。因此,動態調整SLC快閃記憶體16的貯存空間的尺寸及TLC快閃記憶體18的貯存空間的尺寸都是可變的。 As shown in Fig. 1, a host 10 is connected to a solid state hard disk 12. The solid state drive 12 has a NAND flash memory 14. The NAND flash memory 14 is programmed into two flash memories, one being the SLC flash memory 16 and the other being the TLC flash memory 18. According to the present invention, the storage space of the SLC flash memory 16 and the storage space of the TLC flash memory 18 are dynamically adjusted. Therefore, the size of the storage space for dynamically adjusting the SLC flash memory 16 and the size of the storage space of the TLC flash memory 18 are all variable.
如圖2所示,在S10,主機10下達一個寫入指令並傳送資料。 As shown in FIG. 2, at S10, the host 10 issues a write command and transmits data.
在S12,用一個快閃記憶體轉換層(flash translation layer:FTL)處理該寫入指令,並產生一個後端(backend:BE)指令。 At S12, the write command is processed by a flash translation layer (FTL) and a backend (BE) instruction is generated.
在S14,用一個後端接收該後端指令,並檢查平均抹除次數(average erase count:AEC)是否大於一個預先被設定的閾值。若平均抹除次數不大於該閾值,則流程走到S16,否則流程走到S18。 At S14, the backend instruction is received by a backend, and it is checked whether the average erase count (AEC) is greater than a pre-set threshold. If the average erasure number is not greater than the threshold, the flow goes to S16, otherwise the flow goes to S18.
在S16,把SLC快取記憶體16的貯存空間設為 NAND快閃記憶體14的貯存空間的約33%。然後,流程走到S20。 At S16, the storage space of the SLC cache memory 16 is set to The storage space of the NAND flash memory 14 is about 33%. Then, the flow goes to S20.
在S18,把SLC快取記憶體16的貯存空間設為NAND快閃記憶體14的貯存空間的約1%。然後,流程走到S20。 At S18, the storage space of the SLC cache memory 16 is set to about 1% of the storage space of the NAND flash memory 14. Then, the flow goes to S20.
在S20,用該後端把資料寫入SLC快取記憶體16。依突發寫模式,在高速,該後端把該寫入指令所含的資料寫入SLC快取記憶體16。 At S20, the backend is used to write data to the SLC cache memory 16. In the burst write mode, at the high speed, the back end writes the data contained in the write command to the SLC cache memory 16.
如圖3所示,若SLC快取記憶體16的貯存空間被設為NAND快閃記憶體14的貯存空間的33%,則突發寫進行的時間長,因SLC快取記憶體16的貯存空間大。若SLC快取記憶體16的貯存空間被設為NAND快閃記憶體14的貯存空間的1%,則突發寫進行的時間短,因SLC快取記憶體16的貯存空間小。 As shown in FIG. 3, if the storage space of the SLC cache memory 16 is set to 33% of the storage space of the NAND flash memory 14, the burst write time is long, due to the storage of the SLC cache memory 16. big space. If the storage space of the SLC cache memory 16 is set to 1% of the storage space of the NAND flash memory 14, the burst write time is short, and the storage space of the SLC cache memory 16 is small.
在上述流程中,進行S14是為判斷固態硬碟12是否過了其壽命的初期。AEC不大於閾值表示固態硬碟12尚在其壽命的初期,它還能服務很久。因此,可盡量用固態硬碟12,並把NAND快閃記憶體14的可觀的部分(例如33%)設為SLC快取記憶體16。AEC大於閾值表示固態硬碟12過了其壽命的初期,它還能服務不久。因此,避免過度用固態硬碟12,並把NAND快閃記憶體14的很小的部分(例如1%)設為SLC快取記憶體16。如此的設計是要在固態硬碟12的效能(主要是速度)及壽命之間取得平衡。 In the above flow, S14 is performed to determine whether or not the solid state hard disk 12 has passed its initial life. AEC not greater than the threshold indicates that the solid state drive 12 is still in its early life and it can still serve for a long time. Therefore, the solid state hard disk 12 can be used as much as possible, and an appreciable portion (for example, 33%) of the NAND flash memory 14 is set as the SLC cache memory 16. AEC greater than the threshold indicates that the solid state drive 12 has passed its initial life and it can serve for a short time. Therefore, excessive use of the solid state hard disk 12 is avoided, and a small portion (for example, 1%) of the NAND flash memory 14 is set as the SLC cache memory 16. Such a design is to strike a balance between the performance (mainly speed) and lifetime of the solid state drive 12.
以上所述說明,僅為本發明的較佳實施方式而已,意在明確本發明的特徵,非用以限定本發明實施例的範圍,本技術領域內的一般技術人員根據本發明所作的均等變化,以及本領域內技術人員熟知的改變,仍應屬本發明涵蓋的範圍。 The above description is only for the preferred embodiment of the present invention, and is intended to clarify the features of the present invention, and is not intended to limit the scope of the embodiments of the present invention. Changes that are well known to those skilled in the art are still within the scope of the invention.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW106146456A TWI643069B (en) | 2017-12-29 | 2017-12-29 | Dynamic management of flash memory |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW106146456A TWI643069B (en) | 2017-12-29 | 2017-12-29 | Dynamic management of flash memory |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI643069B true TWI643069B (en) | 2018-12-01 |
TW201931134A TW201931134A (en) | 2019-08-01 |
Family
ID=65431565
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW106146456A TWI643069B (en) | 2017-12-29 | 2017-12-29 | Dynamic management of flash memory |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI643069B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102298972B (en) * | 2010-06-22 | 2014-12-17 | 慧荣科技股份有限公司 | Data reading method for flash memory |
TWI597605B (en) * | 2016-07-11 | 2017-09-01 | 慧榮科技股份有限公司 | Method of wear leveling for data storage device |
-
2017
- 2017-12-29 TW TW106146456A patent/TWI643069B/en active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102298972B (en) * | 2010-06-22 | 2014-12-17 | 慧荣科技股份有限公司 | Data reading method for flash memory |
TWI597605B (en) * | 2016-07-11 | 2017-09-01 | 慧榮科技股份有限公司 | Method of wear leveling for data storage device |
Also Published As
Publication number | Publication date |
---|---|
TW201931134A (en) | 2019-08-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102546244B1 (en) | Morphic storage device | |
TWI437439B (en) | Method for performing block management using dynamic threshold, and associated memory device and controller thereof | |
US10296231B2 (en) | Data-storage device and data maintenance method thereof | |
US8656256B2 (en) | Apparatus and method for multi-mode operation of a flash memory device | |
US9740419B2 (en) | Methods and apparatus to preserve data of a solid state drive during a power loss event | |
TWI446345B (en) | Method for performing block management, and associated memory device and controller thereof | |
US9058900B2 (en) | System, semiconductor memory device and operating method thereof | |
US8966163B2 (en) | Non-volatile memory device and method for programming the same | |
US9627072B2 (en) | Variant operation sequences for multibit memory | |
TWI566253B (en) | Method for managing a memory apparatus, and associated memory apparatus thereof and associated controller thereof | |
US10782909B2 (en) | Data storage device including shared memory area and dedicated memory area | |
US11176035B2 (en) | Data storage devices and data processing methods | |
US10073771B2 (en) | Data storage method and system thereof | |
CN110377233B (en) | SSD (solid State disk) reading performance optimization method and device, computer equipment and storage medium | |
US11204864B2 (en) | Data storage devices and data processing methods for improving the accessing performance of the data storage devices | |
CN107924700B (en) | Adaptive multi-stage erase | |
US11157399B2 (en) | Data storage devices and data processing methods with dynamic programming scheme | |
TWI437569B (en) | Method for managing a plurality of blocks of a flash memory, and associated memory device and controller thereof | |
US9037781B2 (en) | Method for managing buffer memory, memory controllor, and memory storage device | |
TWI606336B (en) | Memory device and control unit thereof, and data storage method for memory device | |
US20190228827A1 (en) | Dynamic Management of a NAND Flash Memory | |
TW202238369A (en) | Method of performing wear-leveling operation in flash memory and related controller and storage system | |
TWI643069B (en) | Dynamic management of flash memory | |
US20160306569A1 (en) | Memory system | |
US9229798B2 (en) | Error handling method, memory storage device and memory controlling circuit unit |