Light-GC

Diansen Sun, Yunlong Song, Yunpeng Chai, Baoling Peng, Fangzhou Lu, Xiang Bo Deng · 2022

Raw flash file systems are essential in today's cost-sensitive embedded systems and legacy embedded devices. The performance of raw flash file systems is often limited by their inefficient garbage collection (GC) due to the tight capacity of the onboard flash memory and CPU computing power. However, in real-world scenarios, we observed that the GC overhead can account for more than 85% of the total I/O time, which not only degrades the performance of the file system but also shortens the endurance of the flash chip. However, existing GC optimization used in high-end SSD or server-side file systems usually leads to high CPU and memory usage, which is not suitable for the embedded environment. In this paper, we propose LightGC, a low-complexity and high-efficiency GC scheme. We design an optimized clustering algorithm for page hotness measurement and a hot-delay GC victim selection strategy. LightGC can also be adapted to locality changes in workloads to maximize the effect of cold and heat separation. Our experimental results show that LightGC offers a relative improvement of up to 19% in GC efficiency, a 5%-15% reduction in write amplification, and a 10%-17% increase in flash memory endurance compared to other existing GC methods. In addition, driven by LightGC, we implement the UBIFS2 file system, an upgraded version of the UBIFS flash file system. We have done careful engineering design so that UBIFS2 and the original UBIFS are compatible with each other and users can switch between them freely.

Read the paper · More papers on PaperTik