SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Aerospike & GCE
s@aerospike.com
Database Landscape
Response time: Hours, Minutes
TB to PB
Compute Intensive
TRANSACTIONS
(OLTP)
Response time: Seconds
Gigabytes of data
Balanced Reads/Writes
ANALYTICS (OLAP)
STRUCTURED
DATA
Response time: Seconds
Terabytes of data
Read Intensive
BIG DATA ANALYTICS
Real-time Transactions
Response time: < 10 ms
1-20 TB
Balanced Reads/Writes
24x7x365 Availability
UNSTRUCTURED
DATA
REAL-TIME BIG DATA
Minimalistic Architecture
DNA: No Hotspots
• Data distribution
• Node-Node communication
• Node-Client communication
• Thread level
• CPU level
• Network level
• SSD level
GCE Network
• Andromeda - SDN
• VPC : Virtual Private Cloud
• No multicast though
• KVM based virtio
• DPDK but no SR-IOV
The Challenge (Oct 2014)
• 1 Million write TPS
• Google’s Cassandra benchmark : 300 Nodes
• Median Latency = 10.3ms
• 95% <23ms latency
• Aerospike : 50 Nodes
• Median Latency = 7ms
• 83% <16ms latency & 96.5%<32ms
CPU
• Not able to use it fully. Kind of saturates at 50-60%.
• Too much of CPU going to system
• Software interrupts are high (upto 30%) with high network load
top - 08:03:52 up 25 min, 2 users, load average: 2.25, 2.12, 1.57
Tasks: 84 total, 1 running, 83 sleeping, 0 stopped, 0 zombie
%Cpu0 : 22.8 us, 26.7 sy, 0.0 ni, 43.9 id, 0.0 wa, 0.0 hi, 6.7 si, 0.0 st
%Cpu1 : 23.5 us, 24.5 sy, 0.0 ni, 44.8 id, 0.0 wa, 0.0 hi, 7.2 si, 0.0 st
%Cpu2 : 24.0 us, 24.7 sy, 0.0 ni, 45.5 id, 0.0 wa, 0.0 hi, 5.7 si, 0.0 st
%Cpu3 : 24.5 us, 23.8 sy, 0.0 ni, 45.5 id, 0.0 wa, 0.0 hi, 6.3 si, 0.0 st
Signature of Network Bottleneck
(CPU-based, Non-GCE)
top - 12:51:38 up 5:40, 4 users, load average: 2.86, 2.13, 1.15
Tasks: 152 total, 2 running, 150 sleeping, 0 stopped, 0 zombie
Cpu0 : 1.9%us, 4.4%sy, 0.0%ni, 88.7%id, 0.0%wa, 2.5%hi, 0.0%si, 2.5%st
Cpu1 : 5.0%us, 2.5%sy, 0.0%ni, 87.6%id, 0.0%wa, 2.5%hi, 0.0%si, 2.5%st
Cpu2 : 2.5%us, 4.4%sy, 0.0%ni, 88.7%id, 0.0%wa, 2.5%hi, 0.0%si, 1.9%st
Cpu3 : 5.0%us, 2.5%sy, 0.0%ni, 87.0%id, 0.0%wa, 3.1%hi, 0.0%si, 2.5%st
Cpu4 : 1.3%us, 15.3%sy, 0.0%ni, 0.3%id, 0.0%wa, 1.3%hi, 81.7%si, 0.0%st
Cpu5 : 2.0%us, 0.7%sy, 0.0%ni, 92.8%id, 0.0%wa, 2.6%hi, 0.0%si, 2.0%st
Cpu6 : 2.5%us, 3.2%sy, 0.0%ni, 89.8%id, 0.0%wa, 2.5%hi, 0.0%si, 1.9%st
Cpu7 : 0.3%us, 14.8%sy, 0.0%ni, 0.3%id, 0.0%wa, 1.0%hi, 83.6%si, 0.0%st
Cpu8 : 1.2%us, 1.9%sy, 0.0%ni, 92.5%id, 0.0%wa, 1.9%hi, 0.0%si, 2.5%st
Cpu9 : 1.9%us, 1.3%sy, 0.0%ni, 92.9%id, 0.0%wa, 1.9%hi, 0.0%si, 1.9%st
Cpu10 : 1.3%us, 0.7%sy, 0.0%ni, 93.5%id, 0.0%wa, 2.0%hi, 0.0%si, 2.6%st
Cpu11 : 1.3%us, 1.3%sy, 0.0%ni, 94.2%id, 0.0%wa, 1.3%hi, 0.0%si, 1.9%st
Cpu12 : 2.8%us, 4.8%sy, 0.0%ni, 88.3%id, 0.0%wa, 2.1%hi, 0.0%si, 2.1%st
Cpu13 : 0.6%us, 1.3%sy, 0.0%ni, 94.3%id, 0.0%wa, 1.9%hi, 0.0%si, 1.9%st
Cpu14 : 1.9%us, 2.5%sy, 0.0%ni, 91.8%id, 0.0%wa, 1.3%hi, 0.0%si, 2.5%st
Cpu15 : 2.9%us, 3.6%sy, 0.0%ni, 89.8%id, 0.0%wa, 1.5%hi, 0.0%si, 2.2%st
Mem: 30620324k total, 2384264k used, 28236060k free, 27308k buffers
Swap: 0k total, 0k used, 0k free, 190364k cached
Tricks
• Use standard instances
• Balances network & CPU
• Use taskset and leave out 1 or 2 cores
• Result
• Latencies improve
• Throughput marginally improved
• Less CPU going to system
Network Virtualization
DPDK
3x Improvement (Aug 15)
• 20 Aerospike nodes
• 1.2M wirte TPS, 94% < 4ms latency
• 4.2M read TPS, 90% < 4ms latency
• Changes
• DPDK
• NIC queue depth : 256->16k
• ??
• Takeaway
• Don’t blindly trust top, iostat.
• Keep pushing till you see a bottleneck (and resolve if possible)
Live Migrations
Live Migrations : Implications
• Blackout period depends on workload
• Higher the memory dirty rate, longer the blackout
• Timeouts in application code will get triggered
• Effects clustering based solutions (Aerospike,…)
• Missing heartbeats
• Clocktimes of VMs jump
• Implications on any code tightly dependent on clocktime
Live Migrations : Handling
• Write better code
• Scheduling policy offered by GCE
• onHostMaintenance : Migrate/Terminate
• automaticRestart : True/False
• Since June 2016 : Live migrate notification
• 60 seconds prior intimation
• Via metadata server
• MIGRATE_ON_HOST_MAINTENANCE
• SHUTDOWN_ON_HOST_MAINTENANCE
Local SSDs
• Similar to ephemeral SSDs in AWS (non persistent)
• Not to be confused with persistent SSD (network attached)
• Good cost alternative for RAM
• Can be attached to any instance types
• Spec
• NVMe / SCSI options
• Available in chunks of 375GB
• ~1ms latency
• 680k Read IOPS
• 360K Write IOPS
Aerospike benchmark of Local SSD
• Summary : They are pretty good
Local SSD with Aerospike
• Use shadow device
configuration in Aerospike
• All reads are from local SSD
• All writes (buffered) go to
both Local SSD & persistent
HDD/SSD (network
attached)
• Bcache is no longer
recommended by Aerospike
• Saw some kernel level
implementation bugs
• Saw drive lockups in rare
occurences
Local
SSD
Network
storage
Aerospike
Work in progress
• Aerospike on dockers in GCE
Thank You

