Springer Nature Switzerland AG has published in International Conference on Database and Expert Systems Applications proceedings an article written by Jiaqiao Zhang, Zhili Yao, and Jianlin Feng, School of Computer Science and Engineering, Sun Yat-Sen University, Guangzhou, China.
Abstract: “Non-volatile memory (NVM) has byte-addressability and data-durability. Redis, a popular in-memory kv-store system, can persist data when replacing DRAM with NVM. However, to implement NVM Redis, we need to use general NVM allocators to obtain NVM and guarantee the data consistency of Redis. There are two problems in NVM Redis. First, it is expensive to directly use NVM allocators with numerous metadata modification and logging. Second, logging which is also used to guarantee the data consistency of NVM Redis leads to write amplification and degrades the run-time performance of Redis. In this paper, we find that these two problems can be solved by exploiting memory caching inside Redis under NVM. Firstly, memory caching like the well-known Linux Slab will cache freed memory, reducing expensive NVM allocation/deallocation. Secondly, by recording all allocated NVM, caching can handle the persistent memory leak of Redis, which is the only inconsistent state induced by failures. Thus, the use of logging in NVM Redis can be avoided by using memory caching. In this paper, we propose an NVM caching called LFSlab (Log-Free Slab), while the conventional Slab needs logging to guarantee its consistency under NVM. Using LFSlab, we propose NCRedis (NVM Caching Redis) under NVM. In the experiment with Optane persistent memory, Redis with LFSlab outperforms the naive implementation of NVM Redis with no caching by 1.52-2.65x and DRAM Redis with data backup in disks by 1.27x, and gets at least 94% performance of DRAM-only Redis, while Optane persistent memory is 2-3x slower than DRAM at a 39% cost savings.“