想聽matika碎碎唸嗎? 你來對地方了!

顯示具有 SSD 標籤的文章。 顯示所有文章
顯示具有 SSD 標籤的文章。 顯示所有文章

星期日, 9月 13, 2009

Windows 7的Trim command真是SSD救星?

M$日前宣佈Windows 7具有Trim command, 可強化SSD的效能與使用壽命...


但實際上仍有待確認...

因為各家SSD controller廠商有各自獨到的Wear-leveling演算法, 而各家的SSD硬體架構也不盡相同,有的是MLC+SLC hybrid, 有的是DDR RAM chache, 更有的跟兩者截然不同, Trim command 不見得能一一適用.

再者, Wear-leveling的終極目的是將每個Block erase count平均化, 進而延長SSD使用壽命, 而不是在做degfrag這種傳統硬碟才需要的最佳化方式, 然而SSD的使用時間一長, 都難免有老化(Aging)的問題,導致效能下降,但每家SSD的硬體架構不同,如何做好wear-leveling又同時維持效能, 其實有時是難以兼得的狀況.

不過這些問題SSD controlle業者都已察覺, 並且在努力中, 姑且拭目以待吧~

延伸閱讀, Windows 7 Trim command:

星期一, 3月 16, 2009

Wear-Leveling(Advance intro)

Dynamic wear leveling employs wear levels over the dynamic Flash array areas. Embedded Designs using
dynamic wear leveling do not touch static data. In a Flash use model where 75% of storage is for code or
static data, only 25% is available for wear leveling. This model offers higher level of Flash endurance
compared to no wear leveling. Note that only one-fourth of the Flash cell array employs wear leveling.


A static wear-leveling algorithm evenly distributes data over an entire Flash cell array and searches for the
least used physical blocks. The identified low cycled sectors are used to write the data to those locations. If
blocks are empty, the write occurs normally. If blocks contain static data, it moves that data to a more heavily
used location before it moves the newly written data. The static wear leveling maximizes effective endurance
Flash array compared to no wear leveling or dynamic wear leveling.


New comer- Global Wear-leveling(A.K.A Universal wear-leveling)
Incorprate the benefit of Dynamic and Static wear-leveling.
Which treat the SSD as a whole block.

星期一, 1月 07, 2008

Wear levelling

What is Wear levelling?

From Wikipedia, the free encyclopedia

Wear levelling (also written wear leveling) is a technique for prolonging the service life of some kinds of erasable computer storage media, such as flash
memory. The term has also been used by Western Digital to describe their
hard disk preservation technique, but hard disks are not generally
wear-levelled devices.

http://en.wikipedia.org/wiki/Wear_levelling

對於SSD(Solid State Disk)而言, 不論採用的flash是SLC或是MLC都有一定的

寫入壽命,

在SSD普及的前提下, 採用MLC已是勢在必行的趨勢.

以SLC而言, 大約為1百萬次的寫入次數; MLC則為10萬次.
而MLC的成本大約為SLC的1/3

所以, 對一個以MLC製成的SSD, 我們已知每個block平均寫入次數達10萬次

時, 就有可能造成bad block, 對於存取頻繁的應用, 會是很大的問題.


因此, Wear Leveling開始受到重視, 因為它能盡量平均每個Block的寫入次數,
舉例來說..

如果有一個8G的SSD, 其中4G已寫入資料(System + User data), 其中寫入最

頻繁的區域應該是:系統暫存檔(OS及Browser cache)以及User data, 如果資

料都不移動,

可估計如下-


每分鐘寫入1次
每天使用SSD10小時, 一週工作5天
100,000(1*60*10*5) = 33周

這數字可能有點誇張, 但可大略估計33周後就有可能出現bad block.
問題是, 既然這是無法避免的, 那總有方法可以拉長這段時間吧?

Wear leveling大致有幾種方式-
1. YAFFS Data Structure
(保留部份Block,若部份Block毀損時可使用保留的Block取代)
請參考:http://esslab.tw/wiki/index.php/YAFFS

2. Dynamic/Static wear leveling
簡單的說就是把常用block跟不常用的block互調位置, 藉以平均
寫入次數.

2. RAM disk
(將系統Temp file及Browser cache指向DRAM虛擬的RAM disk)

3. ECC algorithm
BCH, bit addressing
Bose、Ray-Chaudhuri and Hocquenghem

Reed somloman
http://www.4i2i.com/reed_solomon_codes.htm