A Distributed Storage System for Structured Data

19
Bigtable: A Distributed Storage System for Structured Data Fay Chang, Jeffrey Dean, Sanjay Ghemawat, Wilson C. Hsieh, Deborah A. Wallach, Mike Burrows, Tushar Chandra, Andrew Fikes, Rebert E. Gruber November 2006 OSDI’06: Proceedings of the 7th symposium on Operating Systems Design and Implementation Publisher: USENIX Association Feb 18, 2009

Transcript of A Distributed Storage System for Structured Data

Page 1: A Distributed Storage System for Structured Data

Bigtable:A Distributed Storage

System for Structured DataFay Chang, Jeffrey Dean, Sanjay Ghemawat, Wilson C. Hsieh, Deborah A. Wallach,

Mike Burrows, Tushar Chandra, Andrew Fikes, Rebert E. Gruber

November 2006OSDI’06: Proceedings of the 7th symposium on Operating Systems Design and ImplementationPublisher: USENIX Association Feb 18, 2009

Page 2: A Distributed Storage System for Structured Data

OUTLINE

• INTRODUCTION

• DATA MODEL

• IMPLEMENTATION

• REFINEMENTS

• PERFORMANCE

• CONCLUSIONS

Page 3: A Distributed Storage System for Structured Data

INTRODUCTION

• A distributed storage system for managing structured data that is designed to scale to very large size

• Achieved several goals: wide applicability, scalability, high performance, and high availability

• Resembles a database, but does not support a full relational data model

Page 4: A Distributed Storage System for Structured Data

DATA MODEL

• A Bigtable is a sparse, distributed, persistent multi-dimensional stored map

• The map is indexed by a row key, column key, and a timestamp; each value in the map is an uninterpreted array of bytes

(row:string, column string, time:int64) string

Page 5: A Distributed Storage System for Structured Data

DATA MODEL

A slice of an example table stores Web pages

Webtable

Page 6: A Distributed Storage System for Structured Data

DATA MODEL

A slice of an example table stores Web pages

Rows

• The row keys are arbitrary strings (up to 64KB in size)

• Every read or write of data under a single row key is atomic

• The row range for a table is dynamically partitioned

• Each row range is called a tablet which is the unit of distribution and

load balancing

Webtable

Page 7: A Distributed Storage System for Structured Data

DATA MODEL

A slice of an example table stores Web pages

Column Families

• Column keys are grouped into sets called column families which form

the basic unit of access control

• A column family must be created before data can stored

• A column key is named using syntax: family:qualifier

• Access control and both disk and memory accounting are performed at

the column-family level

Webtable

Page 8: A Distributed Storage System for Structured Data

DATA MODEL

A slice of an example table stores Web pages

Webtable

Timestamps

• Each cell in a Bigtable can contain multiple versions of the same data

• The timestamps can be assigned by Bigtable or client applications

• Supports two per-column-family settings to garbage-collect cell

versions automatically: the last n versions or new-enough versions

Page 9: A Distributed Storage System for Structured Data

IMPLEMENTATION

• The Bigtable has three major components:

• a library that is linked into every client

• one master server

• and many tablet servers

• Tablet servers can be dynamically added (or removed) from a cluster

Page 10: A Distributed Storage System for Structured Data

Tablet LocationIMPLEMENTATION

Tablet location hierarchy

Three-level hierarchy analogous to that of a B-Tree to store tablet location information

Page 11: A Distributed Storage System for Structured Data

Tablet Assignment• Each tablet is assigned to one tablet server

at a time and tracked by the master

• The master is responsible for detecting when a tablet server is no longer serving

• When a master is started, it needs to discover the current tablet assignment before it can change them

IMPLEMENTATION

Page 12: A Distributed Storage System for Structured Data

Tablet ServingIMPLEMENTATION

Tablet Representation

Page 13: A Distributed Storage System for Structured Data

Compactions• Minor compaction process

• Shrinks the memory usage

• Reduce the amount of data that has to be read from the log during recovery

• Merging compaction

• A merging compaction that rewrites all SSTables into exactly one SSTable is called a major compaction

IMPLEMENTATION

Page 14: A Distributed Storage System for Structured Data

REFINEMENTS

• Locality groups

• Compression

• Caching for read performance

• Bloom filters

• Commit-log implementation

• Speeding up tablet recovery

• Exploiting immutability

Page 15: A Distributed Storage System for Structured Data

PERFORMANCE

• A Bigtable cluster with N tablet servers

• The tablet servers were configured to use 1 GB of memory and to write to GFS cell consisting of 1786 machines with two 400 GB IDE hard drives each

• N client machines generated the Bigtable load used for these tests

Page 16: A Distributed Storage System for Structured Data

PERFORMANCE

• Each machine had two dual-core Opteron 2 GH chips, enough physical memory to hold the working set of all running processes, and a single Ethernet link

• The tablet servers and master, test clients, and GFS servers all ran on the same set of machines

Page 17: A Distributed Storage System for Structured Data

PERFORMANCE

• R is the distinct number of Bigtable row keys involved in the test

• R was chosen so that each benchmark read or wrote approximately 1 GB of data per tablet server

Page 18: A Distributed Storage System for Structured Data

PERFORMANCE

Number of 1000-byte values read/written per second

Rate per tablet server Aggregate rate

Page 19: A Distributed Storage System for Structured Data

CONCLUSIONS

• Why always relational database?

• The fact that many Google products successfully use Bigtable demonstrates that the design works well in practice

• There are significant advantages to building our own storage solution