SlideShare a Scribd company logo
Manage your compactions before they manage you!
About Pythian
18 Years of Data
infrastructure
•management consulting
•200+ Top brands
•6000+ databases under
•management
•Over 300 DBA’s, in 29
countries
•Top 5% of DBA work force, 9
•Oracle ACE’s, 2 Microsoft
MVP’ 2© 2015. All Rights Reserved.
About Me
•Cassandra Consultant
–First contact was 0.8
•Cassandra MVP & Datastax
Certified Architect
•Lisbon Cassandra Meetup
•Passion for distributed
systems
•Loves a good challenge
•Waterpolo is my sport
•@cjrolo
3© 2015. All Rights Reserved.
1 Why Compact
2 Compaction strategies and tuning
3 General tuning
4 Take aways, compacted
5 Q&A
4© 2015. All Rights Reserved.
Compaction Impact
•High I/O usage
•Temporary increase on disk space
•High CPU usage
•Increase latency on operations!
5© 2015. All Rights Reserved.
Commonly heard
•"My system is compacting 100% of the time"
•"All disk I/O is used by compaction"
•"Compaction is far behind"
•"Hundreds or thousands of SSTables!"
6© 2015. All Rights Reserved.
•Quick recap on the write path
–Commitlog -> Memtable -> SSTable
–SSTables are immutable
Why do we compact?
7© 2015. All Rights Reserved.
•Tombstones
•Row duplicates
•Rows spread across multiple SSTables
•Consolidation of data is imperative
Why do we compact? (2)
8© 2015. All Rights Reserved.
Size-tiered compaction
•The original compaction type!
•"This strategy triggers a minor compaction when there are a
number of similar sized SSTables on disk as configured by the
table subproperty, min_threshold. A minor compaction does not
involve all the tables in a keyspace"
•When to use: write once data, write heavy scenarios, limited I/O
available
9© 2015. All Rights Reserved.
Tuning size-tiered
•CQL Properties:
–bucket_high
–bucket_low
–cold_reads_to_omit
–max_threshold
–min_threshold
–min_sstable_size
10© 2015. All Rights Reserved.
Levelled compaction
•Strategy appeared in Cassandra 1.0.
•"The leveled compaction strategy creates SSTables of a fixed,
relatively small size (160 MB by default) that are grouped into
levels. Within each level, SSTables are guaranteed to be non-
overlapping. Each level (L0, L1, L2 and so on) is 10 times as large
as the previous."
•When to use: Random reads, Reads that are latency sensitive,
highly updated rows
11© 2015. All Rights Reserved.
Tuning levelled compaction
12© 2015. All Rights Reserved.
•CQL Properties:
–sstable_size_in_mb
Time-series compaction
13© 2015. All Rights Reserved.
•Available since Cassandra 2.0.11, 2.1.1
•"DateTieredCompactionStrategy stores data written within a
certain period of time in the same SSTable"
•When to use? Time series data!
•Time-Series Tuning
14© 2015. All Rights Reserved.
•CQL Properties:
–base_time_seconds
–max_sstable_age_days
–max_threshold
–min_threshold
–timestamp_resolution
DTCS Quirks...
•Out-of-order data
–Hints
–Clients not in sync
–Repairs
–Someone inserted out-of-order data...
15© 2015. All Rights Reserved.
Monitoring Compaction
•CFStats
•Nodetool Compactionstats
•CompactionManagerMBean:
–CompletedTasks: Number of completed compactions since the last start of this Cassandra
instance
–PendingTasks: Number of estimated tasks remaining to perform
–ColumnFamilyInProgress: The table currently being compacted.
–BytesTotalInProgress: Total number of data bytes (index and filter are not included) being
compacted.
–BytesCompacted: The progress of the current compaction.
•Strace
•iotop
16© 2015. All Rights Reserved.
Disk Tuning
•Compaction means large I/O
•Big RAID stripes
•SSDs!!
•Dedicated non-striped disks
•No SAN/NAS
•I/O scheduler can have some impact
•Some linux settings can be used for emergencies.
17© 2015. All Rights Reserved.
Take Aways, compacted
•What did we learn here...
–Selecting the proper compaction strategy can improve your cluster
performance
•Doing the opposite can create serious issues...
–Monitor your compactions!
–You can try compactions strategies out without changing your tables!
18© 2015. All Rights Reserved.
Q&A
•Thanks for listening!
•Questions?
19© 2015. All Rights Reserved.
Thank you

