Journal of East China Normal University(Natural Science) >
SQLite-CC based on non-volatile memory cache
Received date: 2020-08-31
Online published: 2021-11-26
In recent years, non-volatile memory (NVM) has developed rapidly. Its advantages, among others, include: persistence, large capacity, low latency, byte addressing, high density, and low energy consumption — all of which have impacted current database system architecture. SQLite is a lightweight relational database widely used in embedded fields such as mobile platforms. It operates as a serverless, zero-configuration, transactional SQL database engine. It maintains a cache for each connection, which results in problems with large space overhead and data consistency detection. At the same time, it adopts a relatively simple serialized single-write transaction execution method and page-based logging, which offers low performance and write amplification in the journal mode and a storage space requirement in the WAL mode during execution. In order to address the above challenges, a new scheme of SQLite Cache based on non-volatile memory, SQLite-CC (Copy Cache), is constructed, which fully considers the hardware characteristics of non-volatile memory and ensures the atomicity of transactions using a CC-manager and by adding an updated page index to ensure the consistency of database files and cache. Benchmarking tests show that it can achieve the same concurrency performance as SQLite-WAL mode. Compared with the rollback mode, it improves the execution performance of transactions by 3 times, reduces latency by 40%, and effectively solves the issue of write amplification on disks.
Key words: NVM; SQLite; cache optimization; logging solution
Yaoyi HU , Huiqi HU , Xuan ZHOU , Aoying ZHOU . SQLite-CC based on non-volatile memory cache[J]. Journal of East China Normal University(Natural Science), 2021 , 2021(6) : 124 -134 . DOI: 10.3969/j.issn.1000-5641.2021.06.013
1 | ARULRAJ J, PERRON M, PAVLO A. Write-behind logging. Proceedings of the VLDB Endowment, 2016, 10 (4): 337- 348. |
2 | COBURN J, BUNKER T, SCHWARZ M, et al. From ARIES to MARS: Transaction support for next-generation, solid-state drives [C]// Proceedings of the Twenty-Fourth ACM Symposium on Operating Systems Principles. 2013: 197-212. |
3 | LEE H G, BAEK S, NICOPOULOS C, et al. An energy-and performance-aware DRAM cache architecture for hybrid DRAM/PCM main memory systems [C]// Proceedings of the 2011 IEEE 29th International Conference on Computer Design (ICCD). IEEE, 2011: 381-387. |
4 | ARULRAJ J, LEVANDOSKI J, MINHAS U F, et al. BzTree: A high-performance latch-free range index for non-volatile memory. Proceedings of the VLDB Endowment, 2018, 11 (5): 553- 565. |
5 | TUAN D Q, CHEON S, WON Y. On the IO characteristics of the SQLite transactions [C]// Proceedings of the International Conference on Mobile Software Engineering and Systems. 2016: 214-224. |
6 | HUANG Y, LIU T, XUE C J. Register allocation for write activity minimization on non-volatile main memory for embedded systems. Journal of Systems Architecture, 2012, 58 (1): 13- 23. |
7 | QURESHI M K, SRINIVASAN V, RIVERS J A. Scalable high performance main memory system using phase-change memory technology [C]// Proceedings of the 36th Annual International Symposium on Computer Architecture. 2009: 24-33. |
8 | WANG K L, ALZATE J G, AMIRI P K. Low-power non-volatile spintronic memory: STT-RAM and beyond. Journal of Physics D: Applied Physics, 2013, 46 (7): 074003. |
9 | MUSTAFA N U, ARMEJACH A, OZTURK O, et al. Implications of non-volatile memory as primary storage for database management systems [C]// 2016 International Conference on Embedded Computer Systems: Architectures, Modeling and Simulation (SAMOS). IEEE, 2016: 164-171. |
10 | KANG W H, LEE S W, MOON B, et al. X-FTL: Transactional FTL for SQLite databases [C]// Proceedings of the 2013 ACM SIGMOD International Conference on Management of Data. 2013: 97-108. |
11 | COOPER B F, SILBERSTEIN A, TAM E, et al. Benchmarking cloud serving systems with YCSB [C]// Proceedings of the 1st ACM Symposium on Cloud Computing. 2010: 143-154. |
12 | YANG J, KIM J, HOSEINZADEH M, et al. An empirical guide to the behavior and use of scalable persistent memory [C]// Proceedings of the 18th USENIX Conference on File and Storage Technologies. 2020: 169-182. |
13 | OH G, KIM S, LEE S W, et al. SQLite optimization with phase change memory for mobile applications. Proceedings of the VLDB Endowment, 2015, 8 (12): 1454- 1465. |
14 | PARK J H, OH G, LEE S W. SQL statement logging for making SQLite truly lite. Proceedings of the VLDB Endowment, 2017, 11 (4): 513- 525. |
15 | CHEN S, GIBBONS P B, NATH S. Rethinking database algorithms for phase change memory [C]// Proceedings of the 5th Biennial Conference on Innovative Data Systems Research. 2011: 21-31. |
16 | VAN RENEN A, LEIS V, KEMPER A, et al. Managing non-volatile memory in database systems [C]// Proceedings of the 2018 International Conference on Management of Data. 2018: 1541-1555. |
17 | OUKID I, BOOSS D, LEHNER W, et al. SOFORT: A hybrid SCM-DRAM storage engine for fast data recovery [C]// Proceedings of the Tenth International Workshop on Data Management on New Hardware. 2014: Article No.8. |
18 | ARULRAJ J, PAVLO A, MALLADI K T. Multi-tier buffer management and storage system design for non-volatile memory [EB/OL]. (2019–01–30) [2020–05–04]. https://arxiv.org/abs/1901.10938. |
/
〈 |
|
〉 |