everyone loves file: file storage service (fss) in …...what is file storage service i oracle...

19
Everyone Loves File: File Storage Service (FSS) in Oracle Cloud Infrastructure Matteo Frigo, Bradley C. Kuszmaul, Justin Mazzola Paluska and Alexander (Sasha) Sandler (and many others) 2019-07-10, USENIX ATC

Upload: others

Post on 22-Aug-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Everyone Loves File: File Storage Service (FSS) in …...What is File Storage Service I Oracle operates a cloud. I We set up a le system for you. I The le system appears as IP address

Everyone Loves File:File Storage Service (FSS) inOracle Cloud Infrastructure

Matteo Frigo, Bradley C. Kuszmaul,Justin Mazzola Paluska and Alexander (Sasha) Sandler

(and many others)

2019-07-10, USENIX ATC

Page 2: Everyone Loves File: File Storage Service (FSS) in …...What is File Storage Service I Oracle operates a cloud. I We set up a le system for you. I The le system appears as IP address

What is File Storage Service

I Oracle operates a cloud.

I We set up a file system for you.

I The file system appears as IP address in yourvirtual private network. Behind that IP address isa Network File Service (NFS) server.

I You rent NFS clients from us.

I You pay for what you use (some price per gigabytemonth).

I You start with 0 bytes, and can grow to as manypetabytes as you want.

Page 3: Everyone Loves File: File Storage Service (FSS) in …...What is File Storage Service I Oracle operates a cloud. I We set up a le system for you. I The le system appears as IP address

Architecture of File Storage Service

NFSproc10.0.2.97

NFSproc

NFSproc10.0.2.54

10.0.2.53

presentationhost

NFS Client

NFS Client

NFS Client

NFS Client Dendron

DASD

hoststorage

Dendron

DASD

hoststorage

Page 4: Everyone Loves File: File Storage Service (FSS) in …...What is File Storage Service I Oracle operates a cloud. I We set up a le system for you. I The le system appears as IP address

Simpler Idea: Use Standard File Servers

Page 5: Everyone Loves File: File Storage Service (FSS) in …...What is File Storage Service I Oracle operates a cloud. I We set up a le system for you. I The le system appears as IP address

Problems with Standard File Servers

I Failover andReplication.

I Pack several file systemsper server, and migratethem as they grow.

I How to handle big filesystems? Somehowfilesystems must scale tobe larger than a singleserver.

Page 6: Everyone Loves File: File Storage Service (FSS) in …...What is File Storage Service I Oracle operates a cloud. I We set up a le system for you. I The le system appears as IP address

Scale Up: FSS Distributes DataStructures Across Servers

Page 7: Everyone Loves File: File Storage Service (FSS) in …...What is File Storage Service I Oracle operates a cloud. I We set up a le system for you. I The le system appears as IP address

What Data Structure Do We Want?Inodes (Ritchie and Thompson [1972])I Each file or directory is

represented by anumbered inode.

I Directories include amapping from names toinumbers. Need a datastructure for thedirectory.

I Files include a mappingfrom offsets to blocknumbers. Need a datastructure for the blockmap.

Page 8: Everyone Loves File: File Storage Service (FSS) in …...What is File Storage Service I Oracle operates a cloud. I We set up a le system for you. I The le system appears as IP address

Represent Inodes as Tabular Data

instead of implementing the inodes directly.

Inode Tableinumber permissions owner0 drwx------ bradley42 -rw-r--r-- bradley90 drwxrwxrwx bradley

Directory Tableinumber,name inumber0,”u” 9090,”foo.txt” 42

Block Tableinumber,offset inumber42,0 942.4096’ 100

Page 9: Everyone Loves File: File Storage Service (FSS) in …...What is File Storage Service I Oracle operates a cloud. I We set up a le system for you. I The le system appears as IP address

Store the Tabular Data in a DistributedB-tree

Page 10: Everyone Loves File: File Storage Service (FSS) in …...What is File Storage Service I Oracle operates a cloud. I We set up a le system for you. I The le system appears as IP address

Only One B-Tree

I All the filesystems are stored in a single B-tree.

I Smaller filesystems simply use fewer key-value pairsin the B-tree.

I Even small file systems end up distributed acrossmany servers.

Page 11: Everyone Loves File: File Storage Service (FSS) in …...What is File Storage Service I Oracle operates a cloud. I We set up a le system for you. I The le system appears as IP address

Updating the B-tree Requires AtomicOperations Across Servers