Weitere ähnliche Inhalte

Was ist angesagt?

Monitoring MySQL with OpenTSDB
Monitoring MySQL with OpenTSDBMonitoring MySQL with OpenTSDB
Monitoring MySQL with OpenTSDBGeoffrey Anderson
 
HBaseCon2017 Improving HBase availability in a multi tenant environment
HBaseCon2017 Improving HBase availability in a multi tenant environmentHBaseCon2017 Improving HBase availability in a multi tenant environment
HBaseCon2017 Improving HBase availability in a multi tenant environmentHBaseCon
 
Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...
Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...
Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...confluent
 
SignalFx: Making Cassandra Perform as a Time Series Database
SignalFx: Making Cassandra Perform as a Time Series DatabaseSignalFx: Making Cassandra Perform as a Time Series Database
SignalFx: Making Cassandra Perform as a Time Series DatabaseDataStax Academy
 
Tuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish CacheTuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish CachePer Buer
 
Global deduplication for Ceph - Myoungwon Oh
Global deduplication for Ceph - Myoungwon OhGlobal deduplication for Ceph - Myoungwon Oh
Global deduplication for Ceph - Myoungwon OhCeph Community
 
HBaseCon2017 gohbase: Pure Go HBase Client
HBaseCon2017 gohbase: Pure Go HBase ClientHBaseCon2017 gohbase: Pure Go HBase Client
HBaseCon2017 gohbase: Pure Go HBase ClientHBaseCon
 