More Related Content

What's hot

JBCNConf 2017 - Building microservices with Vert.x
JBCNConf 2017 - Building microservices with Vert.xJBCNConf 2017 - Building microservices with Vert.x
JBCNConf 2017 - Building microservices with Vert.x
Bert Jan Schrijver
 
Logmatic at ElasticSearch November Paris meetup
Logmatic at ElasticSearch November Paris meetupLogmatic at ElasticSearch November Paris meetup
Logmatic at ElasticSearch November Paris meetup
logmatic.io
 
GeekOut 2017 - Microservices in action at the Dutch National Police
GeekOut 2017 -  Microservices in action at the Dutch National PoliceGeekOut 2017 -  Microservices in action at the Dutch National Police
GeekOut 2017 - Microservices in action at the Dutch National Police
Bert Jan Schrijver
 
NSA - No thanks - Build your own cloud with OpenStack and Cloud Foundry | any...
NSA - No thanks - Build your own cloud with OpenStack and Cloud Foundry | any...NSA - No thanks - Build your own cloud with OpenStack and Cloud Foundry | any...
NSA - No thanks - Build your own cloud with OpenStack and Cloud Foundry | any...
anynines GmbH
 
HPE & Cloud Foundry @ CF Summit Berlin 2015
HPE & Cloud Foundry @ CF Summit Berlin 2015HPE & Cloud Foundry @ CF Summit Berlin 2015
HPE & Cloud Foundry @ CF Summit Berlin 2015
Omri Gazitt
 
Fast SAP system provisioning based on CloudStack
Fast SAP system provisioning based on CloudStack Fast SAP system provisioning based on CloudStack
Fast SAP system provisioning based on CloudStack
ShapeBlue
 
Managing Multi-hypervisor OpenStack Cloud with Single Virtual Network
Managing Multi-hypervisor OpenStack Cloud with Single Virtual NetworkManaging Multi-hypervisor OpenStack Cloud with Single Virtual Network
Managing Multi-hypervisor OpenStack Cloud with Single Virtual Network
PLUMgrid
 
CloudStack EU user group - fast SAP provisioning
CloudStack EU user group - fast SAP provisioningCloudStack EU user group - fast SAP provisioning
CloudStack EU user group - fast SAP provisioning
ShapeBlue
 
Malmberg meetup June 2018 - Building microservices with Vert.x
Malmberg meetup June 2018 - Building microservices with Vert.xMalmberg meetup June 2018 - Building microservices with Vert.x
Malmberg meetup June 2018 - Building microservices with Vert.x
Bert Jan Schrijver
 
Intro to OpenStack - Scott Sanchez and Niki Acosta
Intro to OpenStack - Scott Sanchez and Niki AcostaIntro to OpenStack - Scott Sanchez and Niki Acosta
Intro to OpenStack - Scott Sanchez and Niki Acosta
Scott Sanchez
 
SaltStack - An open source software story
SaltStack - An open source software storySaltStack - An open source software story
SaltStack - An open source software story
SaltStack
 
Microservices with Spring Cloud, Netflix OSS and Kubernetes
Microservices with Spring Cloud, Netflix OSS and Kubernetes Microservices with Spring Cloud, Netflix OSS and Kubernetes
Microservices with Spring Cloud, Netflix OSS and Kubernetes
Christian Posta
 
Introduction to Apache Cassandra
Introduction to Apache CassandraIntroduction to Apache Cassandra
Introduction to Apache Cassandra
Instaclustr
 
Dublin JUG February 2018 - Building microservices with Vert.x
Dublin JUG February 2018 - Building microservices with Vert.xDublin JUG February 2018 - Building microservices with Vert.x
Dublin JUG February 2018 - Building microservices with Vert.x
Bert Jan Schrijver
 
