Preview abstract
JBD2, the current physical journaling mechanism in Ext4 is bulky and resource-hungry. Specifically, in case of metadataheavy workloads, fsyncs issued by applications cause JBD2 to write copies of changed metadata blocks, incurring high byte and IO overhead. When storing data in Ext4 via NFS (a popular setup), the NFS protocol issues fsyncs for every file metadata update which further exacerbates the problem. In a simple multi-threaded mail-server workload, JBD2 consumed approximately 76% of the disk’s write bandwidth. Higher byte and IO utilization of JBD2 results in reduced application throughput, higher wear-out of flash based media and increased performance provisioning costs in cloud-based storage services.
In this paper, we present hybrid journaling for Ext4 which performs logical journaling for simple and frequent file system modifications, while relying on JBD2 for more complex and rare modifications. Key design ingredients of XCOMMIT are compact logging, selective flushing and inline journaling. The first two techniques work together to ensure that over 80% commits are contained within a single 4KB block and are written to disk without requiring an expensive cache flush operation. Inline journaling minimizes context switching delays. With faster and efficient fsyncs, XCOMMIT reduces throughput interference of JBD2 by over 2× along with throughput improvements of up to 120%. We implemented XCOMMIT in Ext4 and successfully merged our code to the upstream Linux kernel.View details