传统机械式硬盘(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.