17
1 Twizzler: A Data-Centric OS for Persistent Memory Daniel Bittman Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller Center for Research in Storage Systems University of California, Santa Cruz

University of California, Santa Cruz Center for Research ...Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller Center for Research in Storage Systems University of California, Santa

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: University of California, Santa Cruz Center for Research ...Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller Center for Research in Storage Systems University of California, Santa

1

Twizzler: A Data-CentricOS for Persistent Memory

Daniel Bittman Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller

Center for Research in Storage SystemsUniversity of California, Santa Cruz

Page 2: University of California, Santa Cruz Center for Research ...Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller Center for Research in Storage Systems University of California, Santa

Hardware Trends

2

~1-10 ms

sys_read

~100-300 ns ~1 us

Growing, becoming persistent Outdated interface Cannot compute on directly

Persistent data should be operated on directly and like memory

Page 3: University of California, Santa Cruz Center for Research ...Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller Center for Research in Storage Systems University of California, Santa

Global Object Space: Abstract References

Persistent data should be operated on directly and like memory

A B

C AB

Process 1

Process 2 A B

3

Page 4: University of California, Santa Cruz Center for Research ...Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller Center for Research in Storage Systems University of California, Santa

Existing approaches?

4

PMDKNo OS support

Data sharing is hard

Slow pointers

POSIXExplicit persistence and data access

Multiple forms of data

Kernel involvement

mmap helps, but does not solve the virtual memory problem

Twizzler’s goalsLittle kernel involvement

Pervasive support (security, sharing)

Low overhead persistent pointers

Page 5: University of California, Santa Cruz Center for Research ...Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller Center for Research in Storage Systems University of California, Santa

Design Overview

5

application

musl* libc

libtwz

twix

Twizzler kernel

view management, pointer translation, consistency primitives

object & threadmanagement, trusted computing base

* modified musl to change linux syscalls into function calls

Linux syscall emulation

data object

userspacekernelspace

POSIX access(read/write)

direct access(memory-style)

metadata & FOT management

create, delete, etc. physical mapping

Page 6: University of California, Santa Cruz Center for Research ...Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller Center for Research in Storage Systems University of California, Santa

Persistent Pointers

6

Pointers may be cross-object: referring to data within a different object

object-id offset

FOT entry offset

64-bits

FOT Data

Object Layout

object ID or Name Name Resolver flags

Foreign Object Table

object ID or Name Name Resolver flags

1

2...

1 <offset>

1 A rw-

2 B r--

O

FOT

A

FOT entry of >0 means “cross-object”—points to a

different object.

Page 7: University of California, Santa Cruz Center for Research ...Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller Center for Research in Storage Systems University of California, Santa

Implications for Data and Sharing

7

Objects are self-contained

Persistent pointers are based on identity not location

Persistent pointers can be operated on generically

Objects can be easily shared

FOT entry offset

64-bits

object ID offset

128-bits

Pointers in Twizzler Pointers in PMDK

64-bit IDs require global coordination or collision

management

Coordination free sharing

Page 8: University of California, Santa Cruz Center for Research ...Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller Center for Research in Storage Systems University of California, Santa

Consistency and Security

8

Cryptographically signed capabilities for access control

The kernel cannot create capabilities, but it can (must) verify them.

All enforcement must be done by hardware.

Page 9: University of California, Santa Cruz Center for Research ...Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller Center for Research in Storage Systems University of California, Santa

Implementation

More details available at twizzler.io

9

Page 10: University of California, Santa Cruz Center for Research ...Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller Center for Research in Storage Systems University of California, Santa

Evaluation Goals

Programmability, not performance (though, performance where we can get it)

10

Page 11: University of California, Santa Cruz Center for Research ...Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller Center for Research in Storage Systems University of California, Santa

Case Study: KVS

11

Index Data

Lookup returns direct pointers

250 lines of simple C code is all you need

Data2

Index

Data1

r--

---

Page 12: University of California, Santa Cruz Center for Research ...Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller Center for Research in Storage Systems University of California, Santa

Evaluation

12

Dell R640 Servers with Intel Optane DC

Ported SQLite to Twizzler and to PMDK

Compared to SQLite “native” and SQLite “LMDB” (mmap)

Page 13: University of California, Santa Cruz Center for Research ...Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller Center for Research in Storage Systems University of California, Santa

Performance: SQLite

13

Page 14: University of California, Santa Cruz Center for Research ...Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller Center for Research in Storage Systems University of California, Santa

Performance: SQLite

14

Page 15: University of California, Santa Cruz Center for Research ...Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller Center for Research in Storage Systems University of California, Santa

Future Work: Distributed Twizzler

15

codedata

It’s a rendezvous problem

node

A

D

C

B

Explicit Relationships and the Object Graph

Page 16: University of California, Santa Cruz Center for Research ...Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller Center for Research in Storage Systems University of California, Santa

Conclusion

16

Operating systems must evolve to supportpersistent data programming models directly

Cross-object pointers allow us to realize the power of UNIX in a data-centric model

Twizzler provides benefits for bothNVM and traditional systems

Page 17: University of California, Santa Cruz Center for Research ...Peter Alvaro Pankaj Mehra Darrell Long Ethan Miller Center for Research in Storage Systems University of California, Santa

Thank You! Questions?

17