Flash-based disk caches, for example Bcache and Flashcache, has gained tremendous popularity in industry in the last decade because of its low energy consumption, non-volatile nature and high I/O speed. But these cache systems have a worse write performance than the read performance because of the asymmetric I/O costs and the the internal GC mechanism. In addition to the performance issues, since the NAND flash is a type of EEPROM device, the lifespan is also limited by the Program/Erase (P/E) cycles. So how to improve the performance and the lifespan of flash-based caches in write-intensive scenarios has always been a hot issue. Benefiting from Open-Channel SSDs (OCSSDs), we propose a write-friendly flash-based disk cache system, which is called WLFC (Write Less in the Flash-based Cache). In WLFC, a strictly sequential writing method is used to minimize the write amplification. A new replacement algorithm for the write buffer is designed to minimize the erase count caused by the evicting. And a new data layout strategy is designed to minimize the metadata size persisted in SSDs. As a result, the Over-Provisioned (OP) space is completely removed, the erase count of the flash is greatly reduced, and the metadata size is 1/10 or less than that in BCache. Even with a small amount of metadata, the data consistency after the crash is still guaranteed. Compared with the existing mechanism, WLFC brings a 7%-80% reduction in write latency, a 1.07*-4.5* increment in write throughput, and a 50%-88.9% reduction in erase count, with a moderate overhead in read performance.
翻译:基于闪存的磁盘缓存(如Bcache和Flashcache)因其低能耗、非易失性和高I/O速度,在过去十年中在工业界获得了广泛应用。但由于非对称I/O成本及内部垃圾回收(GC)机制,这类缓存系统的写入性能远低于读取性能。除性能问题外,因NAND闪存属于EEPROM器件,其寿命也受限于编程/擦除(P/E)周期。因此,如何在写密集型场景下提升闪存缓存的性能与寿命始终是研究热点。借助开放通道固态硬盘(OCSSD),我们提出了一种闪存友好型磁盘缓存系统WLFC(Write Less in Flash-based Cache)。WLFC采用严格顺序写入方法以最小化写放大,设计了写缓存的新型替换算法以减少驱逐操作引发的擦除次数,并构建了新数据布局策略以压缩SSD中持久化元数据的规模。由此,完全消除了预留空间(OP),显著降低了闪存擦除次数,且元数据体积仅为Bcache的1/10或更少。即便元数据量极小,仍能保证崩溃后的数据一致性。与现有机制相比,WLFC的写入延迟降低7%-80%,写入吞吐量提升1.07-4.5倍,擦除次数减少50%-88.9%,而读取性能仅产生适度开销。