TY - JOUR T1 - A Persistent Log Buffer Technique using Non-volatile Memory for In-Memory Key-Value Databases AU - Kim, Doyoung AU - Choi, Won Gi AU - Sung, Hanseung AU - Lee, Jihwan AU - Park, Sanghyun JO - Journal of KIISE, JOK PY - 2018 DA - 2018/1/14 DO - 10.5626/JOK.2018.45.11.1193 KW - in-memory key-value database KW - recovery KW - NVRAM KW - Redis AB - Redis, an In-Memory Key-Value Database, is widely used in services that require real time data processing and storage. Since main memory is volatile, Redis has a problem of data loss if the system is terminated abnormally. To prevent this problem, Redis stores logs on disk, preventing data loss by restoring logs when the system is terminated. The AOF recovery mechanism, a method of appending requested commands in disk as a log format, operates with the “everysec” policy that writes logs every second, and the “always” policy that writes a log every time a command is requested. The “everysec” policy does not degrade performance of Redis, but data loss can occur if the system is terminated abnormally within one second. Conversely, the “always” policy does not cause data loss, but it requires disk operation for every command, causing performance degradation. We propose a system model that constructs AOF buffer in non-volatile memory and stores logs in the buffer, which are not synchronized to disk in the “everysec” policy. The proposed model prevents data loss and has approximately 100 times better performance than the “always” policy.