SlideShare a Scribd company logo
HBase @ HubSpot
Multitenancy
●
●
●
What does Multitenancy Mean?
●
●
●
Benefits of Multitenancy
Identifying Bad Actors
●
●
●
Our Tool: HBasetracing
●
●
●
●
Ad-hoc Querying with HBasetracing
●
●
●
HBasetracing Roll-up
Example Incident
Dealing with Bad Actors
●
●
●
●
Quotas
●
●
●
HADOOP_USER_NAME
Deploying Quotas
●
○
○
●
When Quotas Help
Remember this?
●
●
●
When Quotas Fall Flat
●
●
Detention Queues
●
The Dream
Handling Failure &
Managing Risk
●
●
●
Read Replicas
●
● Consistency.TIMELINE
● isStale()
Read Replica Usage
●
●
Read Replica Timeout Settings
●
●
●
Read Replica Limitations
●
●
●
Cluster Replication
●
●
●
Failover Client
●
●
●
@StaleReadOnly Annotation
Monitoring
●
●
●
●
●
● next()
●
●
●
●
●
●
●
●
●
G1GC:
Making it work with HBase
Why G1GC?
● Designed for large heaps.
○ Divides heap into many smaller G1 regions.
○ G1 regions scanned and collected independently.
● Instead of occasional very long pauses,
G1GC has more frequent, shorter pauses.
If tuned properly, G1GC can provide performant GC
that scales well for large RegionServer heaps.
The Need for Tuning
Out of the box, G1GC hurt our HBase
clusters’ performance:
● Too much time spent in GC pauses.
● Occasional very long GC pauses.
● “To-space Exhaustion”, leading to Full GCs,
which led to slow RegionServer deaths.
Solving Multi-tenancy and G1GC in Apache HBase
●
●
●
●
Recommended Defaults
Important Metrics for Tuning
● G1GC Eden & Tenured size.
○ GC logs: “[Eden: … Survivors: … Heap: …]”
● HBase memory used by Memstore.
○ RegionServer JMX: “memStoreSize”
● HBase memory used by Block Cache.
○ RegionServer JMX: “blockCacheSize”
● HBase memory used by “static index”.
○ RegionServer JMX: “staticIndexSize”
Necessary Tuning Params
● JVM args:
-Xms, -Xmx
-XX:G1NewSizePercent
-XX:InitiatingHeapOccupancyPercent (aka “IHOP”)
● HBase configs (hbase-site.xml):
hfile.block.cache.size
hbase.regionserver.global.memstore.size
Necessary Tuning: Method
A. Find max block cache size, memstore size,
and static index size from the past month.
B. Sum 110% of (A) maxes, add heap waste.
C. Set IHOP and heap size such that Initiating
Heap Occupancy > (B) by at least 10% heap.
D. Ensure IHOP + G1NewSizePercent < 90%.
– 90% = 100% - G1ReservePercent (default 10)
Necessary Tuning: cont.
In hbase-site.xml:
● Set hfile.block.cache.size ratio value to 110%
max block cache size from the past month.
● Set hbase.regionserver.global.memstore.size
ratio value to 110% max Memstore size from
the past month.
Solving Multi-tenancy and G1GC in Apache HBase
Solving Multi-tenancy and G1GC in Apache HBase
Further Tuning & Considerations
● -XX:G1ReservePercent
○ Accommodating for burst-y usage.
● -XX:G1HeapRegionSize
○ Reducing occurrence of humongous objects.
○ Reducing long tail of slow GCs in some cases.
● -XX:G1NewSizePercent
○ Tuning individual pause time vs. % time in GC.
HBase Usage & Tuning Limits
A Full GC isn’t necessarily G1GC’s fault. There’s
a level of “bad usage” that’s unreasonable to
tune around:
● Unexpected, excessively burst-y traffic.
● Too many/enormous Humongous objects.
In either of these cases, the real solution is to
fix the client code.
Usage Note: Caching isn’t Free!
Yellow: % time spent in Mixed GC (left axis) | Blue: block cache churn, MB/sec (right axis)
...to Summarize:
● Tune heap size, IHOP, & HBase memory
caps based on HBase memory usage.
● Tune Eden size based on % time in GC &
average Young GC pause times.
● Make adjustments as needed, based on
cluster usage.
● Look for suboptimal usage in your HBase
clients to further improve HBase GC.
Links & Reference
Blog Post —  http://bit.ly/hbasegc
G1GC CollectD Plugin — http://bit.ly/collectdgc
G1GC Log Visualizer — http://bit.ly/gclogviz

More Related Content

What's hot (20)

PPTX
Jvm tuning for low latency application & Cassandra
Quentin Ambard
 
PPTX
Update on OpenTSDB and AsyncHBase
HBaseCon
 
PDF
HBaseCon2017 gohbase: Pure Go HBase Client
HBaseCon
 