Varnish Cache 4.0 / Redpill Linpro breakfast in Oslo
Varnish Cache 4.0 / Redpill Linpro breakfast in OsloVarnish Cache 4.0 / Redpill Linpro breakfast in Oslo
Varnish Cache 4.0 / Redpill Linpro breakfast in OsloPer Buer
 
Kafka Summit SF 2017 - Infrastructure for Streaming Applications
Kafka Summit SF 2017 - Infrastructure for Streaming Applications Kafka Summit SF 2017 - Infrastructure for Streaming Applications
Kafka Summit SF 2017 - Infrastructure for Streaming Applications confluent
 
Keynote: Apache HBase at Yahoo! Scale
Keynote: Apache HBase at Yahoo! ScaleKeynote: Apache HBase at Yahoo! Scale
Keynote: Apache HBase at Yahoo! ScaleHBaseCon
 
Include os @ flossuk 2018
Include os @ flossuk 2018Include os @ flossuk 2018
Include os @ flossuk 2018Per Buer
 
HBaseCon2017 Transactions in HBase
HBaseCon2017 Transactions in HBaseHBaseCon2017 Transactions in HBase
HBaseCon2017 Transactions in HBaseHBaseCon
 
Realtime Statistics based on Apache Storm and RocketMQ
Realtime Statistics based on Apache Storm and RocketMQRealtime Statistics based on Apache Storm and RocketMQ
Realtime Statistics based on Apache Storm and RocketMQXin Wang
 
OpenTSDB 2.0
OpenTSDB 2.0OpenTSDB 2.0
OpenTSDB 2.0HBaseCon
 
Performance optimization 101 - Erlang Factory SF 2014
Performance optimization 101 - Erlang Factory SF 2014Performance optimization 101 - Erlang Factory SF 2014
Performance optimization 101 - Erlang Factory SF 2014lpgauth
 
OpenTSDB for monitoring @ Criteo
OpenTSDB for monitoring @ CriteoOpenTSDB for monitoring @ Criteo
OpenTSDB for monitoring @ CriteoNathaniel Braun
 
Tuning TCP and NGINX on EC2
Tuning TCP and NGINX on EC2Tuning TCP and NGINX on EC2
Tuning TCP and NGINX on EC2Chartbeat
 
OpenTSDB: HBaseCon2017
OpenTSDB: HBaseCon2017OpenTSDB: HBaseCon2017
OpenTSDB: HBaseCon2017HBaseCon
 
HBaseCon2017 HBase at Xiaomi
HBaseCon2017 HBase at XiaomiHBaseCon2017 HBase at Xiaomi
HBaseCon2017 HBase at XiaomiHBaseCon
 

Was ist angesagt? (20)

Monitoring MySQL with OpenTSDB
Monitoring MySQL with OpenTSDBMonitoring MySQL with OpenTSDB
Monitoring MySQL with OpenTSDB
 
HBaseCon2017 Improving HBase availability in a multi tenant environment
HBaseCon2017 Improving HBase availability in a multi tenant environmentHBaseCon2017 Improving HBase availability in a multi tenant environment
HBaseCon2017 Improving HBase availability in a multi tenant environment
 
Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...
Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...
Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...
 
SignalFx: Making Cassandra Perform as a Time Series Database
SignalFx: Making Cassandra Perform as a Time Series DatabaseSignalFx: Making Cassandra Perform as a Time Series Database
SignalFx: Making Cassandra Perform as a Time Series Database
 
Tuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish CacheTuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish Cache
 
Global deduplication for Ceph - Myoungwon Oh
Global deduplication for Ceph - Myoungwon OhGlobal deduplication for Ceph - Myoungwon Oh
Global deduplication for Ceph - Myoungwon Oh
 
HBaseCon2017 gohbase: Pure Go HBase Client
HBaseCon2017 gohbase: Pure Go HBase ClientHBaseCon2017 gohbase: Pure Go HBase Client
HBaseCon2017 gohbase: Pure Go HBase Client
 
Varnish Cache 4.0 / Redpill Linpro breakfast in Oslo
Varnish Cache 4.0 / Redpill Linpro breakfast in OsloVarnish Cache 4.0 / Redpill Linpro breakfast in Oslo
Varnish Cache 4.0 / Redpill Linpro breakfast in Oslo
 
Kafka Summit SF 2017 - Infrastructure for Streaming Applications
Kafka Summit SF 2017 - Infrastructure for Streaming Applications Kafka Summit SF 2017 - Infrastructure for Streaming Applications
Kafka Summit SF 2017 - Infrastructure for Streaming Applications
 
Keynote: Apache HBase at Yahoo! Scale
Keynote: Apache HBase at Yahoo! ScaleKeynote: Apache HBase at Yahoo! Scale
Keynote: Apache HBase at Yahoo! Scale
 
Include os @ flossuk 2018
Include os @ flossuk 2018Include os @ flossuk 2018
Include os @ flossuk 2018
 
HBaseCon2017 Transactions in HBase
HBaseCon2017 Transactions in HBaseHBaseCon2017 Transactions in HBase
HBaseCon2017 Transactions in HBase
 
Thanos - Prometheus on Scale
Thanos - Prometheus on ScaleThanos - Prometheus on Scale
Thanos - Prometheus on Scale
 
Realtime Statistics based on Apache Storm and RocketMQ
Realtime Statistics based on Apache Storm and RocketMQRealtime Statistics based on Apache Storm and RocketMQ
Realtime Statistics based on Apache Storm and RocketMQ
 
OpenTSDB 2.0
OpenTSDB 2.0OpenTSDB 2.0
OpenTSDB 2.0
 
Performance optimization 101 - Erlang Factory SF 2014
Performance optimization 101 - Erlang Factory SF 2014Performance optimization 101 - Erlang Factory SF 2014
Performance optimization 101 - Erlang Factory SF 2014
 
OpenTSDB for monitoring @ Criteo
OpenTSDB for monitoring @ CriteoOpenTSDB for monitoring @ Criteo
OpenTSDB for monitoring @ Criteo
 
Tuning TCP and NGINX on EC2
Tuning TCP and NGINX on EC2Tuning TCP and NGINX on EC2
Tuning TCP and NGINX on EC2
 
OpenTSDB: HBaseCon2017
OpenTSDB: HBaseCon2017OpenTSDB: HBaseCon2017
OpenTSDB: HBaseCon2017
 
HBaseCon2017 HBase at Xiaomi
HBaseCon2017 HBase at XiaomiHBaseCon2017 HBase at Xiaomi
HBaseCon2017 HBase at Xiaomi
 