Page 12: Everyone Loves File: File Storage Service (FSS) in …...What is File Storage Service I Oracle operates a cloud. I We set up a le system for you. I The le system appears as IP address

Two-Phase Commit (2PC)The classic strategy [Gray78, Lampson80] for building adistributed data structure. If several servers participatein a transaction, one machine acts as the coordinator.

1. Each participant records its part of the transaction,and it marks its subtransaction as prepared. Itcan either roll it forward or back.

2. When the coordinator hears that all have prepared,it marks the transaction as committed (oraborted).

3. Participants are told to roll their transactionsforward (or back). If a participant misses thenotification, it later asks the coordinator whathappened.

Page 13: Everyone Loves File: File Storage Service (FSS) in …...What is File Storage Service I Oracle operates a cloud. I We set up a le system for you. I The le system appears as IP address

The Problem with 2PC

Q: What if, just before it marks a transactioncommitted, the coordinator crashes anddoesn’t ever come back?Or maybe the crash was just after thetransaction committed.

A: The clients cannot tell which case it is, andthey get stuck forever.

Page 14: Everyone Loves File: File Storage Service (FSS) in …...What is File Storage Service I Oracle operates a cloud. I We set up a le system for you. I The le system appears as IP address

Paxos Doesn’t Get Stuck

I’m not going to explain Paxos in detail.

I Paxos [Lamport 98] can be used to come to aconsensus on a single value.

I Multi-Paxos can be used to come to a consensus ona log.

I Once you have a log, you can implement anarbitrary state machine.

I Paxos handles messages getting lost or duplicatedand servers crashing at inopportune times, withoutgetting stuck.

Page 15: Everyone Loves File: File Storage Service (FSS) in …...What is File Storage Service I Oracle operates a cloud. I We set up a le system for you. I The le system appears as IP address

FSS Uses Paxos to Implement two-phasecommit

I Each participant in two-phase-commit isimplemented by a replicated state machine.

I The participants are nonstop, since they arereplicated.

I A replicated participant is called an Extent.

Page 16: Everyone Loves File: File Storage Service (FSS) in …...What is File Storage Service I Oracle operates a cloud. I We set up a le system for you. I The le system appears as IP address

How Big is an Extent?

I The state of an extent must fit onto a single server.So not too big.

I The overhead of the state machine is large (toimplement two-phase commit). So not too small.

I We size the extents so that hundreds of them fitonto a server.I Each extent manages several gigabtyes of disk.I The extent’s state machine is a few megabytes.I Extents are small enough to move around for load

balancing and to provide parallelism for failure recovery.I Extents are 5-way replicated.

Page 17: Everyone Loves File: File Storage Service (FSS) in …...What is File Storage Service I Oracle operates a cloud. I We set up a le system for you. I The le system appears as IP address

Multipage Store Conditional (MPSC)I On top of 2PC, We program FSS using an

optimistic concurrency style.I Multipage store conditional :

I Read up to 15 pages into memory, obtaining for eachpage a version tag that is guaranteed to changewhenever the page is modified.

I Compute new values for the pages.I Present the new pages along with the previously

obtained version tags to the MPSC system.I The new pages are all written atomically (and only if

none of the read pages have changed).I If the MPSC operation fails, no changes are made.

I MPSC operations are linearizable.I An MPSC operation is a limited transaction: Not

too big, not too small. Lock-free style.

Page 18: Everyone Loves File: File Storage Service (FSS) in …...What is File Storage Service I Oracle operates a cloud. I We set up a le system for you. I The le system appears as IP address

A Simple Throughput Model

I Each storage server provides some disk and somenetwork bandwidth.

I For writes, every byte is transmitted 5 times.

I So divide all the network bandwidth by 5. That isa peak “not-to-be-exceeded” speed.

I Queueing theory says you cannot run at 100%. Wefind we can run at about 1/3 of peak.

I The simple model: THe bandwidth is 1/15th of thenetwork bandwidth.

I Surprisingly this simple model seems to work for allworkloads we’ve seen.

Page 19: Everyone Loves File: File Storage Service (FSS) in …...What is File Storage Service I Oracle operates a cloud. I We set up a le system for you. I The le system appears as IP address

Looks Like a Speedup Curve

1

2

3

0 2 4.7 5.8 8 10 12

C· 0.7

0GB

s−1

C· 0.

52GB

s−1

3.31 GB s−1

2.98 GB s−1

S0.52, 2.98(C)

S0.70, 3.31(C)

Ban

dw

idth

(GB

s−1)

Number of clients, C