PDF
HBaseCon2017 HBase at Xiaomi
HBaseCon
 
PDF
Accordion HBaseCon 2017
Edward Bortnikov
 
PPTX
Exactly once with spark streaming
Quentin Ambard
 
PPTX
HBaseCon 2013: OpenTSDB at Box
Cloudera, Inc.
 
PDF
OpenTSDB for monitoring @ Criteo
Nathaniel Braun
 
PDF
hbaseconasia2017: Building online HBase cluster of Zhihu based on Kubernetes
HBaseCon
 
PPTX
G1GC
koji lin
 
PDF
Couchbase live 2016
Pierre Mavro
 
PDF
Scalability broad strokes
Gagan Bajpai
 
PPT
Taming Java Garbage Collector
Daya Atapattu
 
PPTX
Update on OpenTSDB and AsyncHBase
HBaseCon
 
PDF
Cassandra Community Webinar | Practice Makes Perfect: Extreme Cassandra Optim...
DataStax
 
PDF
HBaseCon2017 Improving HBase availability in a multi tenant environment
HBaseCon
 
PDF
Taskerman: A Distributed Cluster Task Manager
Raghavendra Prabhu
 
PDF
HBaseConAsia2018 Track1-2: WALLess HBase with persistent memory devices
Michael Stack
 
PDF
10 things i wish i'd known before using spark in production
Paris Data Engineers !
 
PDF
Gnocchi v3
Gordon Chung
 
Jvm tuning for low latency application & Cassandra
Quentin Ambard
 
Update on OpenTSDB and AsyncHBase
HBaseCon
 
HBaseCon2017 gohbase: Pure Go HBase Client
HBaseCon
 
HBaseCon2017 HBase at Xiaomi
HBaseCon
 
Accordion HBaseCon 2017
Edward Bortnikov
 
Exactly once with spark streaming
Quentin Ambard
 
HBaseCon 2013: OpenTSDB at Box
Cloudera, Inc.
 
OpenTSDB for monitoring @ Criteo
Nathaniel Braun
 
hbaseconasia2017: Building online HBase cluster of Zhihu based on Kubernetes
HBaseCon
 
G1GC
koji lin
 
Couchbase live 2016
Pierre Mavro
 
Scalability broad strokes
Gagan Bajpai
 
Taming Java Garbage Collector
Daya Atapattu
 
Update on OpenTSDB and AsyncHBase
HBaseCon
 
Cassandra Community Webinar | Practice Makes Perfect: Extreme Cassandra Optim...
DataStax
 
HBaseCon2017 Improving HBase availability in a multi tenant environment
HBaseCon
 
Taskerman: A Distributed Cluster Task Manager
Raghavendra Prabhu
 
HBaseConAsia2018 Track1-2: WALLess HBase with persistent memory devices
Michael Stack
 
10 things i wish i'd known before using spark in production
Paris Data Engineers !
 
Gnocchi v3
Gordon Chung
 

Similar to Solving Multi-tenancy and G1GC in Apache HBase (20)

PDF
Mastering GC.pdf
Jean-Philippe BEMPEL
 
PDF
Large-Scale, Semi-Automated Go Garbage Collection Tuning at Uber
ScyllaDB
 
PDF
Taming Go's Memory Usage — and Avoiding a Rust Rewrite
ScyllaDB
 
PDF
Memory Bandwidth QoS
Rohit Jnagal
 
PDF
hbaseconasia2019 Further GC optimization for HBase 2.x: Reading HFileBlock in...
Michael Stack
 
PDF
The Future of zHeap
EDB
 
PDF
The Dark Side Of Go -- Go runtime related problems in TiDB in production
PingCAP
 
ODP
The Ruby GC is your friend!
sdwolf
 
PPTX
Fixing Cinder Quotas - Update
Gorka Eguileor
 
PDF
SOLR Power FTW: short version
Alex Pinkin
 
PDF
Streaming millions of Contact Center interactions in (near) real-time with Pu...
Frank Kelly
 
PDF
Streaming Millions of Contact Center Interactions in (Near) Real-Time with Pu...
StreamNative
 
ODP
Hotspot gc
Michał Warecki
 
PDF
Consistent hashing algorithmic tradeoffs
Evan Lin
 
PPTX
Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...
Monica Beckwith
 
PDF
LCU14 201- Binary Analysis Tools
Linaro
 
PDF
Yarn optimization (Real life use case)
Jean-Louis Quéguiner
 
PDF
Security sizing meetup
Daliya Spasova
 
PDF
MySQL configuration - The most important Variables
FromDual GmbH
 
PDF
Software Profiling: Java Performance, Profiling and Flamegraphs
Isuru Perera
 
Mastering GC.pdf
Jean-Philippe BEMPEL
 
Large-Scale, Semi-Automated Go Garbage Collection Tuning at Uber
ScyllaDB
 
