SlideShare una empresa de Scribd logo
1 de 21
LSM-Trees
Chris Lohfink
Email: clohfink@blackbirdit.com
Twitter: cnlohfink
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
PAGE© Pythian Cassandra
● Senior Engineer at Pythian (recently acquired Blackbird)
o Lead of Cassandra practice
● Experience
o Worked with Cassandra since 0.8 (2011)
o Java/Python developer
About Me
Chris Lohfink
1
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
PAGE© Pythian Cassandra
• Fault tolerance
• Multiple DCs
• Large data sets
• Data model gotchas
• Unstable releases
• Bootstrapping
• Repairs
• Unit tests
- My Opinions -
2
Cassandra
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
PAGE© Pythian Cassandra
● Can be good, bad, or ugly
● Same as with everything else
Where is Performance?
3
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
PAGE© Pythian Cassandra
Lies, Dirty Lies, & Benchmarks
4
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
PAGE© Pythian Cassandra 5
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
PAGE© Pythian Cassandra 6
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
PAGE© Pythian Cassandra
● An LSM-tree is composed of two or more tree-like components, each optimized
for their type of storage
o A small in-memory tree
o One or more on disk trees
● Used in Cassandra, HBase, LevelDB, Google Big Table, SQLite4 & more
Log Structured Merge Tree
LSM-Tree
7
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
PAGE© Pythian Cassandra
Log Structured Merge Tree
One tree in memory, one or more on disk
Memory Disk
ReadsWrites
8
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
PAGE© Pythian Cassandra
Log Structured Merge Tree
Match Cassandra nomenclature
Memtable SSTable
ReadsWrites
9
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
PAGE© Pythian Cassandra
• Very Fast Writes
– Cost of IO amortized across large batches
– Append only
• Comparable Reads
– Comparable best-case
– Potential for very slow
Log Structured Merge Tree
10
Characteristics
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
Pythian PAGE© Pythian© Pythian Cassandra
Write Path
Represent numbers of shovels in stock
Memtable SSTables
Temp -20
Shovels 0
State MN
11
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
Pythian PAGE© Pythian© Pythian Cassandra
Write Path
Decide we need to include humidity
Memtable SSTables
Temp -20
Shovels 0
State MN
Humidity 10
12
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
Pythian PAGE© Pythian© Pythian Cassandra
Write Path
Its Minnesota so the Temperature changed
Memtable SSTables
Temp -20
Shovels 0
State MN
Humidity 10
Temp 80
13
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
Pythian PAGE© Pythian© Pythian Cassandra
Write Path
Shovel demand drops so its time to put some in stock again
Memtable SSTables
Temp -20
Shovels 0
State MN
Humidity 10
Temp 80
Shovels 25
14
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
Pythian PAGE© Pythian© Pythian Cassandra
Write Path
Reached memtable limit, flush to disk
Memtable SSTables
Temp -20
Shovels 0
State MN
Humidity 10
Temp 80
Shovels 25
Humidity 10
Temp 80
Shovels 25
15
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
Pythian PAGE© Pythian© Pythian Cassandra
Write Path
We still in Minnesota and its been a few days so adjust Temp
Memtable SSTables
Temp -20
Shovels 0
State MN
Humidity 10
Temp 80
Shovels 25
Temp 10
16
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
Pythian PAGE© Pythian© Pythian Cassandra
Read Path
Check the current temp, take most recent from all SSTables
and the Memtable
Memtable SSTables
Temp -20
Shovels 0
State MN
Humidity 10
Temp 80
Shovels 25
Temp 10
17
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
Pythian PAGE© Pythian© Pythian Cassandra
Compaction
Create new SSTable thats the merged result
Memtable SSTables
Temp -20
Shovels 0
State MN
Humidity 10
Temp 80
Shovels 25
Temp 10 Humidity 10
Shovels 25
Temp 80
State MN
18
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
Pythian PAGE© Pythian© Pythian Cassandra
Compaction
Delete old SSTables
Memtable SSTables
Temp 10 Humidity 10
Shovels 25
Temp 80
State MN
19
www.pythian.com
twitter: cnlohfink | e-mail: clohfink@blackbirdit.com
Pythian PAGE© Pythian© Pythian Cassandra
Questions?
20

Más contenido relacionado

La actualidad más candente

Cassandra Introduction & Features
Cassandra Introduction & FeaturesCassandra Introduction & Features
Cassandra Introduction & FeaturesDataStax Academy
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBMike Dirolf
 
Introduction to NOSQL databases
Introduction to NOSQL databasesIntroduction to NOSQL databases
Introduction to NOSQL databasesAshwani Kumar
 
