How to Build a Non-Volatile Memory
Database Management System
Joy Arulraj Andrew Pavlo
Carnegie Mellon University Carnegie Mellon University
jarulraj@cs.cmu.edu pavlo@cs.cmu.edu
ABSTRACT
The difference in the performance characteristics of volatile (DRAM)
and non-volatile storage devices (HDD/SSDs) influences the design
of database management systems (DBMSs). The key assumption
has always been that the latter is much slower than the former. This
affects all aspects of a DBMS’s runtime architecture. But the arrival
of new non-volatile memory (NVM) storage that is almost as fast
as DRAM with fine-grained read/writes invalidates these previous
design choices.
In this tutorial, we provide an outline on how to build a new
DBMS given the changes to hardware landscape due to NVM. We
survey recent developments in this area, and discuss the lessons
learned from prior research on designing NVM database systems.
We highlight a set of open research problems, and present ideas for
solving some of them.
1. INTRODUCTION
DBMSs have always dealt with the trade-offs between volatile and
non-volatile storage devices. In order to retain modifications after
a loss of power, the DBMS must write that data to a non-volatile
device, such as a SSD or HDD. Such devices only support slow,
bulk data transfers as blocks. Contrast this with volatile DRAM,
where a DBMS can quickly read and write a single byte from these
devices, but all data is lost once power is lost.
Non-volatile memory (NVM)
1
offers an intriguing blend of these
two storage mediums. NVM is a broad class of technologies, in-
cluding phase-change memory [
67
], memristors [
73
], and STT-
MRAM [
36
], that provide low latency reads and writes on the same
order of magnitude as DRAM, but with persistent writes and large
storage capacity like a SSD [24].
Researchers have been discussing the possibility of building a
DBMS for NVM for decades [
31
]. Although battery-backed DRAM
has existed for some time, it has physical form, cost, and availability
limitations that prevent it from being widely adopted. And until re-
cently, it looked as if NVM would suffer the same fate. We contend,
however, that there are three recent developments that make it look
like we are finally at the point where NVM will become available.
First is that the industry has agreed to standard definitions of NVM
1
NVM is also referred to as storage-class memory or persistent memory.
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 permissions@acm.org.
SIGMOD’17, May 14-19, 2017, Chicago, IL, USA
© 2017 ACM. ISBN 978-1-4503-4197-4/17/05. . . $15.00
DOI: http://dx.doi.org/10.1145/3035918.3054780
technologies and form factors [
8
,
10
]. The second change is that
both Linux [
3
,
1
] and Microsoft [
52
,
48
] have announced support
for NVM in their respective kernels. Lastly, Intel has announced
that there are new instructions coming in their next ISA update that
are specifically for flushing data from CPU caches to NVM [
69
,
9
].
All of these portend the soon arrival of NVM. But it is unclear at
this point how to best leverage these new technologies in a DBMS.
There are several aspects of NVM that make existing DBMS archi-
tectures inappropriate for them [
33
]. For example, disk-oriented
DBMSs (e.g., Oracle RDBMS, IBM DB2, MySQL) are predicated
on using block-oriented devices for durable storage that are slow
at random access. As such, they maintain an in-memory cache for
blocks of tuples and try to maximize the amount of sequential reads
and writes to storage. In the case of memory-oriented DBMSs (e.g.,
VoltDB, MemSQL), they contain components for overcoming the
volatility of DRAM. Such components may be unnecessary in a
system with byte-addressable NVM with fast random access.
Tutorial Outline and Goals:
This tutorial is a comprehensive
discussion of how to design and build a DBMS for NVM. Our
focus is on systems that contain a hybrid architecture comprised
of DRAM, NVM, and HDD/SSDs (as opposed to one with only
NVM [
14
]), as such platforms will likely be the most common in
the near-term. The goal of our tutorial is to provide an overview
of the major design decisions in a DBMS implementation that are
affected by NVM. We will discuss issues related to both on-line
transaction processing (OLTP) and on-line analytical processing
(OLAP) systems, as well as hybrid (HTAP) DBMSs that seek to
support both workloads in a single platform.
We will first present an overview of NVM technologies (Sec-
tion 2), highlighting their differences both with each other and
compared to DRAM/SSDs. We will then discuss the three areas of
a DBMS architecture that are affected the most by NVM. First, we
discuss the core components, such as memory management, that
are shared throughout the DBMS (Section 3). We will then discuss
how the DBMS builds off of these components to support storage
and recovery mechanisms (Section 4). Then we describe how to
build on top of this storage layer to perform query optimization
and execution for NVM-resident databases (Section 5). Lastly, we
conclude with a summary of the lessons that we have learned in
building a DBMS for NVM.
This tutorial differs from previous presentations on NVM [
77
]
because we go beyond storage management and talk about the entire
internal DBMS stack. We will couch all of the above topics in the
context of the
Peloton
[
4
,
63
] DBMS. Peloton is an open-source
HTAP DBMS that we are building that is designed from the ground-
up to use NVM. Our intended audience are developers, researchers,
and practitioners with knowledge of DBMS internals. They do not
need any in-depth background or experience with NVM.