Vert.x NL meetup October 2017 - Building microservices with Vert.x
Vert.x NL meetup October 2017 - Building microservices with Vert.xVert.x NL meetup October 2017 - Building microservices with Vert.x
Vert.x NL meetup October 2017 - Building microservices with Vert.x
Bert Jan Schrijver
 
Scale the Cloud - Skaluj chmurę
Scale the Cloud - Skaluj chmurę Scale the Cloud - Skaluj chmurę
Scale the Cloud - Skaluj chmurę
Kainos Polska
 
Microservices Journey Fall 2017
Microservices Journey Fall 2017Microservices Journey Fall 2017
Microservices Journey Fall 2017
Christian Posta
 
OPEN'17_2_Customer Experience_Essent
OPEN'17_2_Customer Experience_EssentOPEN'17_2_Customer Experience_Essent
OPEN'17_2_Customer Experience_Essent
Kangaroot
 
VJUG 24 - Building microservices with Vert.x
VJUG 24 - Building microservices with Vert.xVJUG 24 - Building microservices with Vert.x
VJUG 24 - Building microservices with Vert.x
Bert Jan Schrijver
 
AWS Big Data in everyday use at Yle
AWS Big Data in everyday use at YleAWS Big Data in everyday use at Yle
AWS Big Data in everyday use at Yle
Rolf Koski
 

What's hot (20)

JBCNConf 2017 - Building microservices with Vert.x
JBCNConf 2017 - Building microservices with Vert.xJBCNConf 2017 - Building microservices with Vert.x
JBCNConf 2017 - Building microservices with Vert.x
 
Logmatic at ElasticSearch November Paris meetup
Logmatic at ElasticSearch November Paris meetupLogmatic at ElasticSearch November Paris meetup
Logmatic at ElasticSearch November Paris meetup
 
GeekOut 2017 - Microservices in action at the Dutch National Police
GeekOut 2017 -  Microservices in action at the Dutch National PoliceGeekOut 2017 -  Microservices in action at the Dutch National Police
GeekOut 2017 - Microservices in action at the Dutch National Police
 
NSA - No thanks - Build your own cloud with OpenStack and Cloud Foundry | any...
NSA - No thanks - Build your own cloud with OpenStack and Cloud Foundry | any...NSA - No thanks - Build your own cloud with OpenStack and Cloud Foundry | any...
NSA - No thanks - Build your own cloud with OpenStack and Cloud Foundry | any...
 
HPE & Cloud Foundry @ CF Summit Berlin 2015
HPE & Cloud Foundry @ CF Summit Berlin 2015HPE & Cloud Foundry @ CF Summit Berlin 2015
HPE & Cloud Foundry @ CF Summit Berlin 2015
 
Fast SAP system provisioning based on CloudStack
Fast SAP system provisioning based on CloudStack Fast SAP system provisioning based on CloudStack
Fast SAP system provisioning based on CloudStack
 
Managing Multi-hypervisor OpenStack Cloud with Single Virtual Network
Managing Multi-hypervisor OpenStack Cloud with Single Virtual NetworkManaging Multi-hypervisor OpenStack Cloud with Single Virtual Network
Managing Multi-hypervisor OpenStack Cloud with Single Virtual Network
 
CloudStack EU user group - fast SAP provisioning
CloudStack EU user group - fast SAP provisioningCloudStack EU user group - fast SAP provisioning
CloudStack EU user group - fast SAP provisioning
 
Malmberg meetup June 2018 - Building microservices with Vert.x
Malmberg meetup June 2018 - Building microservices with Vert.xMalmberg meetup June 2018 - Building microservices with Vert.x
Malmberg meetup June 2018 - Building microservices with Vert.x
 
Intro to OpenStack - Scott Sanchez and Niki Acosta
Intro to OpenStack - Scott Sanchez and Niki AcostaIntro to OpenStack - Scott Sanchez and Niki Acosta
Intro to OpenStack - Scott Sanchez and Niki Acosta
 
SaltStack - An open source software story
SaltStack - An open source software storySaltStack - An open source software story
SaltStack - An open source software story
 
Microservices with Spring Cloud, Netflix OSS and Kubernetes
Microservices with Spring Cloud, Netflix OSS and Kubernetes Microservices with Spring Cloud, Netflix OSS and Kubernetes
Microservices with Spring Cloud, Netflix OSS and Kubernetes
 
