SlideShare a Scribd company logo
1 of 60
Tales from
Taming Tail Latencies
Deepankar Reddy, Ishan Chhabra
Rocket Fuel Inc.
Recap : Rocket Fuel Inc
◦ Programmatic Ad Tech firm
◦ Eval(s) ~100B Ad opportunities daily
◦ Each eval has strict SLA of 100 ms
Recap : Blackbird @RocketFuel
Recap : Blackbird
Scalable collection storage API
▫ Backed by HBase
▫ Append only collections
Recap : Blackbird
Stores rich anonymized user data
◦ Historical behavior - Ads viewed and clicked,
pages visited, etc.
◦ Interest - Third party and learned
interests
◦ Feature vectors for various ML models
◦ etc ..
Blackbird Workload
◦ 80% Read - 20% Write workload
◦ 90 - 95 % cache hit ratio
◦ Record size (compressed protobufs) :
▫ Mean : 11 KB
▫ Median : 8 KB
Blackbird Workload
◦ 14 TB of Unreplicated Data
◦ 60 - 70 Nodes in a Data Center
◦ Strict SLA of 40 ms
◦ Current SLA violation rate @ ~2 %
Blackbird Workload
◦ Read latencies:
▫ Mean, Median : < 1ms
▫ 95th perc : 25 ms
◦ Write latencies:
▫ Mean, Median : < 1ms
▫ 95th perc : 1 ms
Blackbird WorkLoad
Rocket Fuel Moment Scoring Pipeline
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
BlackBird
Service
... ... ...
Anon.
UserId
Tab
People Based Marketing
◦ Efforts to cluster identities of user
▫ Probabilistic using Machine Learning
▫ Deterministic via integrations
◦ Reduces information loss
◦ Aligns with user’s buying patterns
New Blackbird Queries
Rocket Fuel Moment Scoring Pipeline
. . . . . . . . . . . . . . . . . . . . . .
BlackBird Data Service
Anon
UserID
UserID
Clusters
Request for All IDs in
the cluster
Translated SLA
X axis :
SLA violation
rate for a
single read
Y axis :
New SLA
violation rate for
multiple reads
Observations
Server Observed Read Latency
99P ~ 25 ms
95P ~ 8 ms
Client Observed Read Latency
99P > 100MS
95P > 25MS
Why the difference?
Network Level Time (ms)
Server Side Time (ms)
RS Heap size (MBs)
Observations
◦ Client / Server times match
◦ Except during the longer mixed GCs
Co-ordinated omission
© Borrowed from Gil Tene How Not to Measure Latency QCON SF 2015
Co-ordinated omission
© Borrowed from Gil Tene How Not to Measure Latency QCON SF 2015
Co-ordinated omission
◦ ~ Censorship of Data
▫ Not random but co-ordinated omission
◦ Censorship during a GC*
▫ Queueing time in app
▫ Time sitting in the network buffer
▫ Time in the responder
*with normal latencies
Co-ordinated omission
Server Side Latencies
◦ GCs don’t show up on inprocess latencies
◦ More events of “request pipeline”, more
probability to capture a GC
▫ Add time in network buffer
▫ Add time in responder
▫ Add time in transit etc...
Co-ordinated omission
Client Side Latencies
◦ Very important to slice requests per
server to see the patterns
◦ Even the will miss Young GCs
▫ Problems with moving avgs (Yammer metrics)
Causes for Peaks
What’s causing Mixed GC :
Heap size MB
Cache size GB
~25GB
~4-5 GB
Around 5 times in a GC cycle
5 x 5 = 25
Causes for Peaks
Mixed GC:
◦ LRU on heap is bad for GC
▫ All evicted blocks will be in Old Gen
▫ Old Gen cleanup => Mixed GC
◦ No GC optimizations can fix this
Why peaks are bad
◦ Not so bad in normal use cases
▫ If peaks occur rarely
◦ Bad enough in clustered reads
◦ Decreases times for other parts in our
Moment Scoring Pipeline
Why peaks are bad
Why peaks are bad
Why peaks are bad
Fix is to move to Off Heap
for LRU cache
Off Heap Block Cache
◦ An array of byte buffers (4MB size)
◦ Offset based free space management
◦ Re-use the buffers by overwriting
◦ HBaseCon Talk at 3:10-3:50pm
Off Heap Advantages
◦ Can scale to higher memory
▫ Reserving less for promotion failures
◦ Potentially could be on SSDs/NVMes
▫ Allows us to use more denser boxes
Off Heap Tests
Work for moving Off Heap
◦ HBase 1.0 copies data onto Heap
◦ Leads to too much Garbage
▫ GCing once every 2 - 3 secs
Work for moving Off Heap
◦ HBase 2.0 fixes this
▫ HBASE-11425
◦ Pulled patches from upstream on 1.1
◦ Encountered a few issues
▫ HBASE-15064, HBASE-15525 . . .
What about Young GC ?
◦ Any GC time above your SLA is bad
◦ Hard to see this with Yammer metrics
▫ Sliding Window smoothing
▫ Eliminates peaks in percentiles
◦ Use histograms without Averaging
▫ HDRHistogram / HBase-2.0 Fast Histogram ...
What about Young GC ?
HDR Histogram
Yammer Histogram
Fixing measurements ?
More (precise) metrics
◦ Percentiles are confusing
▫ Very hard to reason sometimes
◦ Used SLA based violation counts
▫ Ex:- Time Bucketed counts
Fixing Young GC
How to fix Young GC ?
◦ Tried to get GC pause times << SLA
◦ Not possible with current heap sizes
◦ Need RS with smaller heaps
▫ Less promotion work
▫ Less Young cleanup work
How to fix Young GC ?
◦ Have to run a lot of RegionServers
▫ Commodity servers are multi core now with
large RAM
◦ Slider makes this easier
◦ Load Balancing issue
How to fix Young GC ?
◦ Smaller GC pauses => more freq GCs
◦ Need to reduce garbage gen. also
How to fix Young GC ?
Reducing Garbage generation
◦ Memstore / ConcurrentSkipList oppty.
◦ To use or not use Data Block Encoding
◦ Compress / Decompress Opts.
◦ Misc….
How to fix Young GC ?
Results
How to fix Young GC ?
Results
Reads going to Disk
Processing Times
Processing Times
◦ Huge bump between 95 & 99 percs
◦ Cache hit ratio 95 %
◦ We are going to disks for these
How can we fix this gap?
1. Increase cache hit ratio
2. Make disk reads faster
Exploring SSD & NVMe
Increasing Cache Hit Ratio
Using NVME cards
◦ ~ SSD higher throughput due to PCIe
◦ Support already in Bucket Cache
◦ Cost effective w.r.t RAM
▫ RAM ~ $10 per GB, NVMe ~ $1 per GB
Disk throughputs
Exploring move to SSDs
◦ SSDs cost ~ SAS disks costs
▫ Depends on SSD grade
▫ Including SAS backplane costs
◦ HDFS can store 1 replica in SSDs,
other 2 in HDDs
Thanks!
ANY QUESTIONS?
Addendum
Newer SLA Requirements
◦ Older single read SLA is not enough
▫ 98% translate to 90% in newer model
◦ Top two areas of improvements
▫ Garbage Collection in JVM
▫ Reads going to Disks
How to fix Young GC ?
RS with 14GB heap
pauses < 10ms
SLA violation counts
How to fix Young GC ?
Results (sunday)
How to fix Young GC ?
Results (sunday)
Off Heap Tests

