SlideShare a Scribd company logo
1 of 39
Download to read offline
Log Structured Merge Tree
Pinglei Guo
at15 at1510086
Agenda
● History
● Questions after reading the paper
● An example: Cassandra
● The original paper: Why & How & Visualization
● Suggested reading
1996 LSM Tree
The log-structured merge-tree
cited by 401
2006 Bigtable
Bigtable: A distributed storage system for
structured data
cited by 4917
2011 LevelDB
LevelDB: A Fast Persistent
Key-Value Store
History of LSM Tree
1992 LSF
The design and implementation
of a log-structured file system
cited by 1885
2013 RocksDB
Under the Hood: Building and
open-sourcing RocksDB
2015 TSM Tree
The New InfluxDB Storage
Engine: Time Structured
Merge Tree
2010 Cassandra
Cassandra: a decentralized
structured storage system
2007 HBase
1
History of LSM Tree
1
What’s the trend for Database?
● Data become larger, more write
● Non-Relational Databases emerge, HBase, Cassandra
● Database are also used for analysis and decision making
● Bigtable
● Cassandra
● HBase
● PNUTS (from Yahoo! 阿里他爸)
● LevelDB && RocksDB
● MongoDB (wired tiger)
● SQLite (optional)
● InfluxDB
Databases using LSM Tree Databases using LevelDB/RocksDB
● Riak KV (TS)
● TiKV
● InfluxDB (before 1.0)
● MySQL (in facebook)
● MongoDB (in facebook's dismissed Parse)
Facebook: eat my own Rocks
Questions after reading the paper
2
● Do I still need WAL/WBL when I use log structured merge tree
● Is LSM Tree a data structure like B+ Tree, is there a textbook implementation
● Can someone explain the rolling merge process in detail
● Databases using LSM Tree often have the concept of column family, is it an alias
for Column Database
Quick Answers
2
● Do I still need WAL/WBL when I use log structured merge tree
Yes
● Is LSM Tree a data structure like B+ Tree, is there a textbook implementation
No
● Can someone explain the rolling merge process in detail
I will try
● Databases using LSM Tree often have the concept of column family, is it an alias
for Column Database
No, JavaScript != Java + Script
3
Cassandra as first example
Why? (not O'Neil 96, Bigtable, LevelDB)
why we pick Cassandra as first example?
3
1. It give us a high level overview of a full real system
2. It is easier to understand than original paper
3. It is battle tested
4. It is open source
3
● Commit Log (WAL)
● Memtable (C0 in paper)
Write goes to
Operations return before
the data is written to disk
(Fast)
Cassandra Write
3
● Memtable are dumped to disk as SSTable
● SSTable are merged by background process
immutable
Cassandra ‘Merge’
SSTable: Sorted String Table
● Bloom Filter
● Index
● Data
3
● Read from MemTable
● use Bloom filter to identify SSTables
● Load SSTable index
● Read from multiple SSTables
● Merge the result and return
Cassandra Read (simplified)
4
O'Neil 96 The LSM tree
Its name leads to confusion
● Log structured merge tree is not log like WAL
● Log comes from log structured file system
● LSM Tree is a concept than a concrete implementation
● Tree can be replaced by other data structure like map
● More intuitive name could be buffered write, multi level storage, write back cache for index
Log is borrowed, Tree can be replaced, Merge is the king
4
O'Neil 96 The LS Merge tree
Let's talk about Merge
Merge is the subtle part (that I don't understand clearly)
Two Merges
● Post-Write: Merge fast (small) level to slow (big) level
● Read: Read from both fast level and slow level and return the merged result
Merge Sort
● A new array need to be allocated
● Two sub array must be sorted before merge
4
O'Neil 96 The LS Merge tree
Q1: Why we need to Merge?
A : Because we put data on different media
4
O'Neil 96 The LS Merge tree
1. Merge is needed because we put data on different media
Q2: Why put data on different media?
1. Speed & Access pattern
The 5 minutes rule
4
O'Neil 96 The LS Merge tree
1. Merge is needed because we put data on different media
1. Speed & Access pattern
2. Price
3. Durability
Q2: Why put data on different media?
● Tape
● HDD
● SSD
● RAM
4
O'Neil 96 The LS Merge tree
1. Merge is needed because we put data on different media
1. Speed & Access pattern
2. Price
3. Durability
Q2: Why put data on different media?
● Tape
● HDD
● SSD
● RAM
Other media? NVM?
4
O'Neil 96 The LS Merge tree
1. Merge is needed because we put data on different media
1. Speed & Access pattern
2. Price
3. Durability
Q2: Why put data on different media?
● Tape
● HDD
● SSD
● RAM
Other media? Distributed system is also ‘media’
4
O'Neil 96 The LS Merge tree
1. Merge is needed because we put data on different media
1. Speed & Access pattern
2. Price
3. Durability
Q2: Why put data on different media?
Distributed systems -> media that resist larger failure
● Natural disasters
● Human misbehave
● Fail of one machine
● Fail of entire datacenter
● Fail of a country
● Fail of planet earth
4
O'Neil 96 The LS Merge tree
1. Merge is needed because we put data on different media
2. Put data on different media to gain
1. Faster Speed
2. Lower Price
3. Resistance to various level of Failures
Q3: How to merge?
● Batch
● Append
● speed up
● more efficient space usage
Principle: You don't write to the next level until you have to, and you write in the fastest way
How to Merge is important
4
O'Neil 96 The LS Merge tree
Mem
Disk
10 12
1 8 10 11 12 13
Client: Write <6, "foo">
7
9
Before After
Mem
Disk
10 12
1 8 10 11 12 13
7
96 (foo)
10 12 10 12
O' Neil 96
4
DB: I need to merge
load leaf node into memory emptying, pick node
Mem
Disk
10 12
1 8 10 11 12 13
7
96 (foo)
10 12
1 8
Mem
Disk
10 12
1 8 10 11 12 13
7
96 (foo)
10 12
1 8
O' Neil 96
4
DB: I need to merge
filling
Mem
Disk
10 12
1 8 10 11 12 13
7
96 (foo)
10 12
1 8
1 6
Mem
Disk
10 12
1 8 10 11 12 13
7
9
10 12
8
1 6 (foo)
append to disk
O' Neil 96
4
Mem
Disk
10 12
1 8 10 11 12 13
7
9
10 12
8
1 6 (foo)
Client: Write <6, "bar">
6 (bar)
Client: Read <6, ?>
Mem
Disk
10 12
1 8 10 11 12 13
7
9
10 12
8
1 6 (foo)
6 (bar)
[foo, bar]
Fetch from both level and return merged result
O' Neil 96
4
Client: Delete <6, "bar">
Mem
Disk
10 12
1 8 10 11 12 13
7
9
10 12
8
1 6 (foo)
6 (bar) (dead)
O' Neil 96
4
Client: Read <6, ?>
Mem
Disk
10 12
1 8 10 11 12 13
7
9
10 12
8
1 6 (foo)
6 (bar) (dead)
[foo]
O' Neil 96
4
Mem
Disk
10 12
1 8 10 11 12 13
710 12
1 6 (foo) 8 9
Mem
Disk
10 12
1 8 10 11 12 13
7
9
10 12
8
1 6 (foo)
6 (bar) (dead)
DB: I need to merge
Before After
Mem
Disk
Client: Write <6, "I am foo">
Before
After Cassandra
4
7 Ha Ha
13 Excited
Mem
Disk
6 I am foo
7 Ha Ha
13 Excited
1 This 8 is 9 radom 10 gen 11 text 12 !
1 This 8 is 9 radom 10 gen 11 text 12 !
DB: I need to dump
Before
4
Mem
Disk
6 I am foo
7 Ha Ha
13 Excited
CassandraAfter
Mem
Disk
1 This 8 is 9 radom 10 gen 11 text 12 !
6 I am foo 7 Ha Ha 13 Excited
1 This 8 is 9 radom 10 gen 11 text 12 !
DB: I need to compact
4
Disk
1 This 8 is 9 radom 10 gen 11 text 12 !
1 This 6 I am foo 7 Ha Ha 8 is 9 radom 10 gen 11 text 12 ! 13 Excited
6 I am foo 7 Ha Ha 13 Excited
Before
After
Cassandra
Compare of O'Neil 96 and Cassandra
4
O'Neil 96 Cassandra
in memory structure AVL/2-3 Tree Map
on disk structure B+ Tree SSTable, Index, Bloomfilter
level (component) C_0, C_1 .... C_n Memtable, SSTable
flush to disk when Memory can’t hold Memory can’t hold and/or timer
persist to disk by Write new block (append) dump new SSTable from Memtable (append)
merge is done at Memory (empty, filling block) Disk (Compaction in background)
concurrency control Complex SSTable is immutable, data have (real world)
timestamp for versioning, updating value does
not bother dump or merge
delete Tombstone, delete at merge Tombstone, delete at merge
Summary
4
O'Neil 96 The LS Merge tree
● Write to fast level
● Read from both fast and slow.
● Data is flushed from fast level to slow level when they are too big
● Real delete is defered to merge
LevelDB & RocksDB
5
From RocksDB: Challenges of LSM-Trees in Practice
LevelDB & RocksDB
5
From RocksDB: Challenges of LSM-Trees in Practice
LevelDB & RocksDB
Bloom Filter for range queries
From RocksDB: Challenges of LSM-Trees in Practice
LevelDB & RocksDB
Bloom Filter for range queries
From RocksDB: Challenges of LSM-Trees in Practice
Full Answers
2
● Do I still need WAL/WBL when I use log structured merge tree
Yes
● Is LSM Tree a data structure like B+ Tree, is there a textbook implementation
No, it’s how you use different data structure in different storage media
● Can someone explain the rolling merge process in detail
I tried
● Databases using LSM Tree often have the concept of column family, is it an alias
for Column Database
No, see Distinguishing Two Major Types of Column-Stores
Reference & Suggested reading
1. SSTable and log structured storage leveldb
2. Notes for reading LSM paper
3. Cassandra: a decentralized structured storage system
4. Bigtable: A distributed storage system for structured data
5. RocksDB Talks
6. Pathologies of Big Data
7. Distinguishing Two Major Types of Column-Stores
8. Visualization of B+ Tree
9. Time structured merge tree
10. Code: Cassandra, LevelDB, RocksDB, Indeed LSM Tree, InfluxDB (Talk is cheap, show me the code)
code is cheap, show me the proof; proof is cheap, I just want to sleep
Thank You!
Happy weekend and Lunar New Year!
Pinglei Guo
at1510086at15

More Related Content

What's hot

Iceberg + Alluxio for Fast Data Analytics
Iceberg + Alluxio for Fast Data AnalyticsIceberg + Alluxio for Fast Data Analytics
Iceberg + Alluxio for Fast Data AnalyticsAlluxio, Inc.
 
Apache Iceberg: An Architectural Look Under the Covers
Apache Iceberg: An Architectural Look Under the CoversApache Iceberg: An Architectural Look Under the Covers
Apache Iceberg: An Architectural Look Under the CoversScyllaDB
 
Iceberg: a fast table format for S3
Iceberg: a fast table format for S3Iceberg: a fast table format for S3
Iceberg: a fast table format for S3DataWorks Summit
 
Cassandra Introduction & Features
Cassandra Introduction & FeaturesCassandra Introduction & Features
Cassandra Introduction & FeaturesDataStax Academy
 
Presto Summit 2018 - 09 - Netflix Iceberg
Presto Summit 2018  - 09 - Netflix IcebergPresto Summit 2018  - 09 - Netflix Iceberg
Presto Summit 2018 - 09 - Netflix Icebergkbajda
 
Evening out the uneven: dealing with skew in Flink
Evening out the uneven: dealing with skew in FlinkEvening out the uneven: dealing with skew in Flink
Evening out the uneven: dealing with skew in FlinkFlink Forward
 
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the CloudAmazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the CloudNoritaka Sekiyama
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcachedJurriaan Persyn
 
MyRocks introduction and production deployment
MyRocks introduction and production deploymentMyRocks introduction and production deployment
MyRocks introduction and production deploymentYoshinori Matsunobu
 
Seastore: Next Generation Backing Store for Ceph
Seastore: Next Generation Backing Store for CephSeastore: Next Generation Backing Store for Ceph
Seastore: Next Generation Backing Store for CephScyllaDB
 
Apache Kudu: Technical Deep Dive


Apache Kudu: Technical Deep Dive

Apache Kudu: Technical Deep Dive


Apache Kudu: Technical Deep Dive

Cloudera, Inc.
 
Optimizing RocksDB for Open-Channel SSDs
Optimizing RocksDB for Open-Channel SSDsOptimizing RocksDB for Open-Channel SSDs
Optimizing RocksDB for Open-Channel SSDsJavier González
 
Apache Spark Core—Deep Dive—Proper Optimization
Apache Spark Core—Deep Dive—Proper OptimizationApache Spark Core—Deep Dive—Proper Optimization
Apache Spark Core—Deep Dive—Proper OptimizationDatabricks
 
Tame the small files problem and optimize data layout for streaming ingestion...
Tame the small files problem and optimize data layout for streaming ingestion...Tame the small files problem and optimize data layout for streaming ingestion...
Tame the small files problem and optimize data layout for streaming ingestion...Flink Forward
 
The Parquet Format and Performance Optimization Opportunities
The Parquet Format and Performance Optimization OpportunitiesThe Parquet Format and Performance Optimization Opportunities
The Parquet Format and Performance Optimization OpportunitiesDatabricks
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to RedisDvir Volk
 
SSD Deployment Strategies for MySQL
SSD Deployment Strategies for MySQLSSD Deployment Strategies for MySQL
SSD Deployment Strategies for MySQLYoshinori Matsunobu
 
Project Tungsten: Bringing Spark Closer to Bare Metal
Project Tungsten: Bringing Spark Closer to Bare MetalProject Tungsten: Bringing Spark Closer to Bare Metal
Project Tungsten: Bringing Spark Closer to Bare MetalDatabricks
 
A Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and HudiA Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and HudiDatabricks
 

What's hot (20)

Iceberg + Alluxio for Fast Data Analytics
Iceberg + Alluxio for Fast Data AnalyticsIceberg + Alluxio for Fast Data Analytics
Iceberg + Alluxio for Fast Data Analytics
 
Apache Iceberg: An Architectural Look Under the Covers
Apache Iceberg: An Architectural Look Under the CoversApache Iceberg: An Architectural Look Under the Covers
Apache Iceberg: An Architectural Look Under the Covers
 
Iceberg: a fast table format for S3
Iceberg: a fast table format for S3Iceberg: a fast table format for S3
Iceberg: a fast table format for S3
 
Cassandra Introduction & Features
Cassandra Introduction & FeaturesCassandra Introduction & Features
Cassandra Introduction & Features
 
Presto Summit 2018 - 09 - Netflix Iceberg
Presto Summit 2018  - 09 - Netflix IcebergPresto Summit 2018  - 09 - Netflix Iceberg
Presto Summit 2018 - 09 - Netflix Iceberg
 
Evening out the uneven: dealing with skew in Flink
Evening out the uneven: dealing with skew in FlinkEvening out the uneven: dealing with skew in Flink
Evening out the uneven: dealing with skew in Flink
 
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the CloudAmazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcached
 
MyRocks introduction and production deployment
MyRocks introduction and production deploymentMyRocks introduction and production deployment
MyRocks introduction and production deployment
 
Seastore: Next Generation Backing Store for Ceph
Seastore: Next Generation Backing Store for CephSeastore: Next Generation Backing Store for Ceph
Seastore: Next Generation Backing Store for Ceph
 
Apache Kudu: Technical Deep Dive


Apache Kudu: Technical Deep Dive

Apache Kudu: Technical Deep Dive


Apache Kudu: Technical Deep Dive


 
Optimizing RocksDB for Open-Channel SSDs
Optimizing RocksDB for Open-Channel SSDsOptimizing RocksDB for Open-Channel SSDs
Optimizing RocksDB for Open-Channel SSDs
 
Apache Spark Core—Deep Dive—Proper Optimization
Apache Spark Core—Deep Dive—Proper OptimizationApache Spark Core—Deep Dive—Proper Optimization
Apache Spark Core—Deep Dive—Proper Optimization
 
Rds data lake @ Robinhood
Rds data lake @ Robinhood Rds data lake @ Robinhood
Rds data lake @ Robinhood
 
Tame the small files problem and optimize data layout for streaming ingestion...
Tame the small files problem and optimize data layout for streaming ingestion...Tame the small files problem and optimize data layout for streaming ingestion...
Tame the small files problem and optimize data layout for streaming ingestion...
 
The Parquet Format and Performance Optimization Opportunities
The Parquet Format and Performance Optimization OpportunitiesThe Parquet Format and Performance Optimization Opportunities
The Parquet Format and Performance Optimization Opportunities
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
SSD Deployment Strategies for MySQL
SSD Deployment Strategies for MySQLSSD Deployment Strategies for MySQL
SSD Deployment Strategies for MySQL
 
Project Tungsten: Bringing Spark Closer to Bare Metal
Project Tungsten: Bringing Spark Closer to Bare MetalProject Tungsten: Bringing Spark Closer to Bare Metal
Project Tungsten: Bringing Spark Closer to Bare Metal
 
A Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and HudiA Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and Hudi
 

Similar to Log Structured Merge Tree

Object Compaction in Cloud for High Yield
Object Compaction in Cloud for High YieldObject Compaction in Cloud for High Yield
Object Compaction in Cloud for High YieldScyllaDB
 
Using oracle12c pluggable databases to archive
Using oracle12c pluggable databases to archiveUsing oracle12c pluggable databases to archive
Using oracle12c pluggable databases to archiveSecure-24
 
Top 10 Perl Performance Tips
Top 10 Perl Performance TipsTop 10 Perl Performance Tips
Top 10 Perl Performance TipsPerrin Harkins
 
Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)
Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)
Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)Spark Summit
 