Building an open data platform with apache iceberg
Building an open data platform with apache icebergBuilding an open data platform with apache iceberg
Building an open data platform with apache icebergAlluxio, Inc.
 
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
 
Iceberg: A modern table format for big data (Strata NY 2018)
Iceberg: A modern table format for big data (Strata NY 2018)Iceberg: A modern table format for big data (Strata NY 2018)
Iceberg: A modern table format for big data (Strata NY 2018)Ryan Blue
 
What is in a Lucene index?
What is in a Lucene index?What is in a Lucene index?
What is in a Lucene index?lucenerevolution
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introductionPooyan Mehrparvar
 
An Overview of Apache Cassandra
An Overview of Apache CassandraAn Overview of Apache Cassandra
An Overview of Apache CassandraDataStax
 
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...confluent
 
Transactional SQL in Apache Hive
Transactional SQL in Apache HiveTransactional SQL in Apache Hive
Transactional SQL in Apache HiveDataWorks Summit
 
A Seminar on NoSQL Databases.
A Seminar on NoSQL Databases.A Seminar on NoSQL Databases.
A Seminar on NoSQL Databases.Navdeep Charan
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsJonas Bonér
 
Building large scale transactional data lake using apache hudi
Building large scale transactional data lake using apache hudiBuilding large scale transactional data lake using apache hudi
Building large scale transactional data lake using apache hudiBill Liu
 
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
 
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
 
Hyperspace for Delta Lake
Hyperspace for Delta LakeHyperspace for Delta Lake
Hyperspace for Delta LakeDatabricks
 
9. Document Oriented Databases
9. Document Oriented Databases9. Document Oriented Databases
9. Document Oriented DatabasesFabio Fumarola
 

La actualidad más candente (20)

Cassandra Introduction & Features
Cassandra Introduction & FeaturesCassandra Introduction & Features
Cassandra Introduction & Features
 
Druid deep dive
Druid deep diveDruid deep dive
Druid deep dive
 
MyRocks Deep Dive
MyRocks Deep DiveMyRocks Deep Dive
MyRocks Deep Dive
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Introduction to NOSQL databases
Introduction to NOSQL databasesIntroduction to NOSQL databases
Introduction to NOSQL databases
 
Building an open data platform with apache iceberg
Building an open data platform with apache icebergBuilding an open data platform with apache iceberg
Building an open data platform with apache iceberg
 
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
 
Iceberg: A modern table format for big data (Strata NY 2018)
Iceberg: A modern table format for big data (Strata NY 2018)Iceberg: A modern table format for big data (Strata NY 2018)
Iceberg: A modern table format for big data (Strata NY 2018)
 
What is in a Lucene index?
What is in a Lucene index?What is in a Lucene index?
What is in a Lucene index?
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introduction
 
An Overview of Apache Cassandra
An Overview of Apache CassandraAn Overview of Apache Cassandra
An Overview of Apache Cassandra
 
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
 
Transactional SQL in Apache Hive
Transactional SQL in Apache HiveTransactional SQL in Apache Hive
Transactional SQL in Apache Hive
 
A Seminar on NoSQL Databases.
A Seminar on NoSQL Databases.A Seminar on NoSQL Databases.
A Seminar on NoSQL Databases.
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability Patterns
 
Building large scale transactional data lake using apache hudi
Building large scale transactional data lake using apache hudiBuilding large scale transactional data lake using apache hudi
Building large scale transactional data lake using apache hudi
 
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
 
Optimizing RocksDB for Open-Channel SSDs
Optimizing RocksDB for Open-Channel SSDsOptimizing RocksDB for Open-Channel SSDs
Optimizing RocksDB for Open-Channel SSDs
 
Hyperspace for Delta Lake
Hyperspace for Delta LakeHyperspace for Delta Lake
Hyperspace for Delta Lake
 
9. Document Oriented Databases
9. Document Oriented Databases9. Document Oriented Databases
9. Document Oriented Databases
 

Destacado

Some key value stores using log-structure
Some key value stores using log-structureSome key value stores using log-structure
Some key value stores using log-structureZhichao Liang
 
Análisis fonológico
Análisis fonológicoAnálisis fonológico
Análisis fonológicoOscar E
 
The Power of the Log
The Power of the LogThe Power of the Log
The Power of the LogBen Stopford
 
数据库系统设计漫谈
数据库系统设计漫谈数据库系统设计漫谈
数据库系统设计漫谈james tong
 
The right read optimization is actually write optimization
The right read optimization is actually write optimizationThe right read optimization is actually write optimization
The right read optimization is actually write optimizationjames tong
 
Cassandra SF 2012 - Technical Deep Dive: query performance
Cassandra SF 2012 - Technical Deep Dive: query performance Cassandra SF 2012 - Technical Deep Dive: query performance
Cassandra SF 2012 - Technical Deep Dive: query performance aaronmorton
 