More Related Content

What's hot

What's hot (20)

HBaseConAsia2018 Track1-7: HDFS optimizations for HBase at Xiaomi
HBaseConAsia2018 Track1-7: HDFS optimizations for HBase at XiaomiHBaseConAsia2018 Track1-7: HDFS optimizations for HBase at Xiaomi
HBaseConAsia2018 Track1-7: HDFS optimizations for HBase at Xiaomi
 
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
 
Rolling Out Apache HBase for Mobile Offerings at Visa
Rolling Out Apache HBase for Mobile Offerings at Visa Rolling Out Apache HBase for Mobile Offerings at Visa
Rolling Out Apache HBase for Mobile Offerings at Visa
 
Apache HBase, Accelerated: In-Memory Flush and Compaction
Apache HBase, Accelerated: In-Memory Flush and Compaction Apache HBase, Accelerated: In-Memory Flush and Compaction
Apache HBase, Accelerated: In-Memory Flush and Compaction
 
Accordion HBaseCon 2017
Accordion HBaseCon 2017Accordion HBaseCon 2017
Accordion HBaseCon 2017
 
Off-heaping the Apache HBase Read Path
Off-heaping the Apache HBase Read Path Off-heaping the Apache HBase Read Path
Off-heaping the Apache HBase Read Path
 