Hadoop 3.0 - Revolution or evolution?
Hadoop 3.0 - Revolution or evolution?Hadoop 3.0 - Revolution or evolution?
Hadoop 3.0 - Revolution or evolution?Uwe Printz
 
Hadoop 3 @ Hadoop Summit San Jose 2017
Hadoop 3 @ Hadoop Summit San Jose 2017Hadoop 3 @ Hadoop Summit San Jose 2017
Hadoop 3 @ Hadoop Summit San Jose 2017Junping Du
 
Apache Hadoop 3.0 Community Update
Apache Hadoop 3.0 Community UpdateApache Hadoop 3.0 Community Update
Apache Hadoop 3.0 Community UpdateDataWorks Summit
 
Apache Hadoop India Summit 2011 Keynote talk "HDFS Federation" by Sanjay Radia
Apache Hadoop India Summit 2011 Keynote talk "HDFS Federation" by Sanjay RadiaApache Hadoop India Summit 2011 Keynote talk "HDFS Federation" by Sanjay Radia
Apache Hadoop India Summit 2011 Keynote talk "HDFS Federation" by Sanjay RadiaYahoo Developer Network
 
Understanding and building big data Architectures - NoSQL
Understanding and building big data Architectures - NoSQLUnderstanding and building big data Architectures - NoSQL
Understanding and building big data Architectures - NoSQLHyderabad Scalability Meetup
 
Zing Database – Distributed Key-Value Database
Zing Database – Distributed Key-Value DatabaseZing Database – Distributed Key-Value Database
Zing Database – Distributed Key-Value Databasezingopen
 
Zing Database
Zing Database Zing Database
Zing Database Long Dao
 
Kafka on ZFS: Better Living Through Filesystems
Kafka on ZFS: Better Living Through Filesystems Kafka on ZFS: Better Living Through Filesystems
Kafka on ZFS: Better Living Through Filesystems confluent
 
Red Hat Ceph Storage Acceleration Utilizing Flash Technology
Red Hat Ceph Storage Acceleration Utilizing Flash Technology Red Hat Ceph Storage Acceleration Utilizing Flash Technology
Red Hat Ceph Storage Acceleration Utilizing Flash Technology Red_Hat_Storage
 
Scaling Cassandra for Big Data
Scaling Cassandra for Big DataScaling Cassandra for Big Data
Scaling Cassandra for Big DataDataStax Academy
 
SolrCloud in Public Cloud: Scaling Compute Independently from Storage - Ilan ...
SolrCloud in Public Cloud: Scaling Compute Independently from Storage - Ilan ...SolrCloud in Public Cloud: Scaling Compute Independently from Storage - Ilan ...
SolrCloud in Public Cloud: Scaling Compute Independently from Storage - Ilan ...Lucidworks
 
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...Red_Hat_Storage
 