Using Time Window Compaction Strategy For Time Series Workloads
Using Time Window Compaction Strategy For Time Series WorkloadsUsing Time Window Compaction Strategy For Time Series Workloads
Using Time Window Compaction Strategy For Time Series WorkloadsJeff Jirsa
 
X internet framework
X internet frameworkX internet framework
X internet frameworkNeha Malik
 
Augmented Reality Smartglasses 2016 trends and challenges
Augmented Reality Smartglasses 2016 trends and challengesAugmented Reality Smartglasses 2016 trends and challenges
Augmented Reality Smartglasses 2016 trends and challengesAlexandre BOUCHET
 
[243]kaleido 노현걸
[243]kaleido 노현걸[243]kaleido 노현걸
[243]kaleido 노현걸NAVER D2
 
[@IndeedEng] Imhotep Workshop
[@IndeedEng] Imhotep Workshop[@IndeedEng] Imhotep Workshop
[@IndeedEng] Imhotep Workshopindeedeng
 
Lenguaje Silencioso Del Mexicano Rc
Lenguaje Silencioso Del Mexicano RcLenguaje Silencioso Del Mexicano Rc
Lenguaje Silencioso Del Mexicano RcLucy Padilla
 

Destacado (20)

LSMの壁
LSMの壁LSMの壁
LSMの壁
 
LSM
LSMLSM
LSM
 
Lsm february 2010
Lsm   february 2010Lsm   february 2010
Lsm february 2010
 
Some key value stores using log-structure
Some key value stores using log-structureSome key value stores using log-structure
Some key value stores using log-structure
 
Análisis fonológico
Análisis fonológicoAnálisis fonológico
Análisis fonológico
 
The Power of the Log
The Power of the LogThe Power of the Log
The Power of the Log
 
Lsm trees
Lsm treesLsm trees
Lsm trees
 
Ucl ppt
Ucl pptUcl ppt
Ucl ppt
 
数据库系统设计漫谈
数据库系统设计漫谈数据库系统设计漫谈
数据库系统设计漫谈
 
The right read optimization is actually write optimization
The right read optimization is actually write optimizationThe right read optimization is actually write optimization
The right read optimization is actually write optimization
 
Cassandra SF 2012 - Technical Deep Dive: query performance
Cassandra SF 2012 - Technical Deep Dive: query performance Cassandra SF 2012 - Technical Deep Dive: query performance
Cassandra SF 2012 - Technical Deep Dive: query performance
 
Using Time Window Compaction Strategy For Time Series Workloads
Using Time Window Compaction Strategy For Time Series WorkloadsUsing Time Window Compaction Strategy For Time Series Workloads
Using Time Window Compaction Strategy For Time Series Workloads
 
X internet framework
X internet frameworkX internet framework
X internet framework
 
Augmented Reality Smartglasses 2016 trends and challenges
Augmented Reality Smartglasses 2016 trends and challengesAugmented Reality Smartglasses 2016 trends and challenges
Augmented Reality Smartglasses 2016 trends and challenges
 
[243]kaleido 노현걸
[243]kaleido 노현걸[243]kaleido 노현걸
[243]kaleido 노현걸
 
[@IndeedEng] Imhotep Workshop
[@IndeedEng] Imhotep Workshop[@IndeedEng] Imhotep Workshop
[@IndeedEng] Imhotep Workshop
 
分散システム処理モデルの課題および展望#yjdsw3
分散システム処理モデルの課題および展望#yjdsw3分散システム処理モデルの課題および展望#yjdsw3
分散システム処理モデルの課題および展望#yjdsw3
 
Presentacion
PresentacionPresentacion
Presentacion
 
ELECTRONIC TATTOO
ELECTRONIC TATTOOELECTRONIC TATTOO
ELECTRONIC TATTOO
 
Lenguaje Silencioso Del Mexicano Rc
Lenguaje Silencioso Del Mexicano RcLenguaje Silencioso Del Mexicano Rc
Lenguaje Silencioso Del Mexicano Rc
 

