Abstract
Non-Volatile Memory (NVM) offers byte-addressability and persistency. Because NVM can be plugged into memory and provide low latency, it offers a new opportunity to build new database systems with a single-layer storage design. A single-layer NVM-Native DataBase (N2DB) provides zero copy and log freedom. Hence, all data are stored in NVM and there is no extra data duplication and logging during execution. N2DB avoids complex data synchronization and logging overhead in the two-layer storage design of disk-oriented databases and in-memory databases. Garbage Collection (GC) is critical in such an NVM-based database because memory leaks on NVM are durable. Moreover, data recovery is equally essential to guarantee atomicity, consistency, isolation, and durability properties. Without logging, it is a great challenge for N2DB to restore data to a consistent state after crashes and recoveries. This paper presents the GC and data recovery mechanisms for N2DB. Evaluations show that the overall performance of N2DB is up to