Introduction to Apache Cassandra
Introduction to Apache CassandraIntroduction to Apache Cassandra
Introduction to Apache Cassandra
 
Dublin JUG February 2018 - Building microservices with Vert.x
Dublin JUG February 2018 - Building microservices with Vert.xDublin JUG February 2018 - Building microservices with Vert.x
Dublin JUG February 2018 - Building microservices with Vert.x
 
Vert.x NL meetup October 2017 - Building microservices with Vert.x
Vert.x NL meetup October 2017 - Building microservices with Vert.xVert.x NL meetup October 2017 - Building microservices with Vert.x
Vert.x NL meetup October 2017 - Building microservices with Vert.x
 
Scale the Cloud - Skaluj chmurę
Scale the Cloud - Skaluj chmurę Scale the Cloud - Skaluj chmurę
Scale the Cloud - Skaluj chmurę
 
Microservices Journey Fall 2017
Microservices Journey Fall 2017Microservices Journey Fall 2017
Microservices Journey Fall 2017
 
OPEN'17_2_Customer Experience_Essent
OPEN'17_2_Customer Experience_EssentOPEN'17_2_Customer Experience_Essent
OPEN'17_2_Customer Experience_Essent
 
VJUG 24 - Building microservices with Vert.x
VJUG 24 - Building microservices with Vert.xVJUG 24 - Building microservices with Vert.x
VJUG 24 - Building microservices with Vert.x
 
AWS Big Data in everyday use at Yle
AWS Big Data in everyday use at YleAWS Big Data in everyday use at Yle
AWS Big Data in everyday use at Yle
 

Viewers also liked

Counters At Scale - A Cautionary Tale
Counters At Scale - A Cautionary TaleCounters At Scale - A Cautionary Tale
Counters At Scale - A Cautionary Tale
Eric Lubow
 
Cassandra from tarball to production
Cassandra   from tarball to productionCassandra   from tarball to production
Cassandra from tarball to production
Ron Kuris
 
Cassandra SF 2015 - Repeatable, Scalable, Reliable, Observable Cassandra
Cassandra SF 2015 - Repeatable, Scalable, Reliable, Observable CassandraCassandra SF 2015 - Repeatable, Scalable, Reliable, Observable Cassandra
Cassandra SF 2015 - Repeatable, Scalable, Reliable, Observable Cassandra
aaronmorton
 
A deep look at the cql where clause
A deep look at the cql where clauseA deep look at the cql where clause
A deep look at the cql where clause
Benjamin Lerer
 
Hardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoiaHardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoia
zznate
 
Devoxx France: Fault tolerant microservices on the JVM with Cassandra
Devoxx France: Fault tolerant microservices on the JVM with CassandraDevoxx France: Fault tolerant microservices on the JVM with Cassandra
Devoxx France: Fault tolerant microservices on the JVM with Cassandra
Christopher Batey
 
Case Study: Troubleshooting Cassandra performance issues as a developer
Case Study: Troubleshooting Cassandra performance issues as a developerCase Study: Troubleshooting Cassandra performance issues as a developer
Case Study: Troubleshooting Cassandra performance issues as a developer
Carlos Alonso Pérez
 
The DAP - Where YARN, HBase, Kafka and Spark go to Production
The DAP - Where YARN, HBase, Kafka and Spark go to ProductionThe DAP - Where YARN, HBase, Kafka and Spark go to Production
The DAP - Where YARN, HBase, Kafka and Spark go to Production
DataWorks Summit/Hadoop Summit
 
Tombstones and Compaction
Tombstones and CompactionTombstones and Compaction
Tombstones and Compaction
DataStax Academy
 
Cassandra Summit 2015: Real World DTCS For Operators
Cassandra Summit 2015: Real World DTCS For OperatorsCassandra Summit 2015: Real World DTCS For Operators
Cassandra Summit 2015: Real World DTCS For Operators
Jeff Jirsa
 
Indexing in Cassandra
Indexing in CassandraIndexing in Cassandra
Indexing in Cassandra
Ed Anuff
 

Viewers also liked (11)

Counters At Scale - A Cautionary Tale
Counters At Scale - A Cautionary TaleCounters At Scale - A Cautionary Tale
Counters At Scale - A Cautionary Tale
 
Cassandra from tarball to production
Cassandra   from tarball to productionCassandra   from tarball to production
Cassandra from tarball to production
 
Cassandra SF 2015 - Repeatable, Scalable, Reliable, Observable Cassandra
Cassandra SF 2015 - Repeatable, Scalable, Reliable, Observable CassandraCassandra SF 2015 - Repeatable, Scalable, Reliable, Observable Cassandra
Cassandra SF 2015 - Repeatable, Scalable, Reliable, Observable Cassandra
 
A deep look at the cql where clause
A deep look at the cql where clauseA deep look at the cql where clause
A deep look at the cql where clause
 
Hardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoiaHardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoia
 
Devoxx France: Fault tolerant microservices on the JVM with Cassandra
Devoxx France: Fault tolerant microservices on the JVM with CassandraDevoxx France: Fault tolerant microservices on the JVM with Cassandra
Devoxx France: Fault tolerant microservices on the JVM with Cassandra
 
Case Study: Troubleshooting Cassandra performance issues as a developer
Case Study: Troubleshooting Cassandra performance issues as a developerCase Study: Troubleshooting Cassandra performance issues as a developer
Case Study: Troubleshooting Cassandra performance issues as a developer
 
The DAP - Where YARN, HBase, Kafka and Spark go to Production
The DAP - Where YARN, HBase, Kafka and Spark go to ProductionThe DAP - Where YARN, HBase, Kafka and Spark go to Production
The DAP - Where YARN, HBase, Kafka and Spark go to Production
 
Tombstones and Compaction
Tombstones and CompactionTombstones and Compaction
Tombstones and Compaction
 
Cassandra Summit 2015: Real World DTCS For Operators
Cassandra Summit 2015: Real World DTCS For OperatorsCassandra Summit 2015: Real World DTCS For Operators
Cassandra Summit 2015: Real World DTCS For Operators
 
Indexing in Cassandra
Indexing in CassandraIndexing in Cassandra
Indexing in Cassandra
 

Similar to Manage your compactions before they manage you!

CrowdStrike: Real World DTCS For Operators
CrowdStrike: Real World DTCS For OperatorsCrowdStrike: Real World DTCS For Operators
CrowdStrike: Real World DTCS For Operators
DataStax Academy
 
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast DataDatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
Hakka Labs
 
Infinispan, transactional key value data grid and nosql database
Infinispan, transactional key value data grid and nosql databaseInfinispan, transactional key value data grid and nosql database
Infinispan, transactional key value data grid and nosql database
Alexander Petrov
 
Solving Office 365 Big Challenges using Cassandra + Spark
Solving Office 365 Big Challenges using Cassandra + Spark Solving Office 365 Big Challenges using Cassandra + Spark
Solving Office 365 Big Challenges using Cassandra + Spark
Anubhav Kale
 
Kb 40 kevin_klineukug_reading20070717[1]
Kb 40 kevin_klineukug_reading20070717[1]Kb 40 kevin_klineukug_reading20070717[1]
Kb 40 kevin_klineukug_reading20070717[1]
shuwutong
 
M6d cassandrapresentation
M6d cassandrapresentationM6d cassandrapresentation
M6d cassandrapresentation
Edward Capriolo
 
Timesten Architecture
Timesten ArchitectureTimesten Architecture
Timesten Architecture
SrirakshaSrinivasan2
 
Deploying ssd in the data center 2014
Deploying ssd in the data center 2014Deploying ssd in the data center 2014
Deploying ssd in the data center 2014
Howard Marks
 
Kudu: Fast Analytics on Fast Data
Kudu: Fast Analytics on Fast DataKudu: Fast Analytics on Fast Data
Kudu: Fast Analytics on Fast Data
michaelguia
 
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance TuningWebinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Severalnines
 
Kudu austin oct 2015.pptx
Kudu austin oct 2015.pptxKudu austin oct 2015.pptx
Kudu austin oct 2015.pptx
Felicia Haggarty
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
smallerror
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
xlight
 