Accelerating hbase with nvme and bucket cache
Accelerating hbase with nvme and bucket cacheAccelerating hbase with nvme and bucket cache
Accelerating hbase with nvme and bucket cacheDavid Grier
 
Apache CarbonData:New high performance data format for faster data analysis
Apache CarbonData:New high performance data format for faster data analysisApache CarbonData:New high performance data format for faster data analysis
Apache CarbonData:New high performance data format for faster data analysisliang chen
 
Presentation db2 best practices for optimal performance
Presentation   db2 best practices for optimal performancePresentation   db2 best practices for optimal performance
Presentation db2 best practices for optimal performancesolarisyougood
 

Similar to Log Structured Merge Tree (20)

Object Compaction in Cloud for High Yield
Object Compaction in Cloud for High YieldObject Compaction in Cloud for High Yield
Object Compaction in Cloud for High Yield
 
Using oracle12c pluggable databases to archive
Using oracle12c pluggable databases to archiveUsing oracle12c pluggable databases to archive
Using oracle12c pluggable databases to archive
 
Top 10 Perl Performance Tips
Top 10 Perl Performance TipsTop 10 Perl Performance Tips
Top 10 Perl Performance Tips
 
week1slides1704202828322.pdf
week1slides1704202828322.pdfweek1slides1704202828322.pdf
week1slides1704202828322.pdf
 
Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)
Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)
Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)
 
Hadoop 3.0 - Revolution or evolution?
Hadoop 3.0 - Revolution or evolution?Hadoop 3.0 - Revolution or evolution?
Hadoop 3.0 - Revolution or evolution?
 
Hadoop 3 @ Hadoop Summit San Jose 2017
Hadoop 3 @ Hadoop Summit San Jose 2017Hadoop 3 @ Hadoop Summit San Jose 2017
Hadoop 3 @ Hadoop Summit San Jose 2017
 
Apache Hadoop 3.0 Community Update
Apache Hadoop 3.0 Community UpdateApache Hadoop 3.0 Community Update
Apache Hadoop 3.0 Community Update
 
Apache Hadoop India Summit 2011 Keynote talk "HDFS Federation" by Sanjay Radia
Apache Hadoop India Summit 2011 Keynote talk "HDFS Federation" by Sanjay RadiaApache Hadoop India Summit 2011 Keynote talk "HDFS Federation" by Sanjay Radia
Apache Hadoop India Summit 2011 Keynote talk "HDFS Federation" by Sanjay Radia
 
Understanding and building big data Architectures - NoSQL
Understanding and building big data Architectures - NoSQLUnderstanding and building big data Architectures - NoSQL
Understanding and building big data Architectures - NoSQL
 
Zing Database – Distributed Key-Value Database
Zing Database – Distributed Key-Value DatabaseZing Database – Distributed Key-Value Database
Zing Database – Distributed Key-Value Database
 
Zing Database
Zing Database Zing Database
Zing Database
 
Kafka on ZFS: Better Living Through Filesystems
Kafka on ZFS: Better Living Through Filesystems Kafka on ZFS: Better Living Through Filesystems
Kafka on ZFS: Better Living Through Filesystems
 
Red Hat Ceph Storage Acceleration Utilizing Flash Technology
Red Hat Ceph Storage Acceleration Utilizing Flash Technology Red Hat Ceph Storage Acceleration Utilizing Flash Technology
Red Hat Ceph Storage Acceleration Utilizing Flash Technology
 
Scaling Cassandra for Big Data
Scaling Cassandra for Big DataScaling Cassandra for Big Data
Scaling Cassandra for Big Data
 
SolrCloud in Public Cloud: Scaling Compute Independently from Storage - Ilan ...
SolrCloud in Public Cloud: Scaling Compute Independently from Storage - Ilan ...SolrCloud in Public Cloud: Scaling Compute Independently from Storage - Ilan ...
SolrCloud in Public Cloud: Scaling Compute Independently from Storage - Ilan ...
 
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
 
Accelerating hbase with nvme and bucket cache
Accelerating hbase with nvme and bucket cacheAccelerating hbase with nvme and bucket cache
Accelerating hbase with nvme and bucket cache
 
Apache CarbonData:New high performance data format for faster data analysis
Apache CarbonData:New high performance data format for faster data analysisApache CarbonData:New high performance data format for faster data analysis
Apache CarbonData:New high performance data format for faster data analysis
 
Presentation db2 best practices for optimal performance
Presentation   db2 best practices for optimal performancePresentation   db2 best practices for optimal performance
Presentation db2 best practices for optimal performance
 

Recently uploaded

Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburgmasabamasaba
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 

Recently uploaded (20)

Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 