Andere mochten auch

A Short Guide to Researching Civil War Soldiers
A Short Guide to Researching Civil War SoldiersA Short Guide to Researching Civil War Soldiers
A Short Guide to Researching Civil War Soldierscivanoff
 
NoSQL in Real-time Architectures
NoSQL in Real-time ArchitecturesNoSQL in Real-time Architectures
NoSQL in Real-time ArchitecturesRonen Botzer
 
Aerospike Architecture
Aerospike ArchitectureAerospike Architecture
Aerospike ArchitecturePeter Milne
 
Aerospike v3 install
Aerospike v3 installAerospike v3 install
Aerospike v3 installMakoto Uehara
 
Introduction to Redis - LA Hacker News
Introduction to Redis - LA Hacker NewsIntroduction to Redis - LA Hacker News
Introduction to Redis - LA Hacker NewsMichael Parker
 
OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...
OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...
OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...Cloud Native Day Tel Aviv
 
Aerospike: Key Value Data Access
Aerospike: Key Value Data AccessAerospike: Key Value Data Access
Aerospike: Key Value Data AccessAerospike, Inc.
 
Webinar | From Zero to 1 Million with Google Cloud Platform and DataStax
Webinar | From Zero to 1 Million with Google Cloud Platform and DataStaxWebinar | From Zero to 1 Million with Google Cloud Platform and DataStax
Webinar | From Zero to 1 Million with Google Cloud Platform and DataStaxDataStax
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsHisaki Ohara
 
Aerospike Rapid Rebalance
Aerospike Rapid Rebalance Aerospike Rapid Rebalance
Aerospike Rapid Rebalance Makoto Uehara
 
Aerospike Hybrid Memory Architecture
Aerospike Hybrid Memory ArchitectureAerospike Hybrid Memory Architecture
Aerospike Hybrid Memory ArchitectureAerospike, Inc.
 

Andere mochten auch (12)

A Short Guide to Researching Civil War Soldiers
A Short Guide to Researching Civil War SoldiersA Short Guide to Researching Civil War Soldiers
A Short Guide to Researching Civil War Soldiers
 
NoSQL in Real-time Architectures
NoSQL in Real-time ArchitecturesNoSQL in Real-time Architectures
NoSQL in Real-time Architectures
 
Aerospike Architecture
Aerospike ArchitectureAerospike Architecture
Aerospike Architecture
 
Aerospike v3 install
Aerospike v3 installAerospike v3 install
Aerospike v3 install
 
Introduction to Redis - LA Hacker News
Introduction to Redis - LA Hacker NewsIntroduction to Redis - LA Hacker News
Introduction to Redis - LA Hacker News
 
Aerospike deep dive LDTs
Aerospike deep dive LDTsAerospike deep dive LDTs
Aerospike deep dive LDTs
 
OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...
OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...
OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...
 
Aerospike: Key Value Data Access
Aerospike: Key Value Data AccessAerospike: Key Value Data Access
Aerospike: Key Value Data Access
 
Webinar | From Zero to 1 Million with Google Cloud Platform and DataStax
Webinar | From Zero to 1 Million with Google Cloud Platform and DataStaxWebinar | From Zero to 1 Million with Google Cloud Platform and DataStax
Webinar | From Zero to 1 Million with Google Cloud Platform and DataStax
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructions
 
Aerospike Rapid Rebalance
Aerospike Rapid Rebalance Aerospike Rapid Rebalance
Aerospike Rapid Rebalance
 
Aerospike Hybrid Memory Architecture
Aerospike Hybrid Memory ArchitectureAerospike Hybrid Memory Architecture
Aerospike Hybrid Memory Architecture
 

Ähnlich wie Aerospike & GCE (LSPE Talk)

Broken Performance Tools
Broken Performance ToolsBroken Performance Tools
Broken Performance ToolsC4Media
 
