skip to main content
10.1145/2872362.2872392acmconferencesArticle/Chapter ViewAbstractPublication PagesasplosConference Proceedingsconference-collections
research-article

NVWAL: Exploiting NVRAM in Write-Ahead Logging

Published:25 March 2016Publication History

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).

References

  1. Mobibench. https://github.com/ESOS-Lab/Mobibench.Google ScholarGoogle Scholar
  2. OpenNVRAM. http://opennvram.org/.Google ScholarGoogle Scholar
  3. Sqlite. http://www.sqlite.org/.Google ScholarGoogle Scholar
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle Scholar
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. G. Graefe. A survey of B-tree logging and recovery techniques. ACM Transactions on Database Systems, 37(1), Feb. 2012.Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. J. Huang, K. Schwan, and M. K. Qureshi. Nvram-aware logging in transaction systems. Proceedings of the VLDB Endowment, 8(4), 2014.Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. T. Hwang, J. Jung, and Y. Won. Heapo: Heap-based persistent object store. ACM Transactions on Storage (TOS), 11(1), 2014.Google ScholarGoogle Scholar
  17. 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 ScholarGoogle Scholar
  18. 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 ScholarGoogle Scholar
  19. 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 ScholarGoogle Scholar
  20. 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 ScholarGoogle Scholar
  21. 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 ScholarGoogle Scholar
  22. 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 ScholarGoogle Scholar
  23. 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 ScholarGoogle Scholar
  24. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle Scholar
  27. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  28. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  29. 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 ScholarGoogle ScholarCross RefCross Ref
  30. 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 ScholarGoogle Scholar
  31. 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 ScholarGoogle Scholar
  32. 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 ScholarGoogle ScholarCross RefCross Ref
  33. 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 ScholarGoogle Scholar
  34. 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 ScholarGoogle Scholar
  35. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  36. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  37. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  38. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  39. 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 ScholarGoogle ScholarCross RefCross Ref
  40. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  41. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  42. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  43. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  44. T. Wang and R. Johnson. Scalable logging through emerging non-volatile memory. Proceedings of the VLDB Endowment, 7(10):865--876, 2014.Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. 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 ScholarGoogle Scholar
  46. 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 ScholarGoogle Scholar
  47. 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 ScholarGoogle ScholarCross RefCross Ref
  48. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. NVWAL: Exploiting NVRAM in Write-Ahead Logging

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        ASPLOS '16: Proceedings of the Twenty-First International Conference on Architectural Support for Programming Languages and Operating Systems
        March 2016
        824 pages
        ISBN:9781450340915
        DOI:10.1145/2872362
        • General Chair:
        • Tom Conte,
        • Program Chair:
        • Yuanyuan Zhou

        Copyright © 2016 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 25 March 2016

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        ASPLOS '16 Paper Acceptance Rate53of232submissions,23%Overall Acceptance Rate535of2,713submissions,20%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader