SlideShare a Scribd company logo
Operations & Tuning
Data Model First
Operations Can’t Fix a Bad Data Model
Sizing for Latency
CPU
Memory
Disk
Sizing for Latency
CPU
Buffer Cache
Disk
JVM
Sizing for Operations
(C * Nodes * Cores) / Replication Factor = Ops/Second
C is a hardware constant!
• 3000 AWS Non-SSD!
• 4000 Commodity SAS Hardware!
• 12000 Commodity SSD Hardware
Sizing for Latency
• 30-130 microseconds in memory!
• 100 microseconds to 12 milliseconds for SSD!
• 9 milliseconds to 60 milliseconds for mechanical disks
Shared Storage
DO NOT USE SHARED
STORAGE!!!!!
Disable Access Time
/dev/xvdb /data1 auto defaults,noatime,nodiratime 0 2
Warm The Buffer Cache
➜ ~ find /var/lib/cassandra -name '*.db' -exec cat {} > /dev/null ;
Disable NUMA Zone Reclaim
➜ ~ echo 0 > /proc/sys/vm/zone_reclaim_mode
Use SSD
25% more expensive!
10x Faster
Tuning SSD: Read Ahead
➜ ~ sudo blockdev --report 	
RO RA SSZ BSZ StartSec Size Device	
rw 256 512 4096 0 6442450944 /dev/xvda	
rw 256 512 4096 1920 6144000000 /dev/xvda1	
rw 8 512 4096 0 343568023552 /dev/xvdb	
rw 256 512 4096 0 343568023552 /dev/xvdc
➜ ~ sudo blockdev --setra 8 /dev/xvdb
Tuning SSD: Scheduler
➜ ~ echo 0 > /sys/block/xvdb/queue/rotational	
➜ ~ echo noop > /sys/block/xvdb/queue/scheduler
Compaction
Mechanical Disk = Size Tiered!
SSD = Leveled Compaction
TTL
TTL Compaction!
https://issues.apache.org/jira/browse/CASSANDRA-5228!
!
Default TTL!
https://issues.apache.org/jira/browse/CASSANDRA-3974
Cassandra Heap Settings
8G MAX_HEAP !
2G NEW_HEAP
Solr/Cassandra Heap Settings
14G MAX_HEAP !
2G NEW_HEAP
Hadoop/Cassandra Heap Settings
10G MAX_HEAP !
2G NEW_HEAP
Kernel
Modern Kernel = 30% performance boost
Monitoring
nodetool cfhistograms
Offset SSTables Write Latency Read Latency Row Size Column Count
1 3579 0 0 0 0
2 0 0 0 0 0
. . .
35 0 0 0 0 0
42 0 0 27 0 0
50 0 0 187 0 0
60 0 10 460 0 0
72 0 200 689 0 0
86 0 663 552 0 0
103 0 796 367 0 0
124 0 297 736 0 0
149 0 265 243 0 0
179 0 460 263 0 0
. . .
25109160 0 0 0 0 0
nodetool tpstats
Pool Name Active Pending Completed Blocked All time blocked
ReadStage 0 0 15 0 0
RequestResponseStage 0 0 0 0 0
MutationStage 0 0 3674 0 0
ReadRepairStage 0 0 0 0 0
ReplicateOnWriteStage 0 0 0 0 0
GossipStage 0 0 0 0 0
AntiEntropyStage 0 0 0 0 0
MigrationStage 0 0 0 0 0
MemoryMeter 0 0 1 0 0
MemtablePostFlusher 0 0 267 0 0
FlushWriter 0 0 9 0 1
MiscStage 0 0 0 0 0
commitlog_archiver 0 0 0 0 0
InternalResponseStage 0 0 0 0 0
HintedHandoff 0 0 0 0 0
!
Message type Dropped
RANGE_SLICE 0
READ_REPAIR 0
BINARY 0
READ 0
MUTATION 0
_TRACE 0
REQUEST_RESPONSE 0
Warning Signs
• Pending compactions > 15!
• Parnew collections > 1 second!
• CMS collections > 5 minutes!
• Disk utilization above 40% or 70%!
• CFHistograms write throughput > 150 μs!
• CFHistograms read throughput > 50 ms!
• Really large rows in CFHistograms!
• Anything blocked in TPStats
Tools

More Related Content

What's hot (19)

PDF
MySQL Tokudb engine benchmark
Louis liu
 
PPT
Replica Sets (NYC NoSQL Meetup)
MongoDB
 
PDF
Ceph_And_OpenStack_Red_Hat_Summit_2015_Boston_20150606
Diaa Radwan
 
PDF
ioDrive de benchmarking 2011 1209_zem_distribution
Masahito Zembutsu
 
PDF
Recent my sql_performance Test detail
Louis liu
 
PDF
MyAWR another mysql awr
Louis liu
 
PDF
My sql fabric ha and sharding solutions
Louis liu
 
PDF
Lacie Cloud Box data recovery with Linux
Jordi Clopés Esteban
 
PDF
MySQL Replication: Demo Réplica en Español
Keith Hollman
 
PPTX
XPDS16: Scope and Performance of Credit-2 Scheduler. - Anshul Makkar, Ctirix...
The Linux Foundation
 
PDF
Ask by linux kernel add or delete a hdd
Chanaka Lasantha
 
PDF
Glusterfs session #16 self-heal daemon ( for replication)
Pranith Karampuri
 
PDF
SSD based storage tuning for databases
Angelo Rajadurai
 
PDF
Oracle cluster installation with grid and nfs
Chanaka Lasantha
 
PDF
[ETHCon Korea 2019] Kim jiyun 김지윤
ethconkr
 
PDF
Multipath
Michal Sedlak
 
PPT
Java concurrency introduction
yangwm
 
DOCX
Orde2
Fransiska Puteri
 
MySQL Tokudb engine benchmark
Louis liu
 
Replica Sets (NYC NoSQL Meetup)
MongoDB
 
Ceph_And_OpenStack_Red_Hat_Summit_2015_Boston_20150606
Diaa Radwan
 
ioDrive de benchmarking 2011 1209_zem_distribution
Masahito Zembutsu
 
Recent my sql_performance Test detail
Louis liu
 
MyAWR another mysql awr
Louis liu
 
My sql fabric ha and sharding solutions
Louis liu
 
Lacie Cloud Box data recovery with Linux
Jordi Clopés Esteban
 
MySQL Replication: Demo Réplica en Español
Keith Hollman
 
XPDS16: Scope and Performance of Credit-2 Scheduler. - Anshul Makkar, Ctirix...
The Linux Foundation
 
Ask by linux kernel add or delete a hdd
Chanaka Lasantha
 
Glusterfs session #16 self-heal daemon ( for replication)
Pranith Karampuri
 
SSD based storage tuning for databases
Angelo Rajadurai
 
Oracle cluster installation with grid and nfs
Chanaka Lasantha
 
[ETHCon Korea 2019] Kim jiyun 김지윤
ethconkr
 
Multipath
Michal Sedlak
 
Java concurrency introduction
yangwm
 

Viewers also liked (10)

PDF
[Infographie] Comment ameliorer la qualité de vos données pour votre DMP mark...
Camp de Bases (Webedia Data Services)
 
PDF
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...
DataStax Academy
 
PPTX
Cassandra Instalacion y Utilizacion
Leandro Carrera
 
PPTX
What is a DMP
Sarah Jones
 
PPTX
Manual apache cassandra y comandos en la shell
Kevin López
 
PDF
Tombstones and Compaction
DataStax Academy
 
KEY
Cassandra Basics: Indexing
Benjamin Black
 
PDF
C* Summit 2013: How Not to Use Cassandra by Axel Liljencrantz
DataStax Academy
 
PDF
The DMP 101 - Data Management Platforms Explained
Eddy Widerker
 
PDF
Achieving High Load in Advertising Technology
Peter Milne
 
[Infographie] Comment ameliorer la qualité de vos données pour votre DMP mark...
Camp de Bases (Webedia Data Services)
 
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...
DataStax Academy
 
Cassandra Instalacion y Utilizacion
Leandro Carrera
 
What is a DMP
Sarah Jones
 
Manual apache cassandra y comandos en la shell
Kevin López
 
Tombstones and Compaction
DataStax Academy
 
Cassandra Basics: Indexing
Benjamin Black
 
C* Summit 2013: How Not to Use Cassandra by Axel Liljencrantz
DataStax Academy
 
The DMP 101 - Data Management Platforms Explained
Eddy Widerker
 
Achieving High Load in Advertising Technology
Peter Milne
 
Ad

Similar to Cassandra Day SV 2014: Basic Operations with Apache Cassandra (20)

PPTX
Super scaling singleton inserts
Chris Adkin
 
PDF
Performance tuning
Jon Haddad
 
PDF
A close encounter_with_real_world_and_odd_perf_issues
Riyaj Shamsudeen
 
PDF
Database performance tuning for SSD based storage
Angelo Rajadurai
 
PPTX
Leveraging memory in sql server
Chris Adkin
 
PDF
WiredTiger In-Memory vs WiredTiger B-Tree
Sveta Smirnova
 
KEY
Varnish @ Velocity Ignite
Artur Bergman
 
PPTX
Deploying ssd in the data center 2014
Howard Marks
 
PDF
ScyllaDB’s Monstrous Engineering Advances by Avi Kivity
ScyllaDB
 
PDF
Performance tweaks and tools for Linux (Joe Damato)
Ontico
 
PDF
DataStax: Extreme Cassandra Optimization: The Sequel
DataStax Academy
 
PDF
Kernel Recipes 2016 - Understanding a Real-Time System (more than just a kernel)
Anne Nicolas
 
PPTX
Percona Live UK 2014 Part III
Alkin Tezuysal
 
PPTX
Understanding DSE Search by Matt Stump
DataStax
 