OpenTSDB: HBaseCon2017
OpenTSDB: HBaseCon2017OpenTSDB: HBaseCon2017
OpenTSDB: HBaseCon2017
 
Date-tiered Compaction Policy for Time-series Data
Date-tiered Compaction Policy for Time-series DataDate-tiered Compaction Policy for Time-series Data
Date-tiered Compaction Policy for Time-series Data
 
HBaseCon2017 Transactions in HBase
HBaseCon2017 Transactions in HBaseHBaseCon2017 Transactions in HBase
HBaseCon2017 Transactions in HBase
 
HBaseCon2017 HBase at Xiaomi
HBaseCon2017 HBase at XiaomiHBaseCon2017 HBase at Xiaomi
HBaseCon2017 HBase at Xiaomi
 
Argus Production Monitoring at Salesforce
Argus Production Monitoring at SalesforceArgus Production Monitoring at Salesforce
Argus Production Monitoring at Salesforce
 
HBaseCon2017 Highly-Available HBase
HBaseCon2017 Highly-Available HBaseHBaseCon2017 Highly-Available HBase
HBaseCon2017 Highly-Available HBase
 
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
 
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GCHadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
 
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon2017 Removable singularity: a story of HBase upgrade in PinterestHBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
 
HBaseCon 2013: How (and Why) Phoenix Puts the SQL Back into NoSQL
HBaseCon 2013: How (and Why) Phoenix Puts the SQL Back into NoSQLHBaseCon 2013: How (and Why) Phoenix Puts the SQL Back into NoSQL
HBaseCon 2013: How (and Why) Phoenix Puts the SQL Back into NoSQL
 
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBaseHBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
 
HBaseCon2017 Quanta: Quora's hierarchical counting system on HBase
HBaseCon2017 Quanta: Quora's hierarchical counting system on HBaseHBaseCon2017 Quanta: Quora's hierarchical counting system on HBase
HBaseCon2017 Quanta: Quora's hierarchical counting system on HBase
 
HBaseConAsia2018 Track1-1: Use CCSMap to improve HBase YGC time
HBaseConAsia2018 Track1-1: Use CCSMap to improve HBase YGC timeHBaseConAsia2018 Track1-1: Use CCSMap to improve HBase YGC time
HBaseConAsia2018 Track1-1: Use CCSMap to improve HBase YGC time
 
Kafka on ZFS: Better Living Through Filesystems
Kafka on ZFS: Better Living Through Filesystems Kafka on ZFS: Better Living Through Filesystems
Kafka on ZFS: Better Living Through Filesystems
 

Viewers also liked

Viewers also liked (20)

HBaseCon 2015: HBase at Scale in an Online and High-Demand Environment
HBaseCon 2015: HBase at Scale in an Online and  High-Demand EnvironmentHBaseCon 2015: HBase at Scale in an Online and  High-Demand Environment
HBaseCon 2015: HBase at Scale in an Online and High-Demand Environment
 
Apache HBase at Airbnb
Apache HBase at Airbnb Apache HBase at Airbnb
Apache HBase at Airbnb
 
Improvements to Apache HBase and Its Applications in Alibaba Search
Improvements to Apache HBase and Its Applications in Alibaba Search Improvements to Apache HBase and Its Applications in Alibaba Search
Improvements to Apache HBase and Its Applications in Alibaba Search
 
Apache HBase - Just the Basics
Apache HBase - Just the BasicsApache HBase - Just the Basics
Apache HBase - Just the Basics
 
Keynote: Welcome Message/State of Apache HBase
Keynote: Welcome Message/State of Apache HBase Keynote: Welcome Message/State of Apache HBase
Keynote: Welcome Message/State of Apache HBase
 