Donatas Mažionis, Building low latency web APIs
Donatas Mažionis, Building low latency web APIsDonatas Mažionis, Building low latency web APIs
Donatas Mažionis, Building low latency web APIsTanya Denisyuk
 
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack CloudJourney to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack CloudCeph Community
 
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack CloudJourney to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack CloudPatrick McGarry
 
Nick Fisk - low latency Ceph
Nick Fisk - low latency CephNick Fisk - low latency Ceph
Nick Fisk - low latency CephShapeBlue
 
Fixing twitter
Fixing twitterFixing twitter
Fixing twitterRoger Xia
 
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
 
Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C...
Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C...Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C...
Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C...Red_Hat_Storage
 
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014Amazon Web Services
 
How deep is your buffer – Demystifying buffers and application performance
How deep is your buffer – Demystifying buffers and application performanceHow deep is your buffer – Demystifying buffers and application performance
How deep is your buffer – Demystifying buffers and application performanceCumulus Networks
 
Right-Sizing your SQL Server Virtual Machine
Right-Sizing your SQL Server Virtual MachineRight-Sizing your SQL Server Virtual Machine
Right-Sizing your SQL Server Virtual Machineheraflux
 
GPU cloud with Job scheduler and Container
GPU cloud with Job scheduler and ContainerGPU cloud with Job scheduler and Container
GPU cloud with Job scheduler and ContainerAndrew Yongjoon Kong
 