PDF
Tools for Metaspace
Takahiro YAMADA
 
PDF
Debugging Ruby Systems
Engine Yard
 
PDF
PostgreSQL on Solaris
Theo Schlossnagle
 
ODP
Analysis of Compromised Linux Server
anandvaidya
 
PPTX
Sql server scalability fundamentals
Chris Adkin
 
PDF
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
Andrey Kudryavtsev
 
Super scaling singleton inserts
Chris Adkin
 
Performance tuning
Jon Haddad
 
A close encounter_with_real_world_and_odd_perf_issues
Riyaj Shamsudeen
 
Database performance tuning for SSD based storage
Angelo Rajadurai
 
Leveraging memory in sql server
Chris Adkin
 
WiredTiger In-Memory vs WiredTiger B-Tree
Sveta Smirnova
 
Varnish @ Velocity Ignite
Artur Bergman
 
Deploying ssd in the data center 2014
Howard Marks
 
ScyllaDB’s Monstrous Engineering Advances by Avi Kivity
ScyllaDB
 
Performance tweaks and tools for Linux (Joe Damato)
Ontico
 
DataStax: Extreme Cassandra Optimization: The Sequel
DataStax Academy
 
Kernel Recipes 2016 - Understanding a Real-Time System (more than just a kernel)
Anne Nicolas
 
Percona Live UK 2014 Part III
Alkin Tezuysal
 
Understanding DSE Search by Matt Stump
DataStax
 
Tools for Metaspace
Takahiro YAMADA
 
Debugging Ruby Systems
Engine Yard
 
PostgreSQL on Solaris
Theo Schlossnagle
 
Analysis of Compromised Linux Server
anandvaidya
 
Sql server scalability fundamentals
Chris Adkin
 
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
Andrey Kudryavtsev
 
Ad

More from DataStax Academy (20)

PDF
Forrester CXNYC 2017 - Delivering great real-time cx is a true craft
DataStax Academy
 
PPTX
Introduction to DataStax Enterprise Graph Database
DataStax Academy
 
PPTX
Introduction to DataStax Enterprise Advanced Replication with Apache Cassandra
DataStax Academy
 
PPTX
Cassandra on Docker @ Walmart Labs
DataStax Academy
 
PDF
Cassandra 3.0 Data Modeling
DataStax Academy
 
PPTX
Cassandra Adoption on Cisco UCS & Open stack
DataStax Academy
 
PDF
Data Modeling for Apache Cassandra
DataStax Academy
 
PDF
Coursera Cassandra Driver
DataStax Academy
 
PDF
Production Ready Cassandra
DataStax Academy
 
PDF
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
DataStax Academy
 
PPTX
Cassandra @ Sony: The good, the bad, and the ugly part 1
DataStax Academy
 
PPTX
Cassandra @ Sony: The good, the bad, and the ugly part 2
DataStax Academy
 
PDF
Standing Up Your First Cluster
DataStax Academy
 
PDF
Real Time Analytics with Dse
DataStax Academy
 
PDF
Introduction to Data Modeling with Apache Cassandra
DataStax Academy
 
PDF
Cassandra Core Concepts
DataStax Academy
 
PPTX
Enabling Search in your Cassandra Application with DataStax Enterprise
DataStax Academy
 
PPTX
Bad Habits Die Hard
DataStax Academy
 
PDF
Advanced Data Modeling with Apache Cassandra
DataStax Academy
 
PDF
Advanced Cassandra
DataStax Academy
 
Forrester CXNYC 2017 - Delivering great real-time cx is a true craft
DataStax Academy
 
Introduction to DataStax Enterprise Graph Database
DataStax Academy
 
Introduction to DataStax Enterprise Advanced Replication with Apache Cassandra
DataStax Academy
 
Cassandra on Docker @ Walmart Labs
DataStax Academy
 
Cassandra 3.0 Data Modeling
DataStax Academy
 
Cassandra Adoption on Cisco UCS & Open stack
DataStax Academy
 
Data Modeling for Apache Cassandra
DataStax Academy
 
Coursera Cassandra Driver
DataStax Academy
 
Production Ready Cassandra
DataStax Academy
 
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
DataStax Academy
 
Cassandra @ Sony: The good, the bad, and the ugly part 1
DataStax Academy
 
Cassandra @ Sony: The good, the bad, and the ugly part 2
DataStax Academy
 
Standing Up Your First Cluster
DataStax Academy
 
Real Time Analytics with Dse
DataStax Academy
 
Introduction to Data Modeling with Apache Cassandra
DataStax Academy
 
Cassandra Core Concepts
DataStax Academy
 
Enabling Search in your Cassandra Application with DataStax Enterprise
DataStax Academy
 
Bad Habits Die Hard
DataStax Academy
 
Advanced Data Modeling with Apache Cassandra
DataStax Academy
 
Advanced Cassandra
DataStax Academy
 

Recently uploaded (20)

PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 

Cassandra Day SV 2014: Basic Operations with Apache Cassandra