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开销及内部垃圾回收机制,这类缓存系统的写性能显著低于读性能。除性能问题外,由于NAND闪存属于EEPROM器件,其寿命也受限于编程/擦除循环次数。因此,如何提升写密集型场景下闪存缓存的性能与寿命始终是热点问题。借助开源通道固态硬盘(OCSSD),我们提出了一种写友好的闪存磁盘缓存系统WLFC(闪存缓存中的写精简策略)。WLFC通过严格顺序写入方法最小化写放大效应;设计新型写缓冲区替换算法以最小化驱逐操作引发的擦除次数;并采用新型数据布局策略以降低固态硬盘中持久化元数据体积。实验表明,该方案完全消除了过量配置空间,大幅降低闪存擦除次数,元数据体积仅为Bcache的1/10或更少。即使元数据量极低,仍能保证崩溃后的数据一致性。与现有机制相比,WLFC可实现写延迟降低7%-80%、写吞吐量提升1.07倍至4.5倍、擦除次数减少50%-88.9%,且读性能仅略有损耗。