ABSTRACT
Emerging byte-addressable non-volatile memory is considered an alternative storage device for database logs that require persistency and high performance. In this work, we develop NVWAL (NVRAM Write-Ahead Logging) for SQLite. The contribution of NVWAL consists of three elements: (i) byte-granularity differential logging that effectively eliminates the excessive I/O overhead of filesystem-based logging or journaling, (ii) transaction-aware lazy synchronization that reduces cache synchronization overhead by two-thirds, and (iii) user-level heap management of the NVRAM persistent WAL structure, which reduces the overhead of managing persistent objects.
We implemented NVWAL in SQLite and measured the performance on a Nexus 5 smartphone and an NVRAM emulation board - Tuna. Our performance study shows the following: (i) the overhead of enforcing strict ordering of NVRAM writes can be reduced via NVRAM-aware transaction management. (ii) From the application performance point of view, the overhead of guaranteeing failure atomicity is negligible; the cache line flush overhead accounts for only 0.8~4.6% of transaction execution time. Therefore, application performance is much less sensitive to the NVRAM performance than we expected. Decreasing the NVRAM latency by one-fifth (from 1942 nsec to 437 nsec), SQLite achieves a mere 4% performance gain (from 2517 ins/sec to 2621 ins/sec). (iii) Overall, when the write latency of NVRAM is 2 usec, NVWAL increases SQLite performance by at least 10x compared to that of WAL on flash memory (from 541 ins/sec to 5812 ins/sec).
- Mobibench. https://github.com/ESOS-Lab/Mobibench.Google Scholar
- OpenNVRAM. http://opennvram.org/.Google Scholar
- Sqlite. http://www.sqlite.org/.Google Scholar
- S. Agarwal, R. Garg, M. S. Gupta, , and J. E. Moreira. Adaptive incremental checkpointing for massively parallel systems. In Proceedings of the 18th annual international conference on Supercomputing, 2004.Google ScholarDigital Library
- J. Arulraj, A. Pavlo, and S. R. Dulloor. Let's talk about storage & recovery methods for non-volatile memory database systems. In Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data, pages 707--722. ACM, 2015.Google ScholarDigital Library
- K. Bhandari, D. R. Chakrabarti, and H.-J. Boehm. Implications of cpu caching on byte-addressable non-volatile memory programming. http://www.hpl.hp.com/techreports/2012/HPL-2012-236.pdf, 2012.Google Scholar
- D. Chakrabarti, H.-J. Boehm, and K. Bhandari. Atlas: Leveraging locks for non-volatile memory consistency. In Proceeding of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications (OOPSLA), pages 433--452, 2014.Google ScholarDigital Library
- A. Chatzistergiou, M. Cintra, and S. D. Viglas. Rewind: Recovery write-ahead system for in-memory non-volatile data-structures. Proceedings of the VLDB Endowment, 8(5):497--508, 2015.Google ScholarDigital Library
- J. Coburn, A. M. Caulfield, A. Akel, L. M. Grupp, R. K. Gupta, R. Jhala, and S. Swanson. NV-Heaps: Making persisten objects fast and safe with next-generation, non-volatile memories. In Proceedings of the 16th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2011.Google ScholarDigital Library
- J. Condit, E. B. Nightingale, C. Frost, E. Ipek, B. C. Lee, D. Burger, and D. Coetzee. Better i/o through byte- addressable, persistent memory. In Proceedings of the 22nd ACM Symposium on Operating Systems Principles (SOSP), 2009.Google ScholarDigital Library
- S. R. Dulloor, S. Kumar, A. Keshavamurthy, P. Lantz, D. Reddy, R. Sankaran, and J. Jackson. System software for persistent memory. In Proceedings of the 9th ACM European Conference on Computer Systems (EuroSys), pages 15:1--15:15, 2014.Google ScholarDigital Library
- R. Fang, H.-I. Hsiao, B. He, C. Mohan, and Y. Wang. High performance database logging using storage class memory. In Proceedings of the 27th International Conference on Data Engineering (ICDE), pages 1221--1231, 2011.Google ScholarDigital Library
- R. Gioiosa, J. C. Sancho, S. Jiang, and F. Petrini. Transparent, incremental checkpointing at kernel level: A foundation for fault tolerance for parallel computers. In Proceedings of the ACM/IEEE SC2005 Conference, 2005.Google ScholarDigital Library
- G. Graefe. A survey of B-tree logging and recovery techniques. ACM Transactions on Database Systems, 37(1), Feb. 2012.Google ScholarDigital Library
- J. Huang, K. Schwan, and M. K. Qureshi. Nvram-aware logging in transaction systems. Proceedings of the VLDB Endowment, 8(4), 2014.Google ScholarDigital Library
- T. Hwang, J. Jung, and Y. Won. Heapo: Heap-based persistent object store. ACM Transactions on Storage (TOS), 11(1), 2014.Google Scholar
- S. Jeong, K. Lee, S. Lee, S. Son, and Y. Won. I/O stack optimization for smartphones. In Proceedings of the USENIX Annual Technical Conference (ATC), 2013.Google Scholar
- J. Jung and Y. Won. nvramdisk: A transactional block devie driver for non-volatile ram. IEEE Transactions on Computers, http://dx.doi.org/10.1109/TC.2015.2428708, 2015.Google Scholar
- J. Jung, Y. Won, E. Kim, H. Shin, and B. Jeon. Frash: Exploiting storage class memory in hybrid file system for hierarchical storage. ACM Transactions on Storage (TOS), 6(1):3, 2010.Google Scholar
- D. Kim, E. Lee, S. Ahn, and H. Bahn. Improving the storage performance of smartphones through journaling in non- volatile memory. Consumer Electronics, IEEE Transactions on, 59(3):556--561, 2013.Google Scholar
- H. Kim, N. Agrawal, and C. Ungureanu. Revisiting storage for smartphones. In Proceedings of the 11th USENIX conference on File and Storage Technologies (FAST), 2013.Google Scholar
- J. Kim, C. Min, and Y. I. Eom. Reducing Excessive Journaling Overhead with Small-Sized NVRAM for Mobile Devices. IEEE Transactions on Consumer Electronics, 6(2), June 2014.Google Scholar
- W.-H. Kim, B. Nam, D. Park, and Y. Won. Resolving journaling of journal anomaly in android i/o: Multi-version b-tree with lazy split. In Proceedings of the 11th USENIX conference on File and Storage Technologies (FAST), 2014.Google Scholar
- B. C. Lee, E. Ipek, O. Mutlu, and D. Burger. Architecting phase change memory as a scalable DRAM alternative. In Proceedings of the 36th International Symposium on Computer Architecture (ISCA), 2009.Google ScholarDigital Library
- E. Lee, H. Bahn, and S. H. Noh. Unioning of the buffer cache and journaling layers with non-volatile memory. In Proceedings of the 11th USENIX conference on File and Storage Technologies (FAST), 2013.Google ScholarDigital Library
- J. Lee, K. Kim, and S. Cha. Differential logging: A commutative and associative logging scheme for highly parallel main memory database. In Proceedings of the 17th International Conference on Data Engineering (ICDE), 2001.Google Scholar
- K. Lee and Y. Won. Smart layers and dumb result: Io characterization of an android-based smartphone. In Proceedings of the 12th International Conference on Embedded Software (EMSOFT 2012), 2012.Google ScholarDigital Library
- S.-W. Lee and B. Moon. Design of flash-based dbms: An in-page logging approach. In Proceedings of 2007 ACM SIGMOD International Conference on Management of Data (SIGMOD), 2007.Google ScholarDigital Library
- T. Lee, D. Kim, H. Park, and S. Yoo. Fpga-based prototyping systems for emerging memory technologies. In Proceedings of the 25th IEEE International Symposium on Rapid System Prototyping (RSP), 2014.Google ScholarCross Ref
- W. Lee, K. Lee, H. Son, W.-H. Kim, B. Nam, and Y. Won. Waldio: Eliminating the filesystem journaling in resolving the journaling of journal anomaly. In Proceedings of the 2015 USENIX Anual Technical Conference (ATC), 2015.Google Scholar
- M. Li and P. P. C. Lee. Toward i/o-efficient protection against silent data corruptions in raid arrays. In Proceedings of the 30th International Conference on Massive Storage Systems and Technology (MSST), 2014.Google Scholar
- Y. Lu, J. Shu, and L. Sun. Blurred persistence in transactional persistent memory. In Proceedings of the 31st International Conference on Massive Storage Systems and Technology (MSST), 2015.Google ScholarCross Ref
- H. Luo, L. Tian, and H. Jiang. qNVRAM: quasi non-volatile ram for low overhead persistency enforcement in smartphones. In Proceedings of the 6th USENIX Workshop on Hot Topics in Storage and File Systems (HotStorage), 2014.Google Scholar
- J. S. Meena, S. M. Sze, U. Chand, and T.-Y. Tseng. Overview of emerging nonvolatile memory technologies. Nanoscale research letters, 9(1):1--33, 2014.Google Scholar
- I. Moraru, D. G. Andersen, M. Kaminsky, N. Tolia, N. Binkert, and P. Ranganathan. Consistent, durable, and safe memory management for byte-addressable non volatile main memory. In Proceedings of the ACM Conference on Timely Results in Operating Systems (TRIOS), 2013.Google ScholarDigital Library
- G. Oh, S. Kim, S.-W. Lee, and B. Moon. Sqlite optimization with phase change memory for mobile applications. Proceedings of the VLDB Endowment (PVLDB), 8(12):1454--1465, 2015.Google ScholarDigital Library
- S. Pelley, P. M. Chen, and T. F. Wenisch. Memory persistency. In Proceedings of the 41st International Symposium on Computer Architecture (ISCA), pages 265--276, 2014.Google ScholarDigital Library
- K. Shen, S. Park, and M. Zhu. Journaling of journal is (almost) free. In Proceedings of the 11th USENIX conference on File and Storage Technologies (FAST), 2014.Google ScholarDigital Library
- M. Son, S. Lee, K. Kim, S. Yoo, and S. Lee. A small non-volatile write buffer to reduce storage writes in smartphones. In Proceedings of the 2015 Design, Automation & Test in Europe Conference & Exhibition, DATE '15, pages 713--718, San Jose, CA, USA, 2015. EDA Consortium. ISBN 978-3-9815370-4-8.Google ScholarCross Ref
- C. A. N. Soules, G. R. Goodson, J. D. Strunk, and G. R. Ganger. Metadata efficiency in versioning file systems. In Proceedings of the 2nd USENIX conference on File and Storage Technologies (FAST), pages 43--58, 2003.Google ScholarDigital Library
- S. Venkataraman, N. Tolia, P. Ranganathan, and R. H. Campbell. Consistent and durable data structures for non-volatile byte-addressable memory. In 9th USENIX conference on File and Storage Technologies (FAST), 2011.Google ScholarDigital Library
- S. D. Viglas. Data management in non-volatile memory. In Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data, pages 1707--1711. ACM, 2015.Google ScholarDigital Library
- H. Volos, A. J. Tack, and M. M. Swift. Mnemosyne: Lightweight persistent memory. In 16th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2011.Google ScholarDigital Library
- T. Wang and R. Johnson. Scalable logging through emerging non-volatile memory. Proceedings of the VLDB Endowment, 7(10):865--876, 2014.Google ScholarDigital Library
- Q. Wei, J. Chen, and C. Chen. Accelerating file system metadata access with byte-addressable nonvolatile memory. ACM Transactions on Storage (TOS), 11(3):12, 2015.Google Scholar
- X. Wu and A. L. N. Reddy. SCMFS: A file system for storage class memory. In Proceedings of the ACM/IEEE SC2011 Conference, 2011.Google Scholar
- Y. Zhang and S. Swanson. A study of application performance with non-volatile main memory. In Proceedings of the 31st International Conference on Massive Stroage Systems (MSST), 2015.Google ScholarCross Ref
- M. Zheng, J. Tucek, D. Huang, F. Qin, M. Lillibridge, E. S. Yang, B. W. Zhao, and S. Singh. Torturing databases for fun and profit. In Proceedings of the 11th USENIX Symposium on Operating Systems Design and Implementation (OSDI 14), pages 449--464, Oct. 2014.Google ScholarDigital Library
Index Terms
- NVWAL: Exploiting NVRAM in Write-Ahead Logging
Recommendations
NVWAL: Exploiting NVRAM in Write-Ahead Logging
ASPLOS'16Emerging byte-addressable non-volatile memory is considered an alternative storage device for database logs that require persistency and high performance. In this work, we develop NVWAL (NVRAM Write-Ahead Logging) for SQLite. The contribution of NVWAL ...
NVWAL: Exploiting NVRAM in Write-Ahead Logging
ASPLOS '16Emerging byte-addressable non-volatile memory is considered an alternative storage device for database logs that require persistency and high performance. In this work, we develop NVWAL (NVRAM Write-Ahead Logging) for SQLite. The contribution of NVWAL ...
Mellow writes: extending lifetime in resistive memories through selective slow write backs
ISCA'16Emerging resistive memory technologies, such as PCRAM and ReRAM, have been proposed as promising replacements for DRAM-based main memory, due to their better scalability, low standby power, and non-volatility. However, limited write endurance is a major ...
Comments