Taming Go's Memory Usage — and Avoiding a Rust Rewrite
ScyllaDB
 
Memory Bandwidth QoS
Rohit Jnagal
 
hbaseconasia2019 Further GC optimization for HBase 2.x: Reading HFileBlock in...
Michael Stack
 
The Future of zHeap
EDB
 
The Dark Side Of Go -- Go runtime related problems in TiDB in production
PingCAP
 
The Ruby GC is your friend!
sdwolf
 
Fixing Cinder Quotas - Update
Gorka Eguileor
 
SOLR Power FTW: short version
Alex Pinkin
 
Streaming millions of Contact Center interactions in (near) real-time with Pu...
Frank Kelly
 
Streaming Millions of Contact Center Interactions in (Near) Real-Time with Pu...
StreamNative
 
Hotspot gc
Michał Warecki
 
Consistent hashing algorithmic tradeoffs
Evan Lin
 
Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...
Monica Beckwith
 
LCU14 201- Binary Analysis Tools
Linaro
 
Yarn optimization (Real life use case)
Jean-Louis Quéguiner
 
Security sizing meetup
Daliya Spasova
 
MySQL configuration - The most important Variables
FromDual GmbH
 
Software Profiling: Java Performance, Profiling and Flamegraphs
Isuru Perera
 
Ad

More from HBaseCon (20)

PDF
hbaseconasia2017: HBase on Beam
HBaseCon
 
PDF
hbaseconasia2017: HBase Disaster Recovery Solution at Huawei
HBaseCon
 
PDF
hbaseconasia2017: Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon
 
PDF
hbaseconasia2017: HareQL:快速HBase查詢工具的發展過程
HBaseCon
 
PDF
hbaseconasia2017: Apache HBase at Netease
HBaseCon
 
PDF
hbaseconasia2017: HBase在Hulu的使用和实践
HBaseCon
 
PDF
hbaseconasia2017: 基于HBase的企业级大数据平台
HBaseCon
 
PDF
hbaseconasia2017: HBase at JD.com
HBaseCon
 
PDF
hbaseconasia2017: Large scale data near-line loading method and architecture
HBaseCon
 
PDF
hbaseconasia2017: Ecosystems with HBase and CloudTable service at Huawei
HBaseCon
 
PDF
hbaseconasia2017: hbase-2.0.0
HBaseCon
 
PDF
HBaseCon2017 Democratizing HBase
HBaseCon
 
PDF
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon
 
PDF
HBaseCon2017 Quanta: Quora's hierarchical counting system on HBase
HBaseCon
 
PDF
HBaseCon2017 Transactions in HBase
HBaseCon
 
PDF
HBaseCon2017 Highly-Available HBase
HBaseCon
 
PDF
HBaseCon2017 Apache HBase at Didi
HBaseCon
 
PDF
HBaseCon2017 Spark HBase Connector: Feature Rich and Efficient Access to HBas...
HBaseCon
 
PDF
HBaseCon2017 Efficient and portable data processing with Apache Beam and HBase
HBaseCon
 
PDF
HBaseCon2017 HBase/Phoenix @ Scale @ Salesforce
HBaseCon
 
hbaseconasia2017: HBase on Beam
HBaseCon
 
hbaseconasia2017: HBase Disaster Recovery Solution at Huawei
HBaseCon
 
hbaseconasia2017: Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon
 
hbaseconasia2017: HareQL:快速HBase查詢工具的發展過程
HBaseCon
 
hbaseconasia2017: Apache HBase at Netease
HBaseCon
 
hbaseconasia2017: HBase在Hulu的使用和实践
HBaseCon
 
hbaseconasia2017: 基于HBase的企业级大数据平台
HBaseCon
 
hbaseconasia2017: HBase at JD.com
HBaseCon
 
hbaseconasia2017: Large scale data near-line loading method and architecture
HBaseCon
 
hbaseconasia2017: Ecosystems with HBase and CloudTable service at Huawei
HBaseCon
 
hbaseconasia2017: hbase-2.0.0
HBaseCon
 
HBaseCon2017 Democratizing HBase
HBaseCon
 
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon
 
HBaseCon2017 Quanta: Quora's hierarchical counting system on HBase
HBaseCon
 
HBaseCon2017 Transactions in HBase
HBaseCon
 
HBaseCon2017 Highly-Available HBase
HBaseCon
 
HBaseCon2017 Apache HBase at Didi
HBaseCon
 
HBaseCon2017 Spark HBase Connector: Feature Rich and Efficient Access to HBas...
HBaseCon
 
HBaseCon2017 Efficient and portable data processing with Apache Beam and HBase
HBaseCon
 
HBaseCon2017 HBase/Phoenix @ Scale @ Salesforce
HBaseCon
 
Ad

Recently uploaded (20)

PDF
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PPTX
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PPTX
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 

Solving Multi-tenancy and G1GC in Apache HBase