Fixing twitter
Fixing twitterFixing twitter
Fixing twitter
Roger Xia
 
Fixing_Twitter
Fixing_TwitterFixing_Twitter
Fixing_Twitter
liujianrong
 
Oracle DB In-Memory technologie v kombinaci s procesorem M7
Oracle DB In-Memory technologie v kombinaci s procesorem M7Oracle DB In-Memory technologie v kombinaci s procesorem M7
Oracle DB In-Memory technologie v kombinaci s procesorem M7
MarketingArrowECS_CZ
 
MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014
Ryusuke Kajiyama
 
NGENSTOR_ODA_P2V_V5
NGENSTOR_ODA_P2V_V5NGENSTOR_ODA_P2V_V5
NGENSTOR_ODA_P2V_V5
UniFabric
 
Exadata architecture and internals presentation
Exadata architecture and internals presentationExadata architecture and internals presentation
Exadata architecture and internals presentation
Sanjoy Dasgupta
 
(ATS6-PLAT06) Maximizing AEP Performance
(ATS6-PLAT06) Maximizing AEP Performance(ATS6-PLAT06) Maximizing AEP Performance
(ATS6-PLAT06) Maximizing AEP Performance
BIOVIA
 

Similar to Manage your compactions before they manage you! (20)

CrowdStrike: Real World DTCS For Operators
CrowdStrike: Real World DTCS For OperatorsCrowdStrike: Real World DTCS For Operators
CrowdStrike: Real World DTCS For Operators
 
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast DataDatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
 
Infinispan, transactional key value data grid and nosql database
Infinispan, transactional key value data grid and nosql databaseInfinispan, transactional key value data grid and nosql database
Infinispan, transactional key value data grid and nosql database
 
Solving Office 365 Big Challenges using Cassandra + Spark
Solving Office 365 Big Challenges using Cassandra + Spark Solving Office 365 Big Challenges using Cassandra + Spark
Solving Office 365 Big Challenges using Cassandra + Spark
 
Kb 40 kevin_klineukug_reading20070717[1]
Kb 40 kevin_klineukug_reading20070717[1]Kb 40 kevin_klineukug_reading20070717[1]
Kb 40 kevin_klineukug_reading20070717[1]
 
M6d cassandrapresentation
M6d cassandrapresentationM6d cassandrapresentation
M6d cassandrapresentation
 
Timesten Architecture
Timesten ArchitectureTimesten Architecture
Timesten Architecture
 
Deploying ssd in the data center 2014
Deploying ssd in the data center 2014Deploying ssd in the data center 2014
Deploying ssd in the data center 2014
 
Kudu: Fast Analytics on Fast Data
Kudu: Fast Analytics on Fast DataKudu: Fast Analytics on Fast Data
Kudu: Fast Analytics on Fast Data
 
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance TuningWebinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
 
Kudu austin oct 2015.pptx
Kudu austin oct 2015.pptxKudu austin oct 2015.pptx
Kudu austin oct 2015.pptx
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
 
Fixing twitter
Fixing twitterFixing twitter
Fixing twitter
 
Fixing_Twitter
Fixing_TwitterFixing_Twitter
Fixing_Twitter
 
Oracle DB In-Memory technologie v kombinaci s procesorem M7
Oracle DB In-Memory technologie v kombinaci s procesorem M7Oracle DB In-Memory technologie v kombinaci s procesorem M7
Oracle DB In-Memory technologie v kombinaci s procesorem M7
 
MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014
 
NGENSTOR_ODA_P2V_V5
NGENSTOR_ODA_P2V_V5NGENSTOR_ODA_P2V_V5
NGENSTOR_ODA_P2V_V5
 
Exadata architecture and internals presentation
Exadata architecture and internals presentationExadata architecture and internals presentation
Exadata architecture and internals presentation
 
(ATS6-PLAT06) Maximizing AEP Performance
(ATS6-PLAT06) Maximizing AEP Performance(ATS6-PLAT06) Maximizing AEP Performance
(ATS6-PLAT06) Maximizing AEP Performance
 

Recently uploaded

Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
aymanquadri279
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Yara Milbes
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 

Recently uploaded (20)

Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 