Log Structured Merge Tree

  • 1. Log Structured Merge Tree Pinglei Guo at15 at1510086
  • 2. Agenda ● History ● Questions after reading the paper ● An example: Cassandra ● The original paper: Why & How & Visualization ● Suggested reading
  • 3. 1996 LSM Tree The log-structured merge-tree cited by 401 2006 Bigtable Bigtable: A distributed storage system for structured data cited by 4917 2011 LevelDB LevelDB: A Fast Persistent Key-Value Store History of LSM Tree 1992 LSF The design and implementation of a log-structured file system cited by 1885 2013 RocksDB Under the Hood: Building and open-sourcing RocksDB 2015 TSM Tree The New InfluxDB Storage Engine: Time Structured Merge Tree 2010 Cassandra Cassandra: a decentralized structured storage system 2007 HBase 1
  • 4. History of LSM Tree 1 What’s the trend for Database? ● Data become larger, more write ● Non-Relational Databases emerge, HBase, Cassandra ● Database are also used for analysis and decision making ● Bigtable ● Cassandra ● HBase ● PNUTS (from Yahoo! 阿里他爸) ● LevelDB && RocksDB ● MongoDB (wired tiger) ● SQLite (optional) ● InfluxDB Databases using LSM Tree Databases using LevelDB/RocksDB ● Riak KV (TS) ● TiKV ● InfluxDB (before 1.0) ● MySQL (in facebook) ● MongoDB (in facebook's dismissed Parse) Facebook: eat my own Rocks
  • 5. Questions after reading the paper 2 ● Do I still need WAL/WBL when I use log structured merge tree ● Is LSM Tree a data structure like B+ Tree, is there a textbook implementation ● Can someone explain the rolling merge process in detail ● Databases using LSM Tree often have the concept of column family, is it an alias for Column Database
  • 6. Quick Answers 2 ● Do I still need WAL/WBL when I use log structured merge tree Yes ● Is LSM Tree a data structure like B+ Tree, is there a textbook implementation No ● Can someone explain the rolling merge process in detail I will try ● Databases using LSM Tree often have the concept of column family, is it an alias for Column Database No, JavaScript != Java + Script
  • 7. 3 Cassandra as first example Why? (not O'Neil 96, Bigtable, LevelDB)
  • 8. why we pick Cassandra as first example? 3 1. It give us a high level overview of a full real system 2. It is easier to understand than original paper 3. It is battle tested 4. It is open source
  • 9. 3 ● Commit Log (WAL) ● Memtable (C0 in paper) Write goes to Operations return before the data is written to disk (Fast) Cassandra Write
  • 10. 3 ● Memtable are dumped to disk as SSTable ● SSTable are merged by background process immutable Cassandra ‘Merge’ SSTable: Sorted String Table ● Bloom Filter ● Index ● Data
  • 11. 3 ● Read from MemTable ● use Bloom filter to identify SSTables ● Load SSTable index ● Read from multiple SSTables ● Merge the result and return Cassandra Read (simplified)
  • 12. 4 O'Neil 96 The LSM tree Its name leads to confusion ● Log structured merge tree is not log like WAL ● Log comes from log structured file system ● LSM Tree is a concept than a concrete implementation ● Tree can be replaced by other data structure like map ● More intuitive name could be buffered write, multi level storage, write back cache for index Log is borrowed, Tree can be replaced, Merge is the king
  • 13. 4 O'Neil 96 The LS Merge tree Let's talk about Merge Merge is the subtle part (that I don't understand clearly) Two Merges ● Post-Write: Merge fast (small) level to slow (big) level ● Read: Read from both fast level and slow level and return the merged result Merge Sort ● A new array need to be allocated ● Two sub array must be sorted before merge
  • 14. 4 O'Neil 96 The LS Merge tree Q1: Why we need to Merge? A : Because we put data on different media
  • 15. 4 O'Neil 96 The LS Merge tree 1. Merge is needed because we put data on different media Q2: Why put data on different media? 1. Speed & Access pattern The 5 minutes rule
  • 16. 4 O'Neil 96 The LS Merge tree 1. Merge is needed because we put data on different media 1. Speed & Access pattern 2. Price 3. Durability Q2: Why put data on different media? ● Tape ● HDD ● SSD ● RAM
  • 17. 4 O'Neil 96 The LS Merge tree 1. Merge is needed because we put data on different media 1. Speed & Access pattern 2. Price 3. Durability Q2: Why put data on different media? ● Tape ● HDD ● SSD ● RAM Other media? NVM?
  • 18. 4 O'Neil 96 The LS Merge tree 1. Merge is needed because we put data on different media 1. Speed & Access pattern 2. Price 3. Durability Q2: Why put data on different media? ● Tape ● HDD ● SSD ● RAM Other media? Distributed system is also ‘media’
  • 19. 4 O'Neil 96 The LS Merge tree 1. Merge is needed because we put data on different media 1. Speed & Access pattern 2. Price 3. Durability Q2: Why put data on different media? Distributed systems -> media that resist larger failure ● Natural disasters ● Human misbehave ● Fail of one machine ● Fail of entire datacenter ● Fail of a country ● Fail of planet earth
  • 20. 4 O'Neil 96 The LS Merge tree 1. Merge is needed because we put data on different media 2. Put data on different media to gain 1. Faster Speed 2. Lower Price 3. Resistance to various level of Failures Q3: How to merge?
  • 21. ● Batch ● Append ● speed up ● more efficient space usage Principle: You don't write to the next level until you have to, and you write in the fastest way How to Merge is important 4 O'Neil 96 The LS Merge tree
  • 22. Mem Disk 10 12 1 8 10 11 12 13 Client: Write <6, "foo"> 7 9 Before After Mem Disk 10 12 1 8 10 11 12 13 7 96 (foo) 10 12 10 12 O' Neil 96 4
  • 23. DB: I need to merge load leaf node into memory emptying, pick node Mem Disk 10 12 1 8 10 11 12 13 7 96 (foo) 10 12 1 8 Mem Disk 10 12 1 8 10 11 12 13 7 96 (foo) 10 12 1 8 O' Neil 96 4
  • 24. DB: I need to merge filling Mem Disk 10 12 1 8 10 11 12 13 7 96 (foo) 10 12 1 8 1 6 Mem Disk 10 12 1 8 10 11 12 13 7 9 10 12 8 1 6 (foo) append to disk O' Neil 96 4
  • 25. Mem Disk 10 12 1 8 10 11 12 13 7 9 10 12 8 1 6 (foo) Client: Write <6, "bar"> 6 (bar) Client: Read <6, ?> Mem Disk 10 12 1 8 10 11 12 13 7 9 10 12 8 1 6 (foo) 6 (bar) [foo, bar] Fetch from both level and return merged result O' Neil 96 4
  • 26. Client: Delete <6, "bar"> Mem Disk 10 12 1 8 10 11 12 13 7 9 10 12 8 1 6 (foo) 6 (bar) (dead) O' Neil 96 4 Client: Read <6, ?> Mem Disk 10 12 1 8 10 11 12 13 7 9 10 12 8 1 6 (foo) 6 (bar) (dead) [foo]
  • 27. O' Neil 96 4 Mem Disk 10 12 1 8 10 11 12 13 710 12 1 6 (foo) 8 9 Mem Disk 10 12 1 8 10 11 12 13 7 9 10 12 8 1 6 (foo) 6 (bar) (dead) DB: I need to merge Before After
  • 28. Mem Disk Client: Write <6, "I am foo"> Before After Cassandra 4 7 Ha Ha 13 Excited Mem Disk 6 I am foo 7 Ha Ha 13 Excited 1 This 8 is 9 radom 10 gen 11 text 12 ! 1 This 8 is 9 radom 10 gen 11 text 12 !
  • 29. DB: I need to dump Before 4 Mem Disk 6 I am foo 7 Ha Ha 13 Excited CassandraAfter Mem Disk 1 This 8 is 9 radom 10 gen 11 text 12 ! 6 I am foo 7 Ha Ha 13 Excited 1 This 8 is 9 radom 10 gen 11 text 12 !
  • 30. DB: I need to compact 4 Disk 1 This 8 is 9 radom 10 gen 11 text 12 ! 1 This 6 I am foo 7 Ha Ha 8 is 9 radom 10 gen 11 text 12 ! 13 Excited 6 I am foo 7 Ha Ha 13 Excited Before After Cassandra
  • 31. Compare of O'Neil 96 and Cassandra 4 O'Neil 96 Cassandra in memory structure AVL/2-3 Tree Map on disk structure B+ Tree SSTable, Index, Bloomfilter level (component) C_0, C_1 .... C_n Memtable, SSTable flush to disk when Memory can’t hold Memory can’t hold and/or timer persist to disk by Write new block (append) dump new SSTable from Memtable (append) merge is done at Memory (empty, filling block) Disk (Compaction in background) concurrency control Complex SSTable is immutable, data have (real world) timestamp for versioning, updating value does not bother dump or merge delete Tombstone, delete at merge Tombstone, delete at merge
  • 32. Summary 4 O'Neil 96 The LS Merge tree ● Write to fast level ● Read from both fast and slow. ● Data is flushed from fast level to slow level when they are too big ● Real delete is defered to merge
  • 33. LevelDB & RocksDB 5 From RocksDB: Challenges of LSM-Trees in Practice
  • 34. LevelDB & RocksDB 5 From RocksDB: Challenges of LSM-Trees in Practice
  • 35. LevelDB & RocksDB Bloom Filter for range queries From RocksDB: Challenges of LSM-Trees in Practice
  • 36. LevelDB & RocksDB Bloom Filter for range queries From RocksDB: Challenges of LSM-Trees in Practice
  • 37. Full Answers 2 ● Do I still need WAL/WBL when I use log structured merge tree Yes ● Is LSM Tree a data structure like B+ Tree, is there a textbook implementation No, it’s how you use different data structure in different storage media ● Can someone explain the rolling merge process in detail I tried ● Databases using LSM Tree often have the concept of column family, is it an alias for Column Database No, see Distinguishing Two Major Types of Column-Stores
  • 38. Reference & Suggested reading 1. SSTable and log structured storage leveldb 2. Notes for reading LSM paper 3. Cassandra: a decentralized structured storage system 4. Bigtable: A distributed storage system for structured data 5. RocksDB Talks 6. Pathologies of Big Data 7. Distinguishing Two Major Types of Column-Stores 8. Visualization of B+ Tree 9. Time structured merge tree 10. Code: Cassandra, LevelDB, RocksDB, Indeed LSM Tree, InfluxDB (Talk is cheap, show me the code) code is cheap, show me the proof; proof is cheap, I just want to sleep
  • 39. Thank You! Happy weekend and Lunar New Year! Pinglei Guo at1510086at15