Xinjing Zhou, Joy Arulraj, Andrew Pavlo, and David Cohen
DRAM NVM SSD
Latency
Idle Sequential Read Latency 75 ns 170 ns 10 µs
Idle Random Read Latency 80 ns 320 ns 12 µs
Bandwidth (6 DRAM and 6 NVM modules)
Sequential Read 180 GB/s 91.2 GB/s 2.6 GB/s
Random Read 180 GB/s 28.8 GB/s 2.4 GB/s
Sequential Write 180 GB/s 27.6 GB/s 2.4 GB/s
Random Write 180 GB/s 6 GB/s 2.3 GB/s
Other Key Attributes
Price ($/GB) 10 4.5 2.8
Addressability Byte Byte Block
Media Access Granularity 64 B 256 B 16 KB
Persistent No Yes Yes
Endurance (cycles) 10
16
10
10
10
12
Table 1: Device Characteristics –
Comparison of key characteristics of
DRAM, NVM (Optane DC PMMs), and SSD (Optane DC P4800X).
Our Approach.
In this paper, we present Spitfire, a multi-threaded,
three-tier buer manager that is evaluated on Optane Data Center
(DC) Persistent Memory Modules (PMMs), an NVM technology that
is being shipped by Intel [
7
]. As summarized in Table 1, Optane
DC PMMs bridges the performance and cost dierentials between
DRAM and an enterprise-grade SSD [
26
,
32
]. Unlike SSD, it delivers
higher bandwidth and lower latency to CPUs. Unlike DRAM, it
supports persistent writes and large storage capacity.
We begin by introducing a taxonomy for data migration policies
that subsumes the specic policies employed in previous three-
tier buer managers [
22
,
37
]. Since the CPU is capable of directly
operating on NVM-resident data, Spitfire does not eagerly move
data from NVM to DRAM. We show that lazy data migration from
NVM to DRAM ensures that only hot data is promoted to DRAM.
An optimal migration policy maximizes the utility of movement
of data between dierent devices in the storage hierarchy. We
empirically demonstrate that the policy must be tailored based on
the characteristics of the devices and the workload. Given this, we
present a machine learning technique for automatically adapting
the policy for an arbitrary workload and storage hierarchy. This
adaptive data migration scheme eliminates the need for manual
tuning of the policy.
Contributions. We make the following contributions:
•
We introduce a taxonomy for reasoning about data migration
in a multi-tier storage hierarchy (§3).
•
We introduce an adaptation mechanism that converges to a
near-optimal policy for an arbitrary workload and storage
hierarchy without requiring any manual tuning (§4).
•
We implement our techniques in Spitfire, a multi-threaded,
three-tier buer manager (§5).
•
We evaluate Spitfire on Optane DC PMMs and demonstrate
that it works well across diverse workloads and storage hier-
archies (§6).
•
We present a set of guidelines for choosing the storage hierar-
chy and migration policy based on workload (§6.6, §6.7).
•
We demonstrate that an NVM-SSD hierarchy works well on
write-intensive workloads (§6.6).
2
NVM
SSD
Database Write-Ahead Log
Buffer Pool
DRAM
Buffer Pool
5
87
61
10
9
Cache-line-grained
page (NVM-backed)
Entire page
(SSD-backed)
2
9
3 4
DRAM Admission
DRAM Eviction 10
NVM Admission
5
CPU Cache
2 9
NVM Eviction
6
CPU Cache
Figure 1: Data Migration Policy in Hymem
– The four critical decisions
in the data migration policy adopted by Hymem.
2 Background
We rst provide an overview of the NVM-aware optimizations
adopted by Hymem in §2.1. We then discuss how Spitfire makes
use of Optane DC PMMs in §2.2.
2.1 NVM-aware Optimizations in Hymem
The traditional approaches for buer management in DBMSs are
incompatible with the advent of byte-addressable NVM. The rea-
sons for this are twofold. First, to process SSD-resident data, the
buer manager must copy it to DRAM before the DBMS can per-
form any operations. In contrast, the CPU can directly operate on
NVM-resident data (256 B blocks) [
7
]. Second, NVM bridges the
performance gap between DRAM and SSD. Given these observa-
tions, researchers have designed Hymem, a novel buer manager
for a DRAM-NVM-SSD hierarchy [
37
]. The key NVM-centric opti-
mizations in Hymem include:
Data Migration Policy.
Figure 1 presents the data ow paths in
the multi-tier storage hierarchy. NVM introduces new data ow
paths in the storage hierarchy (
❶
,
❷
,
❺
,
❻
,
❼
,
❽
). By leveraging
these additional paths, Hymem reduces data movement between
dierent tiers and minimizes the number of writes to NVM. The for-
mer results in improving the DBMS’s performance, while the latter
extends the lifetime of NVM devices with limited write-endurance.
The default read path comprises of three steps: moving data from
SSD to NVM (
❶
), then to DRAM (
❷
), and lastly to the CPU cache
(
❸
). Similarly, the default write path consists of three steps: moving
data from processor cache to DRAM (
❹
), then to NVM (
❺
), and
nally to SSD (❻).
As we discussed in §1, the four critical decisions in the data
migration policy adopted by Hymem include: DRAM admission,
DRAM eviction, NVM admission, and NVM eviction. When a trans-
action requests a page, Hymem checks if the page is in the DRAM
buer. If it is not present in the DRAM buer, it checks if the page
is present in the NVM buer or not. In the former case, it directly
accesses the page residing on NVM (
❷
). In the latter case, it eagerly
admits the entire page residing on SSD into the DRAM buer (
❾
). It
does not leverage the path from SSD to NVM (
❶
). DRAM eviction
is the second decision that Hymem takes to reclaim space. It must
decide whether that page must be admitted to the NVM buer. Each
time a page is considered for admission, Hymem checks whether
the page is in the admission queue. If so, it is removed from the
评论