Manage your compactions before they manage you!

  • 1. Manage your compactions before they manage you!
  • 2. About Pythian 18 Years of Data infrastructure •management consulting •200+ Top brands •6000+ databases under •management •Over 300 DBA’s, in 29 countries •Top 5% of DBA work force, 9 •Oracle ACE’s, 2 Microsoft MVP’ 2© 2015. All Rights Reserved.
  • 3. About Me •Cassandra Consultant –First contact was 0.8 •Cassandra MVP & Datastax Certified Architect •Lisbon Cassandra Meetup •Passion for distributed systems •Loves a good challenge •Waterpolo is my sport •@cjrolo 3© 2015. All Rights Reserved.
  • 4. 1 Why Compact 2 Compaction strategies and tuning 3 General tuning 4 Take aways, compacted 5 Q&A 4© 2015. All Rights Reserved.
  • 5. Compaction Impact •High I/O usage •Temporary increase on disk space •High CPU usage •Increase latency on operations! 5© 2015. All Rights Reserved.
  • 6. Commonly heard •"My system is compacting 100% of the time" •"All disk I/O is used by compaction" •"Compaction is far behind" •"Hundreds or thousands of SSTables!" 6© 2015. All Rights Reserved.
  • 7. •Quick recap on the write path –Commitlog -> Memtable -> SSTable –SSTables are immutable Why do we compact? 7© 2015. All Rights Reserved.
  • 8. •Tombstones •Row duplicates •Rows spread across multiple SSTables •Consolidation of data is imperative Why do we compact? (2) 8© 2015. All Rights Reserved.
  • 9. Size-tiered compaction •The original compaction type! •"This strategy triggers a minor compaction when there are a number of similar sized SSTables on disk as configured by the table subproperty, min_threshold. A minor compaction does not involve all the tables in a keyspace" •When to use: write once data, write heavy scenarios, limited I/O available 9© 2015. All Rights Reserved.
  • 11. Levelled compaction •Strategy appeared in Cassandra 1.0. •"The leveled compaction strategy creates SSTables of a fixed, relatively small size (160 MB by default) that are grouped into levels. Within each level, SSTables are guaranteed to be non- overlapping. Each level (L0, L1, L2 and so on) is 10 times as large as the previous." •When to use: Random reads, Reads that are latency sensitive, highly updated rows 11© 2015. All Rights Reserved.
  • 12. Tuning levelled compaction 12© 2015. All Rights Reserved. •CQL Properties: –sstable_size_in_mb
  • 13. Time-series compaction 13© 2015. All Rights Reserved. •Available since Cassandra 2.0.11, 2.1.1 •"DateTieredCompactionStrategy stores data written within a certain period of time in the same SSTable" •When to use? Time series data!
  • 14. •Time-Series Tuning 14© 2015. All Rights Reserved. •CQL Properties: –base_time_seconds –max_sstable_age_days –max_threshold –min_threshold –timestamp_resolution
  • 15. DTCS Quirks... •Out-of-order data –Hints –Clients not in sync –Repairs –Someone inserted out-of-order data... 15© 2015. All Rights Reserved.
  • 16. Monitoring Compaction •CFStats •Nodetool Compactionstats •CompactionManagerMBean: –CompletedTasks: Number of completed compactions since the last start of this Cassandra instance –PendingTasks: Number of estimated tasks remaining to perform –ColumnFamilyInProgress: The table currently being compacted. –BytesTotalInProgress: Total number of data bytes (index and filter are not included) being compacted. –BytesCompacted: The progress of the current compaction. •Strace •iotop 16© 2015. All Rights Reserved.
  • 17. Disk Tuning •Compaction means large I/O •Big RAID stripes •SSDs!! •Dedicated non-striped disks •No SAN/NAS •I/O scheduler can have some impact •Some linux settings can be used for emergencies. 17© 2015. All Rights Reserved.
  • 18. Take Aways, compacted •What did we learn here... –Selecting the proper compaction strategy can improve your cluster performance •Doing the opposite can create serious issues... –Monitor your compactions! –You can try compactions strategies out without changing your tables! 18© 2015. All Rights Reserved.

Editor's Notes

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20