SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Deep Dive into Apache Kafka
Deep Dive into Apache KafkaDeep Dive into Apache Kafka
Deep Dive into Apache Kafkaconfluent
 
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookTech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookThe Hive
 
Introduction to Kafka Cruise Control
Introduction to Kafka Cruise ControlIntroduction to Kafka Cruise Control
Introduction to Kafka Cruise ControlJiangjie Qin
 
Troubleshooting redis
Troubleshooting redisTroubleshooting redis
Troubleshooting redisDaeMyung Kang
 
Percona Xtrabackup Best Practices
Percona Xtrabackup Best PracticesPercona Xtrabackup Best Practices
Percona Xtrabackup Best PracticesMarcelo Altmann
 
HBase and HDFS: Understanding FileSystem Usage in HBase
HBase and HDFS: Understanding FileSystem Usage in HBaseHBase and HDFS: Understanding FileSystem Usage in HBase
HBase and HDFS: Understanding FileSystem Usage in HBaseenissoz
 
Troubleshooting Kerberos in Hadoop: Taming the Beast
Troubleshooting Kerberos in Hadoop: Taming the BeastTroubleshooting Kerberos in Hadoop: Taming the Beast
Troubleshooting Kerberos in Hadoop: Taming the BeastDataWorks Summit
 
Kafka to the Maxka - (Kafka Performance Tuning)
Kafka to the Maxka - (Kafka Performance Tuning)Kafka to the Maxka - (Kafka Performance Tuning)
Kafka to the Maxka - (Kafka Performance Tuning)DataWorks Summit
 
Kafka High Availability in multi data center setup with floating Observers wi...
Kafka High Availability in multi data center setup with floating Observers wi...Kafka High Availability in multi data center setup with floating Observers wi...
Kafka High Availability in multi data center setup with floating Observers wi...HostedbyConfluent
 
Dynamic filtering for presto join optimisation
Dynamic filtering for presto join optimisationDynamic filtering for presto join optimisation
Dynamic filtering for presto join optimisationOri Reshef
 
Aerospike Hybrid Memory Architecture
Aerospike Hybrid Memory ArchitectureAerospike Hybrid Memory Architecture
Aerospike Hybrid Memory ArchitectureAerospike, Inc.
 
Filesystem Comparison: NFS vs GFS2 vs OCFS2
Filesystem Comparison: NFS vs GFS2 vs OCFS2Filesystem Comparison: NFS vs GFS2 vs OCFS2
Filesystem Comparison: NFS vs GFS2 vs OCFS2Giuseppe Paterno'
 
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 memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcachedJurriaan Persyn
 
HBaseCon 2015: HBase Performance Tuning @ Salesforce
HBaseCon 2015: HBase Performance Tuning @ SalesforceHBaseCon 2015: HBase Performance Tuning @ Salesforce
HBaseCon 2015: HBase Performance Tuning @ SalesforceHBaseCon
 
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a ServiceZeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a ServiceDatabricks
 

Tendances (20)

Deep Dive into Apache Kafka
Deep Dive into Apache KafkaDeep Dive into Apache Kafka
Deep Dive into Apache Kafka
 
Apache flink
Apache flinkApache flink
Apache flink
 
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookTech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
 
Introduction to Kafka Cruise Control
Introduction to Kafka Cruise ControlIntroduction to Kafka Cruise Control
Introduction to Kafka Cruise Control
 
HDFS Erasure Coding in Action
HDFS Erasure Coding in Action HDFS Erasure Coding in Action
HDFS Erasure Coding in Action
 
Troubleshooting redis
Troubleshooting redisTroubleshooting redis
Troubleshooting redis
 
Percona Xtrabackup Best Practices
Percona Xtrabackup Best PracticesPercona Xtrabackup Best Practices
Percona Xtrabackup Best Practices
 
Apache Spark Architecture
Apache Spark ArchitectureApache Spark Architecture
Apache Spark Architecture
 
HBase and HDFS: Understanding FileSystem Usage in HBase
HBase and HDFS: Understanding FileSystem Usage in HBaseHBase and HDFS: Understanding FileSystem Usage in HBase
HBase and HDFS: Understanding FileSystem Usage in HBase
 
Troubleshooting Kerberos in Hadoop: Taming the Beast
Troubleshooting Kerberos in Hadoop: Taming the BeastTroubleshooting Kerberos in Hadoop: Taming the Beast
Troubleshooting Kerberos in Hadoop: Taming the Beast
 
Kafka to the Maxka - (Kafka Performance Tuning)
Kafka to the Maxka - (Kafka Performance Tuning)Kafka to the Maxka - (Kafka Performance Tuning)
Kafka to the Maxka - (Kafka Performance Tuning)
 
Kafka High Availability in multi data center setup with floating Observers wi...
Kafka High Availability in multi data center setup with floating Observers wi...Kafka High Availability in multi data center setup with floating Observers wi...
Kafka High Availability in multi data center setup with floating Observers wi...
 
Dynamic filtering for presto join optimisation
Dynamic filtering for presto join optimisationDynamic filtering for presto join optimisation
Dynamic filtering for presto join optimisation
 
Aerospike Hybrid Memory Architecture
Aerospike Hybrid Memory ArchitectureAerospike Hybrid Memory Architecture
Aerospike Hybrid Memory Architecture
 
Filesystem Comparison: NFS vs GFS2 vs OCFS2
Filesystem Comparison: NFS vs GFS2 vs OCFS2Filesystem Comparison: NFS vs GFS2 vs OCFS2
Filesystem Comparison: NFS vs GFS2 vs OCFS2
 
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 memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcached
 
HBaseCon 2015: HBase Performance Tuning @ Salesforce
HBaseCon 2015: HBase Performance Tuning @ SalesforceHBaseCon 2015: HBase Performance Tuning @ Salesforce
HBaseCon 2015: HBase Performance Tuning @ Salesforce
 
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a ServiceZeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
 
Zoned Storage
Zoned StorageZoned Storage
Zoned Storage
 

En vedette

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
 

En vedette (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
 
MyRocks Deep Dive
MyRocks Deep DiveMyRocks Deep Dive
MyRocks Deep Dive
 
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
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Dernier (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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...
 
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)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
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...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

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

Notes de l'éditeur

  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