What's inside the black box? Using ML to tune and manage Kafka. (Matthew Stum...
What's inside the black box? Using ML to tune and manage Kafka. (Matthew Stum...What's inside the black box? Using ML to tune and manage Kafka. (Matthew Stum...
What's inside the black box? Using ML to tune and manage Kafka. (Matthew Stum...confluent
 
PerfUG 3 - perfs système
PerfUG 3 - perfs systèmePerfUG 3 - perfs système
PerfUG 3 - perfs systèmeLudovic Piot
 

Ähnlich wie Aerospike & GCE (LSPE Talk) (20)

Broken Performance Tools
Broken Performance ToolsBroken Performance Tools
Broken Performance Tools
 
Donatas Mažionis, Building low latency web APIs
Donatas Mažionis, Building low latency web APIsDonatas Mažionis, Building low latency web APIs
Donatas Mažionis, Building low latency web APIs
 
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack CloudJourney to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
 
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack CloudJourney to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
 
Nick Fisk - low latency Ceph
Nick Fisk - low latency CephNick Fisk - low latency Ceph
Nick Fisk - low latency Ceph
 
DDoS: practical survival
DDoS: practical survivalDDoS: practical survival
DDoS: practical survival
 
Fixing twitter
Fixing twitterFixing twitter
Fixing twitter
 
Fixing_Twitter
Fixing_TwitterFixing_Twitter
Fixing_Twitter
 
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 ...
 
Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C...
Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C...Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C...
Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C...
 
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
 
lightning talk proposal
lightning talk proposallightning talk proposal
lightning talk proposal
 
How deep is your buffer – Demystifying buffers and application performance
How deep is your buffer – Demystifying buffers and application performanceHow deep is your buffer – Demystifying buffers and application performance
How deep is your buffer – Demystifying buffers and application performance
 
Right-Sizing your SQL Server Virtual Machine
Right-Sizing your SQL Server Virtual MachineRight-Sizing your SQL Server Virtual Machine
Right-Sizing your SQL Server Virtual Machine
 
GPU cloud with Job scheduler and Container
GPU cloud with Job scheduler and ContainerGPU cloud with Job scheduler and Container
GPU cloud with Job scheduler and Container
 
What's inside the black box? Using ML to tune and manage Kafka. (Matthew Stum...
What's inside the black box? Using ML to tune and manage Kafka. (Matthew Stum...What's inside the black box? Using ML to tune and manage Kafka. (Matthew Stum...
What's inside the black box? Using ML to tune and manage Kafka. (Matthew Stum...
 
Performance
PerformancePerformance
Performance
 
PerfUG 3 - perfs système
PerfUG 3 - perfs systèmePerfUG 3 - perfs système
PerfUG 3 - perfs système
 
IAC 2020
IAC 2020IAC 2020
IAC 2020
 

Kürzlich hochgeladen

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
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
 
🐬 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
 
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
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
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
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 

Kürzlich hochgeladen (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
+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...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 

Aerospike & GCE (LSPE Talk)

  • 2. Database Landscape Response time: Hours, Minutes TB to PB Compute Intensive TRANSACTIONS (OLTP) Response time: Seconds Gigabytes of data Balanced Reads/Writes ANALYTICS (OLAP) STRUCTURED DATA Response time: Seconds Terabytes of data Read Intensive BIG DATA ANALYTICS Real-time Transactions Response time: < 10 ms 1-20 TB Balanced Reads/Writes 24x7x365 Availability UNSTRUCTURED DATA REAL-TIME BIG DATA
  • 4. DNA: No Hotspots • Data distribution • Node-Node communication • Node-Client communication • Thread level • CPU level • Network level • SSD level
  • 5. GCE Network • Andromeda - SDN • VPC : Virtual Private Cloud • No multicast though • KVM based virtio • DPDK but no SR-IOV
  • 6. The Challenge (Oct 2014) • 1 Million write TPS • Google’s Cassandra benchmark : 300 Nodes • Median Latency = 10.3ms • 95% <23ms latency • Aerospike : 50 Nodes • Median Latency = 7ms • 83% <16ms latency & 96.5%<32ms
  • 7. CPU • Not able to use it fully. Kind of saturates at 50-60%. • Too much of CPU going to system • Software interrupts are high (upto 30%) with high network load top - 08:03:52 up 25 min, 2 users, load average: 2.25, 2.12, 1.57 Tasks: 84 total, 1 running, 83 sleeping, 0 stopped, 0 zombie %Cpu0 : 22.8 us, 26.7 sy, 0.0 ni, 43.9 id, 0.0 wa, 0.0 hi, 6.7 si, 0.0 st %Cpu1 : 23.5 us, 24.5 sy, 0.0 ni, 44.8 id, 0.0 wa, 0.0 hi, 7.2 si, 0.0 st %Cpu2 : 24.0 us, 24.7 sy, 0.0 ni, 45.5 id, 0.0 wa, 0.0 hi, 5.7 si, 0.0 st %Cpu3 : 24.5 us, 23.8 sy, 0.0 ni, 45.5 id, 0.0 wa, 0.0 hi, 6.3 si, 0.0 st
  • 8. Signature of Network Bottleneck (CPU-based, Non-GCE) top - 12:51:38 up 5:40, 4 users, load average: 2.86, 2.13, 1.15 Tasks: 152 total, 2 running, 150 sleeping, 0 stopped, 0 zombie Cpu0 : 1.9%us, 4.4%sy, 0.0%ni, 88.7%id, 0.0%wa, 2.5%hi, 0.0%si, 2.5%st Cpu1 : 5.0%us, 2.5%sy, 0.0%ni, 87.6%id, 0.0%wa, 2.5%hi, 0.0%si, 2.5%st Cpu2 : 2.5%us, 4.4%sy, 0.0%ni, 88.7%id, 0.0%wa, 2.5%hi, 0.0%si, 1.9%st Cpu3 : 5.0%us, 2.5%sy, 0.0%ni, 87.0%id, 0.0%wa, 3.1%hi, 0.0%si, 2.5%st Cpu4 : 1.3%us, 15.3%sy, 0.0%ni, 0.3%id, 0.0%wa, 1.3%hi, 81.7%si, 0.0%st Cpu5 : 2.0%us, 0.7%sy, 0.0%ni, 92.8%id, 0.0%wa, 2.6%hi, 0.0%si, 2.0%st Cpu6 : 2.5%us, 3.2%sy, 0.0%ni, 89.8%id, 0.0%wa, 2.5%hi, 0.0%si, 1.9%st Cpu7 : 0.3%us, 14.8%sy, 0.0%ni, 0.3%id, 0.0%wa, 1.0%hi, 83.6%si, 0.0%st Cpu8 : 1.2%us, 1.9%sy, 0.0%ni, 92.5%id, 0.0%wa, 1.9%hi, 0.0%si, 2.5%st Cpu9 : 1.9%us, 1.3%sy, 0.0%ni, 92.9%id, 0.0%wa, 1.9%hi, 0.0%si, 1.9%st Cpu10 : 1.3%us, 0.7%sy, 0.0%ni, 93.5%id, 0.0%wa, 2.0%hi, 0.0%si, 2.6%st Cpu11 : 1.3%us, 1.3%sy, 0.0%ni, 94.2%id, 0.0%wa, 1.3%hi, 0.0%si, 1.9%st Cpu12 : 2.8%us, 4.8%sy, 0.0%ni, 88.3%id, 0.0%wa, 2.1%hi, 0.0%si, 2.1%st Cpu13 : 0.6%us, 1.3%sy, 0.0%ni, 94.3%id, 0.0%wa, 1.9%hi, 0.0%si, 1.9%st Cpu14 : 1.9%us, 2.5%sy, 0.0%ni, 91.8%id, 0.0%wa, 1.3%hi, 0.0%si, 2.5%st Cpu15 : 2.9%us, 3.6%sy, 0.0%ni, 89.8%id, 0.0%wa, 1.5%hi, 0.0%si, 2.2%st Mem: 30620324k total, 2384264k used, 28236060k free, 27308k buffers Swap: 0k total, 0k used, 0k free, 190364k cached
  • 9. Tricks • Use standard instances • Balances network & CPU • Use taskset and leave out 1 or 2 cores • Result • Latencies improve • Throughput marginally improved • Less CPU going to system
  • 11. DPDK
  • 12. 3x Improvement (Aug 15) • 20 Aerospike nodes • 1.2M wirte TPS, 94% < 4ms latency • 4.2M read TPS, 90% < 4ms latency • Changes • DPDK • NIC queue depth : 256->16k • ?? • Takeaway • Don’t blindly trust top, iostat. • Keep pushing till you see a bottleneck (and resolve if possible)
  • 14. Live Migrations : Implications • Blackout period depends on workload • Higher the memory dirty rate, longer the blackout • Timeouts in application code will get triggered • Effects clustering based solutions (Aerospike,…) • Missing heartbeats • Clocktimes of VMs jump • Implications on any code tightly dependent on clocktime
  • 15. Live Migrations : Handling • Write better code • Scheduling policy offered by GCE • onHostMaintenance : Migrate/Terminate • automaticRestart : True/False • Since June 2016 : Live migrate notification • 60 seconds prior intimation • Via metadata server • MIGRATE_ON_HOST_MAINTENANCE • SHUTDOWN_ON_HOST_MAINTENANCE
  • 16. Local SSDs • Similar to ephemeral SSDs in AWS (non persistent) • Not to be confused with persistent SSD (network attached) • Good cost alternative for RAM • Can be attached to any instance types • Spec • NVMe / SCSI options • Available in chunks of 375GB • ~1ms latency • 680k Read IOPS • 360K Write IOPS
  • 17. Aerospike benchmark of Local SSD • Summary : They are pretty good
  • 18. Local SSD with Aerospike • Use shadow device configuration in Aerospike • All reads are from local SSD • All writes (buffered) go to both Local SSD & persistent HDD/SSD (network attached) • Bcache is no longer recommended by Aerospike • Saw some kernel level implementation bugs • Saw drive lockups in rare occurences Local SSD Network storage Aerospike
  • 19. Work in progress • Aerospike on dockers in GCE