X-FTL: transactional FTL for SQLite databases

In the era of smartphones and mobile computing, many popular applications such as Facebook, twitter, Gmail, and even Angry birds game manage their data using SQLite. This is mainly due to the development productivity and solid transactional support. For transactional atomicity, however, SQLite relies on less sophisticated but costlier page-oriented journaling mechanisms. Hence, this is often cited as the main cause of tardy responses in mobile applications. Flash memory does not allow data to be updated in place, and the copy-on-write strategy is adopted by most flash storage devices. In this paper, we propose X-FTL, a transactional flash translation layer(FTL) for SQLite databases. By offloading the burden of guaranteeing the transactional atomicity from a host system to flash storage and by taking advantage of the copy-on-write strategy used in modern FTLs, X-FTL drastically improves the transactional throughput almost for free without resorting to costly journaling schemes. We have implemented X-FTL on an SSD development board called OpenSSD, and modified SQLite and ext4 file system minimally to make them compatible with the extended abstractions provided by X-FTL. We demonstrate the effectiveness of X-FTL using real and synthetic SQLite workloads for smartphone applications, TPC-C benchmark for OLTP databases, and FIO benchmark for file systems.

[1]  Raymond A. Lorie,et al.  Physical integrity in a large segmented database , 1977, TODS.

[2]  Mendel Rosenblum,et al.  The design and implementation of a log-structured file system , 1991, SOSP '91.

[3]  Cristian Ungureanu,et al.  Revisiting storage for smartphones , 2012, TOS.

[4]  Sang-Won Lee,et al.  A log buffer-based flash translation layer using fully-associative sector translation , 2007, TECS.

[5]  C. Mohan,et al.  Disk read-write optimizations and data integrity in transaction systems using write-ahead logging , 1995, Proceedings of the Eleventh International Conference on Data Engineering.

[6]  Wei Hu,et al.  Scalability in the XFS File System , 1996, USENIX Annual Technical Conference.

[7]  Red Hat JFFS : The Journalling Flash File System , 2001 .

[8]  Andrea C. Arpaci-Dusseau,et al.  Analysis and Evolution of Journaling File Systems , 2005, USENIX Annual Technical Conference, General Track.

[9]  Andrea C. Arpaci-Dusseau,et al.  Consistency without ordering , 2012, FAST.

[10]  Lidong Zhou,et al.  Transactional Flash , 2008, OSDI.

[11]  Youjip Won,et al.  Smart layers and dumb result: IO characterization of an android-based smartphone , 2012, EMSOFT '12.

[12]  Stephen C. Tweedie,et al.  Journaling the Linux ext2fs Filesystem , 2008 .

[13]  Sunhwa Park,et al.  Atomic write FTL for robust flash file system , 2005, Proceedings of the Ninth International Symposium on Consumer Electronics, 2005. (ISCE 2005)..

[14]  Dhabaleswar K. Panda,et al.  Beyond block I/O: Rethinking traditional storage primitives , 2011, 2011 IEEE 17th International Symposium on High Performance Computer Architecture.

[15]  阿米尔·班 Flash File System , 1994 .

[16]  Daniel M. Dias,et al.  A modeling study of the TPC-C benchmark , 1993, SIGMOD '93.