HBaseCon 2015: Elastic HBase on Mesos
HBaseCon 2015: Elastic HBase on MesosHBaseCon 2015: Elastic HBase on Mesos
HBaseCon 2015: Elastic HBase on Mesos
 
HBaseCon 2015: Solving HBase Performance Problems with Apache HTrace
HBaseCon 2015: Solving HBase Performance Problems with Apache HTraceHBaseCon 2015: Solving HBase Performance Problems with Apache HTrace
HBaseCon 2015: Solving HBase Performance Problems with Apache HTrace
 
HBaseCon 2015: HBase Performance Tuning @ Salesforce
HBaseCon 2015: HBase Performance Tuning @ SalesforceHBaseCon 2015: HBase Performance Tuning @ Salesforce
HBaseCon 2015: HBase Performance Tuning @ Salesforce
 
Apache HBase in the Enterprise Data Hub at Cerner
Apache HBase in the Enterprise Data Hub at CernerApache HBase in the Enterprise Data Hub at Cerner
Apache HBase in the Enterprise Data Hub at Cerner
 
Apache Spark on Apache HBase: Current and Future
Apache Spark on Apache HBase: Current and Future Apache Spark on Apache HBase: Current and Future
Apache Spark on Apache HBase: Current and Future
 
HBaseCon 2015: HBase @ Flipboard
HBaseCon 2015: HBase @ FlipboardHBaseCon 2015: HBase @ Flipboard
HBaseCon 2015: HBase @ Flipboard
 
Breaking the Sound Barrier with Persistent Memory
Breaking the Sound Barrier with Persistent Memory Breaking the Sound Barrier with Persistent Memory
Breaking the Sound Barrier with Persistent Memory
 
Apache HBase Improvements and Practices at Xiaomi
Apache HBase Improvements and Practices at XiaomiApache HBase Improvements and Practices at Xiaomi
Apache HBase Improvements and Practices at Xiaomi
 
Keynote: The Future of Apache HBase
Keynote: The Future of Apache HBaseKeynote: The Future of Apache HBase
Keynote: The Future of Apache HBase
 
HBaseCon 2015: S2Graph - A Large-scale Graph Database with HBase
HBaseCon 2015: S2Graph - A Large-scale Graph Database with HBaseHBaseCon 2015: S2Graph - A Large-scale Graph Database with HBase
HBaseCon 2015: S2Graph - A Large-scale Graph Database with HBase
 
Apache Phoenix: Use Cases and New Features
Apache Phoenix: Use Cases and New FeaturesApache Phoenix: Use Cases and New Features
Apache Phoenix: Use Cases and New Features
 
Optimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsight
Optimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsightOptimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsight
Optimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsight
 
Apache Argus - How do I secure my entire Hadoop cluster? Olivier Renault @ Ho...
Apache Argus - How do I secure my entire Hadoop cluster? Olivier Renault @ Ho...Apache Argus - How do I secure my entire Hadoop cluster? Olivier Renault @ Ho...
Apache Argus - How do I secure my entire Hadoop cluster? Olivier Renault @ Ho...
 
Argus Production Monitoring at Salesforce
Argus Production Monitoring at Salesforce Argus Production Monitoring at Salesforce
Argus Production Monitoring at Salesforce
 
Time-Series Apache HBase
Time-Series Apache HBaseTime-Series Apache HBase
Time-Series Apache HBase
 

Similar to Tales from Taming the Long Tail

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
 

Similar to Tales from Taming the Long Tail (20)

EVCache: Lowering Costs for a Low Latency Cache with RocksDB
EVCache: Lowering Costs for a Low Latency Cache with RocksDBEVCache: Lowering Costs for a Low Latency Cache with RocksDB
EVCache: Lowering Costs for a Low Latency Cache with RocksDB
 
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & Optimization
 
Twitter Fatcache
Twitter FatcacheTwitter Fatcache
Twitter Fatcache
 
No C-QL (Or how I learned to stop worrying, and love eventual consistency) (N...
No C-QL (Or how I learned to stop worrying, and love eventual consistency) (N...No C-QL (Or how I learned to stop worrying, and love eventual consistency) (N...
No C-QL (Or how I learned to stop worrying, and love eventual consistency) (N...
 
CASSANDRA MEETUP - Choosing the right cloud instances for success
CASSANDRA MEETUP - Choosing the right cloud instances for successCASSANDRA MEETUP - Choosing the right cloud instances for success
CASSANDRA MEETUP - Choosing the right cloud instances for success
 
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar AhmedPGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
 
AWS Webcast - Cost and Performance Optimization in Amazon RDS
AWS Webcast - Cost and Performance Optimization in Amazon RDSAWS Webcast - Cost and Performance Optimization in Amazon RDS
AWS Webcast - Cost and Performance Optimization in Amazon RDS
 
How to Make SQL Server Go Faster
How to Make SQL Server Go FasterHow to Make SQL Server Go Faster
How to Make SQL Server Go Faster
 
Performance Tipping Points - Hitting Hardware Bottlenecks
Performance Tipping Points - Hitting Hardware BottlenecksPerformance Tipping Points - Hitting Hardware Bottlenecks
Performance Tipping Points - Hitting Hardware Bottlenecks
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimization
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimization
 
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...
 
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
 
Application Caching: The Hidden Microservice
Application Caching: The Hidden MicroserviceApplication Caching: The Hidden Microservice
Application Caching: The Hidden Microservice
 
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
 
Netflix - Realtime Impression Store
Netflix - Realtime Impression Store Netflix - Realtime Impression Store
Netflix - Realtime Impression Store
 
Why is My Stream Processing Job Slow? with Xavier Leaute
Why is My Stream Processing Job Slow? with Xavier LeauteWhy is My Stream Processing Job Slow? with Xavier Leaute
Why is My Stream Processing Job Slow? with Xavier Leaute
 
How we got to 1 millisecond latency in 99% under repair, compaction, and flus...
How we got to 1 millisecond latency in 99% under repair, compaction, and flus...How we got to 1 millisecond latency in 99% under repair, compaction, and flus...
How we got to 1 millisecond latency in 99% under repair, compaction, and flus...
 

More from HBaseCon

HBaseCon2017 Spark HBase Connector: Feature Rich and Efficient Access to HBas...
HBaseCon2017 Spark HBase Connector: Feature Rich and Efficient Access to HBas...HBaseCon2017 Spark HBase Connector: Feature Rich and Efficient Access to HBas...
HBaseCon2017 Spark HBase Connector: Feature Rich and Efficient Access to HBas...
HBaseCon
 
HBaseCon2017 HBase/Phoenix @ Scale @ Salesforce
HBaseCon2017 HBase/Phoenix @ Scale @ SalesforceHBaseCon2017 HBase/Phoenix @ Scale @ Salesforce
HBaseCon2017 HBase/Phoenix @ Scale @ Salesforce
HBaseCon
 
HBaseCon2017 Achieving HBase Multi-Tenancy with RegionServer Groups and Favor...
HBaseCon2017 Achieving HBase Multi-Tenancy with RegionServer Groups and Favor...HBaseCon2017 Achieving HBase Multi-Tenancy with RegionServer Groups and Favor...
HBaseCon2017 Achieving HBase Multi-Tenancy with RegionServer Groups and Favor...
HBaseCon
 

More from HBaseCon (20)

hbaseconasia2017: HBase on Beam
hbaseconasia2017: HBase on Beamhbaseconasia2017: HBase on Beam
hbaseconasia2017: HBase on Beam
 
hbaseconasia2017: HBase Disaster Recovery Solution at Huawei
hbaseconasia2017: HBase Disaster Recovery Solution at Huaweihbaseconasia2017: HBase Disaster Recovery Solution at Huawei
hbaseconasia2017: HBase Disaster Recovery Solution at Huawei
 
hbaseconasia2017: Removable singularity: a story of HBase upgrade in Pinterest
hbaseconasia2017: Removable singularity: a story of HBase upgrade in Pinteresthbaseconasia2017: Removable singularity: a story of HBase upgrade in Pinterest
hbaseconasia2017: Removable singularity: a story of HBase upgrade in Pinterest
 
hbaseconasia2017: HareQL:快速HBase查詢工具的發展過程
hbaseconasia2017: HareQL:快速HBase查詢工具的發展過程hbaseconasia2017: HareQL:快速HBase查詢工具的發展過程
hbaseconasia2017: HareQL:快速HBase查詢工具的發展過程
 
hbaseconasia2017: Apache HBase at Netease
hbaseconasia2017: Apache HBase at Neteasehbaseconasia2017: Apache HBase at Netease
hbaseconasia2017: Apache HBase at Netease
 
hbaseconasia2017: HBase在Hulu的使用和实践
hbaseconasia2017: HBase在Hulu的使用和实践hbaseconasia2017: HBase在Hulu的使用和实践
hbaseconasia2017: HBase在Hulu的使用和实践
 
hbaseconasia2017: 基于HBase的企业级大数据平台
hbaseconasia2017: 基于HBase的企业级大数据平台hbaseconasia2017: 基于HBase的企业级大数据平台
hbaseconasia2017: 基于HBase的企业级大数据平台
 
hbaseconasia2017: HBase at JD.com
hbaseconasia2017: HBase at JD.comhbaseconasia2017: HBase at JD.com
hbaseconasia2017: HBase at JD.com
 
hbaseconasia2017: Large scale data near-line loading method and architecture
hbaseconasia2017: Large scale data near-line loading method and architecturehbaseconasia2017: Large scale data near-line loading method and architecture
hbaseconasia2017: Large scale data near-line loading method and architecture
 
hbaseconasia2017: Ecosystems with HBase and CloudTable service at Huawei
hbaseconasia2017: Ecosystems with HBase and CloudTable service at Huaweihbaseconasia2017: Ecosystems with HBase and CloudTable service at Huawei
hbaseconasia2017: Ecosystems with HBase and CloudTable service at Huawei
 
hbaseconasia2017: hbase-2.0.0
hbaseconasia2017: hbase-2.0.0hbaseconasia2017: hbase-2.0.0
hbaseconasia2017: hbase-2.0.0
 
HBaseCon2017 Democratizing HBase
HBaseCon2017 Democratizing HBaseHBaseCon2017 Democratizing HBase
HBaseCon2017 Democratizing HBase
 
HBaseCon2017 Apache HBase at Didi
HBaseCon2017 Apache HBase at DidiHBaseCon2017 Apache HBase at Didi
HBaseCon2017 Apache HBase at Didi
 
HBaseCon2017 Spark HBase Connector: Feature Rich and Efficient Access to HBas...
HBaseCon2017 Spark HBase Connector: Feature Rich and Efficient Access to HBas...HBaseCon2017 Spark HBase Connector: Feature Rich and Efficient Access to HBas...
HBaseCon2017 Spark HBase Connector: Feature Rich and Efficient Access to HBas...
 
HBaseCon2017 Efficient and portable data processing with Apache Beam and HBase
HBaseCon2017 Efficient and portable data processing with Apache Beam and HBaseHBaseCon2017 Efficient and portable data processing with Apache Beam and HBase
HBaseCon2017 Efficient and portable data processing with Apache Beam and HBase
 
HBaseCon2017 HBase/Phoenix @ Scale @ Salesforce
HBaseCon2017 HBase/Phoenix @ Scale @ SalesforceHBaseCon2017 HBase/Phoenix @ Scale @ Salesforce
HBaseCon2017 HBase/Phoenix @ Scale @ Salesforce
 
HBaseCon2017 Community-Driven Graphs with JanusGraph
HBaseCon2017 Community-Driven Graphs with JanusGraphHBaseCon2017 Community-Driven Graphs with JanusGraph
HBaseCon2017 Community-Driven Graphs with JanusGraph
 
HBaseCon2017 Warp 10, a novel approach to managing and analyzing time series ...
HBaseCon2017 Warp 10, a novel approach to managing and analyzing time series ...HBaseCon2017 Warp 10, a novel approach to managing and analyzing time series ...
HBaseCon2017 Warp 10, a novel approach to managing and analyzing time series ...
 
HBaseCon2017 Analyzing cryptocurrencies in real time with hBase, Kafka and St...
HBaseCon2017 Analyzing cryptocurrencies in real time with hBase, Kafka and St...HBaseCon2017 Analyzing cryptocurrencies in real time with hBase, Kafka and St...
HBaseCon2017 Analyzing cryptocurrencies in real time with hBase, Kafka and St...
 
HBaseCon2017 Achieving HBase Multi-Tenancy with RegionServer Groups and Favor...
HBaseCon2017 Achieving HBase Multi-Tenancy with RegionServer Groups and Favor...HBaseCon2017 Achieving HBase Multi-Tenancy with RegionServer Groups and Favor...
HBaseCon2017 Achieving HBase Multi-Tenancy with RegionServer Groups and Favor...
 

Recently uploaded

%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Recently uploaded (20)

%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 

Tales from Taming the Long Tail

  • 1. Tales from Taming Tail Latencies Deepankar Reddy, Ishan Chhabra Rocket Fuel Inc.
  • 2. Recap : Rocket Fuel Inc ◦ Programmatic Ad Tech firm ◦ Eval(s) ~100B Ad opportunities daily ◦ Each eval has strict SLA of 100 ms
  • 3. Recap : Blackbird @RocketFuel
  • 4. Recap : Blackbird Scalable collection storage API ▫ Backed by HBase ▫ Append only collections
  • 5. Recap : Blackbird Stores rich anonymized user data ◦ Historical behavior - Ads viewed and clicked, pages visited, etc. ◦ Interest - Third party and learned interests ◦ Feature vectors for various ML models ◦ etc ..
  • 6. Blackbird Workload ◦ 80% Read - 20% Write workload ◦ 90 - 95 % cache hit ratio ◦ Record size (compressed protobufs) : ▫ Mean : 11 KB ▫ Median : 8 KB
  • 7. Blackbird Workload ◦ 14 TB of Unreplicated Data ◦ 60 - 70 Nodes in a Data Center ◦ Strict SLA of 40 ms ◦ Current SLA violation rate @ ~2 %
  • 8. Blackbird Workload ◦ Read latencies: ▫ Mean, Median : < 1ms ▫ 95th perc : 25 ms ◦ Write latencies: ▫ Mean, Median : < 1ms ▫ 95th perc : 1 ms
  • 9. Blackbird WorkLoad Rocket Fuel Moment Scoring Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BlackBird Service ... ... ... Anon. UserId Tab
  • 10. People Based Marketing ◦ Efforts to cluster identities of user ▫ Probabilistic using Machine Learning ▫ Deterministic via integrations ◦ Reduces information loss ◦ Aligns with user’s buying patterns
  • 11. New Blackbird Queries Rocket Fuel Moment Scoring Pipeline . . . . . . . . . . . . . . . . . . . . . . BlackBird Data Service Anon UserID UserID Clusters Request for All IDs in the cluster
  • 12. Translated SLA X axis : SLA violation rate for a single read Y axis : New SLA violation rate for multiple reads
  • 14. Server Observed Read Latency 99P ~ 25 ms 95P ~ 8 ms
  • 15. Client Observed Read Latency 99P > 100MS 95P > 25MS
  • 17. Network Level Time (ms) Server Side Time (ms) RS Heap size (MBs)
  • 18. Observations ◦ Client / Server times match ◦ Except during the longer mixed GCs
  • 19. Co-ordinated omission © Borrowed from Gil Tene How Not to Measure Latency QCON SF 2015
  • 20. Co-ordinated omission © Borrowed from Gil Tene How Not to Measure Latency QCON SF 2015
  • 21. Co-ordinated omission ◦ ~ Censorship of Data ▫ Not random but co-ordinated omission ◦ Censorship during a GC* ▫ Queueing time in app ▫ Time sitting in the network buffer ▫ Time in the responder *with normal latencies
  • 22. Co-ordinated omission Server Side Latencies ◦ GCs don’t show up on inprocess latencies ◦ More events of “request pipeline”, more probability to capture a GC ▫ Add time in network buffer ▫ Add time in responder ▫ Add time in transit etc...
  • 23. Co-ordinated omission Client Side Latencies ◦ Very important to slice requests per server to see the patterns ◦ Even the will miss Young GCs ▫ Problems with moving avgs (Yammer metrics)
  • 24. Causes for Peaks What’s causing Mixed GC : Heap size MB Cache size GB ~25GB ~4-5 GB Around 5 times in a GC cycle 5 x 5 = 25
  • 25. Causes for Peaks Mixed GC: ◦ LRU on heap is bad for GC ▫ All evicted blocks will be in Old Gen ▫ Old Gen cleanup => Mixed GC ◦ No GC optimizations can fix this
  • 26. Why peaks are bad ◦ Not so bad in normal use cases ▫ If peaks occur rarely ◦ Bad enough in clustered reads ◦ Decreases times for other parts in our Moment Scoring Pipeline
  • 30. Fix is to move to Off Heap for LRU cache
  • 31. Off Heap Block Cache ◦ An array of byte buffers (4MB size) ◦ Offset based free space management ◦ Re-use the buffers by overwriting ◦ HBaseCon Talk at 3:10-3:50pm
  • 32. Off Heap Advantages ◦ Can scale to higher memory ▫ Reserving less for promotion failures ◦ Potentially could be on SSDs/NVMes ▫ Allows us to use more denser boxes
  • 34. Work for moving Off Heap ◦ HBase 1.0 copies data onto Heap ◦ Leads to too much Garbage ▫ GCing once every 2 - 3 secs
  • 35. Work for moving Off Heap ◦ HBase 2.0 fixes this ▫ HBASE-11425 ◦ Pulled patches from upstream on 1.1 ◦ Encountered a few issues ▫ HBASE-15064, HBASE-15525 . . .
  • 36. What about Young GC ? ◦ Any GC time above your SLA is bad ◦ Hard to see this with Yammer metrics ▫ Sliding Window smoothing ▫ Eliminates peaks in percentiles ◦ Use histograms without Averaging ▫ HDRHistogram / HBase-2.0 Fast Histogram ...
  • 37. What about Young GC ? HDR Histogram Yammer Histogram
  • 38. Fixing measurements ? More (precise) metrics ◦ Percentiles are confusing ▫ Very hard to reason sometimes ◦ Used SLA based violation counts ▫ Ex:- Time Bucketed counts
  • 40. How to fix Young GC ? ◦ Tried to get GC pause times << SLA ◦ Not possible with current heap sizes ◦ Need RS with smaller heaps ▫ Less promotion work ▫ Less Young cleanup work
  • 41. How to fix Young GC ? ◦ Have to run a lot of RegionServers ▫ Commodity servers are multi core now with large RAM ◦ Slider makes this easier ◦ Load Balancing issue
  • 42. How to fix Young GC ? ◦ Smaller GC pauses => more freq GCs ◦ Need to reduce garbage gen. also
  • 43. How to fix Young GC ? Reducing Garbage generation ◦ Memstore / ConcurrentSkipList oppty. ◦ To use or not use Data Block Encoding ◦ Compress / Decompress Opts. ◦ Misc….
  • 44. How to fix Young GC ? Results
  • 45. How to fix Young GC ? Results
  • 48. Processing Times ◦ Huge bump between 95 & 99 percs ◦ Cache hit ratio 95 % ◦ We are going to disks for these
  • 49. How can we fix this gap? 1. Increase cache hit ratio 2. Make disk reads faster
  • 51. Increasing Cache Hit Ratio Using NVME cards ◦ ~ SSD higher throughput due to PCIe ◦ Support already in Bucket Cache ◦ Cost effective w.r.t RAM ▫ RAM ~ $10 per GB, NVMe ~ $1 per GB
  • 52. Disk throughputs Exploring move to SSDs ◦ SSDs cost ~ SAS disks costs ▫ Depends on SSD grade ▫ Including SAS backplane costs ◦ HDFS can store 1 replica in SSDs, other 2 in HDDs
  • 55. Newer SLA Requirements ◦ Older single read SLA is not enough ▫ 98% translate to 90% in newer model ◦ Top two areas of improvements ▫ Garbage Collection in JVM ▫ Reads going to Disks
  • 56. How to fix Young GC ? RS with 14GB heap pauses < 10ms SLA violation counts
  • 57.
  • 58. How to fix Young GC ? Results (sunday)
  • 59. How to fix Young GC ? Results (sunday)