Beruflich Dokumente
Kultur Dokumente
Fay Chang, Jeffrey Dean, Sanjay Ghemawat, Wilson C. Hsieh, Deborah A. Wallach, Mike Burrows, Tushar Chandra, Andrew Fikes, Robert E. Gruber Google, Inc. UWCS OS Seminar Discussion Erik Paulson 2 October 2006
See also the (other)UW presentation by Jeff Dean in September of 2005 (See the link on the seminar page, or just google for google bigtable)
Before we begin
Intersection of databases and distributed systems Will try to explain (or at least warn) when we hit a patch of database Remember this is a discussion!
2 of 19
Google Scale
Lots of data
Copies of the web, satellite data, user data, email and USENET, Subversion backing store
Firm believers in the End-to-End argument 450,000 machines (NYTimes estimate, June 14th 2006
3 of 19
Building Blocks
Scheduler (Google WorkQueue) Google Filesystem Chubby Lock service Two other pieces helpful but not required
Sawzall MapReduce (despite what the Internet says)
Chubby
{lock/file/name} service Coarse-grained locks, can store small amount of data in a lock 5 replicas, need a majority vote to be active Also an OSDI 06 Paper
6 of 19
7 of 19
SSTable
Immutable, sorted file of key-value pairs Chunks of data plus an index
Index is of block ranges, not values
SSTable
64K block
64K block
64K block
Index
8 of 19
Tablet
Contains some range of rows of the table Built out of multiple SSTables
Tablet 64K block
Start:aardvark
64K block 64K block
End:apple
SSTable 64K block 64K block 64K block SSTable
Index
Index
9 of 19
Table
Multiple tablets make up the table SSTables can be shared Tablets do not overlap, SSTables can overlap
Tablet Tablet apple
aardvark
apple_two_E
boat
SSTable SSTable
SSTable SSTable
10 of 19
Finding a tablet
11 of 19
Servers
Tablet servers manage tablets, multiple tablets per server. Each tablet is 100-200 megs
Each tablet lives at only one server Tablet server splits tablets that get too big
Editing a table
Mutations are logged, then applied to an in-memory version Logfile stored in GFS
Tablet Insert Insert Delete Insert Delete Insert SSTable SSTable
13 of 19
Memtable
apple_two_E
boat
Compactions
Minor compaction convert the memtable into an SSTable
Reduce memory usage Reduce log traffic on restart
Merging compaction
Reduce number of SSTables Good place to apply policy keep only N versions
Major compaction
Merging compaction that results in only one SSTable No deletion records, only live data
14 of 19
Locality Groups
Group column families together into an SSTable
Avoid mingling data, ie page contents and page metadata Can keep some groups all in memory
Can compress locality groups Bloom Filters on locality groups avoid searching SSTable
15 of 19
Microbenchmarks
16 of 19
17 of 19
Application at Google
18 of 19
Lessons learned
Interesting point- only implement some of the requirements, since the last is probably not needed Many types of failure possible Big systems need proper systems-level monitoring Value simple designs
19 of 19