Último

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Último (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

LSM Trees

  • 2. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com PAGE© Pythian Cassandra ● Senior Engineer at Pythian (recently acquired Blackbird) o Lead of Cassandra practice ● Experience o Worked with Cassandra since 0.8 (2011) o Java/Python developer About Me Chris Lohfink 1
  • 3. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com PAGE© Pythian Cassandra • Fault tolerance • Multiple DCs • Large data sets • Data model gotchas • Unstable releases • Bootstrapping • Repairs • Unit tests - My Opinions - 2 Cassandra
  • 4. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com PAGE© Pythian Cassandra ● Can be good, bad, or ugly ● Same as with everything else Where is Performance? 3
  • 5. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com PAGE© Pythian Cassandra Lies, Dirty Lies, & Benchmarks 4
  • 6. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com PAGE© Pythian Cassandra 5
  • 7. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com PAGE© Pythian Cassandra 6
  • 8. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com PAGE© Pythian Cassandra ● An LSM-tree is composed of two or more tree-like components, each optimized for their type of storage o A small in-memory tree o One or more on disk trees ● Used in Cassandra, HBase, LevelDB, Google Big Table, SQLite4 & more Log Structured Merge Tree LSM-Tree 7
  • 9. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com PAGE© Pythian Cassandra Log Structured Merge Tree One tree in memory, one or more on disk Memory Disk ReadsWrites 8
  • 10. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com PAGE© Pythian Cassandra Log Structured Merge Tree Match Cassandra nomenclature Memtable SSTable ReadsWrites 9
  • 11. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com PAGE© Pythian Cassandra • Very Fast Writes – Cost of IO amortized across large batches – Append only • Comparable Reads – Comparable best-case – Potential for very slow Log Structured Merge Tree 10 Characteristics
  • 12. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com Pythian PAGE© Pythian© Pythian Cassandra Write Path Represent numbers of shovels in stock Memtable SSTables Temp -20 Shovels 0 State MN 11
  • 13. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com Pythian PAGE© Pythian© Pythian Cassandra Write Path Decide we need to include humidity Memtable SSTables Temp -20 Shovels 0 State MN Humidity 10 12
  • 14. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com Pythian PAGE© Pythian© Pythian Cassandra Write Path Its Minnesota so the Temperature changed Memtable SSTables Temp -20 Shovels 0 State MN Humidity 10 Temp 80 13
  • 15. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com Pythian PAGE© Pythian© Pythian Cassandra Write Path Shovel demand drops so its time to put some in stock again Memtable SSTables Temp -20 Shovels 0 State MN Humidity 10 Temp 80 Shovels 25 14
  • 16. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com Pythian PAGE© Pythian© Pythian Cassandra Write Path Reached memtable limit, flush to disk Memtable SSTables Temp -20 Shovels 0 State MN Humidity 10 Temp 80 Shovels 25 Humidity 10 Temp 80 Shovels 25 15
  • 17. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com Pythian PAGE© Pythian© Pythian Cassandra Write Path We still in Minnesota and its been a few days so adjust Temp Memtable SSTables Temp -20 Shovels 0 State MN Humidity 10 Temp 80 Shovels 25 Temp 10 16
  • 18. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com Pythian PAGE© Pythian© Pythian Cassandra Read Path Check the current temp, take most recent from all SSTables and the Memtable Memtable SSTables Temp -20 Shovels 0 State MN Humidity 10 Temp 80 Shovels 25 Temp 10 17
  • 19. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com Pythian PAGE© Pythian© Pythian Cassandra Compaction Create new SSTable thats the merged result Memtable SSTables Temp -20 Shovels 0 State MN Humidity 10 Temp 80 Shovels 25 Temp 10 Humidity 10 Shovels 25 Temp 80 State MN 18
  • 20. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com Pythian PAGE© Pythian© Pythian Cassandra Compaction Delete old SSTables Memtable SSTables Temp 10 Humidity 10 Shovels 25 Temp 80 State MN 19
  • 21. www.pythian.com twitter: cnlohfink | e-mail: clohfink@blackbirdit.com Pythian PAGE© Pythian© Pythian Cassandra Questions? 20

Notas del editor

  1. Attention! Before you open this template be sure what you have the following fonts installed: Novecento Sans wide font family (6 free styles) http://typography.synthview.com Abattis Cantarell http://www.fontsquirrel.com/fonts/cantarell Icon Sets Fonts: raphaelicons-webfont.ttf from this page: http://icons.marekventur.de iconic_stroke.ttf from this page: http://somerandomdude.com/work/open-iconic modernpics.otf from this page: http://www.fontsquirrel.com/fonts/modern-pictograms general_foundicons.ttf, social_foundicons.ttf from this page: http://www.zurb.com/playground/foundation-icons accessibility_foundicons_new.ttf fixed for PowerPoint Mac from here: http://docs.google.com/open?id=0Byf3seS60YFLR3VJN3dMbGp0UDA fontawesome-webfont.ttf from this page: http://fortawesome.github.io/Font-Awesome Entypo.otf from this page: http://www.fontsquirrel.com/fonts/entypo sosa-regular-webfont.ttf from this page: http://tenbytwenty.com/?xxxx_posts=sosa All fonts are permitted free use in commercial projects. If you have difficulties to install those fonts or have no time to find all of them, please follow the FAQs: http://graphicriver.net/item/six-template/3626243/support