傳統機械式硬碟(HDD)中的資料被作業系統刪除時,其無效的資料仍會持續存在,當有新資料要寫入時,作業系統可以將新資料直接寫入到被刪除的資料的位置,也就是可以直接覆蓋舊資料以儲存新的資料。固態硬碟(SSD)則與HDD有很大的不同,因為SSD使用的是快閃記憶體(NAND flash)的儲存技術,在寫入資料時,SSD必須先將舊有區塊內資料抹除(erase),才可以寫入新的資料。也就是新資料不能直接覆蓋舊有的無效資料。
對於SSD來說,垃圾回收(Garbage Collection)是指把現存資料重新轉移到其他NAND flash的位置,並將無用的資料徹底抹除的過程。SSD資料的寫入以頁面(page)為單位,但若要抹除資料則需以區塊(block)為單位。因此,要抹除無效的資料,SSD需要把一個區塊內有效的數據先複製到全新區塊的頁面中,這樣原來區塊中的無效資料才能夠以區塊為單位進行抹除。區塊的資料被完整抹除後即形成一個新的空白區塊(free block),後續才能夠寫入新的資料。
垃圾回收(Garbage Collection)意指將原本區塊中有效的資料合併到另一個空閒的區塊中,並將原移出資料的區塊進行抹除;其目的是清出更多空白區塊(free block)以維持SSD的寫入效能。
Our website keeps three levels of cookies. You can adjust your preferences at any time. If you want more information about what cookies are and which cookies we collect, please read our cookie policy.
are essential cookies that ensure that the website functions properly and that your preferences (e.g. language, region) are saved.
allow us to analyse website use and to improve the visitor's experience.
allow us to personalise your experience and to send you relevant content and offers, on this website and other websites.