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

PDF
Solving Multi-tenancy and G1GC in Apache HBase
PDF
hbaseconasia2017: HBase Practice At XiaoMi
PDF
Tales from Taming the Long Tail
PPTX
Keynote: Apache HBase at Yahoo! Scale
PDF
Thanos - Prometheus on Scale
PDF
OpenTSDB: HBaseCon2017
PPTX
Monitoring MySQL with OpenTSDB
PPTX
Jvm & Garbage collection tuning for low latencies application
Solving Multi-tenancy and G1GC in Apache HBase
hbaseconasia2017: HBase Practice At XiaoMi
Tales from Taming the Long Tail
Keynote: Apache HBase at Yahoo! Scale
Thanos - Prometheus on Scale
OpenTSDB: HBaseCon2017
Monitoring MySQL with OpenTSDB
Jvm & Garbage collection tuning for low latencies application

What's hot (20)

PPTX
Jvm tuning for low latency application & Cassandra
PPTX
Update on OpenTSDB and AsyncHBase
PDF
HBaseCon2017 gohbase: Pure Go HBase Client
PDF
HBaseCon2017 HBase at Xiaomi
PDF
Accordion HBaseCon 2017
PPTX
Exactly once with spark streaming
PPTX
HBaseCon 2013: OpenTSDB at Box
PDF
OpenTSDB for monitoring @ Criteo
PDF
hbaseconasia2017: Building online HBase cluster of Zhihu based on Kubernetes
PPTX
G1GC
PDF
Couchbase live 2016
PDF
Scalability broad strokes
PPT
Taming Java Garbage Collector
PPTX
Update on OpenTSDB and AsyncHBase
PDF
Cassandra Community Webinar | Practice Makes Perfect: Extreme Cassandra Optim...
PDF
HBaseCon2017 Improving HBase availability in a multi tenant environment
PDF
Taskerman: A Distributed Cluster Task Manager
PDF
HBaseConAsia2018 Track1-2: WALLess HBase with persistent memory devices
PDF
10 things i wish i'd known before using spark in production
PDF
Gnocchi v3
Jvm tuning for low latency application & Cassandra
Update on OpenTSDB and AsyncHBase
HBaseCon2017 gohbase: Pure Go HBase Client
HBaseCon2017 HBase at Xiaomi
Accordion HBaseCon 2017
Exactly once with spark streaming
HBaseCon 2013: OpenTSDB at Box
OpenTSDB for monitoring @ Criteo
hbaseconasia2017: Building online HBase cluster of Zhihu based on Kubernetes
G1GC
Couchbase live 2016
Scalability broad strokes
Taming Java Garbage Collector
Update on OpenTSDB and AsyncHBase
Cassandra Community Webinar | Practice Makes Perfect: Extreme Cassandra Optim...
HBaseCon2017 Improving HBase availability in a multi tenant environment
Taskerman: A Distributed Cluster Task Manager
HBaseConAsia2018 Track1-2: WALLess HBase with persistent memory devices
10 things i wish i'd known before using spark in production
Gnocchi v3
Ad

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

PDF
Mastering GC.pdf
PDF
Large-Scale, Semi-Automated Go Garbage Collection Tuning at Uber
PDF
Taming Go's Memory Usage — and Avoiding a Rust Rewrite
PDF
Memory Bandwidth QoS
PDF
hbaseconasia2019 Further GC optimization for HBase 2.x: Reading HFileBlock in...
PDF
The Future of zHeap
 
PDF
The Dark Side Of Go -- Go runtime related problems in TiDB in production
ODP
The Ruby GC is your friend!
PPTX
Fixing Cinder Quotas - Update
PDF
SOLR Power FTW: short version
PDF
Streaming millions of Contact Center interactions in (near) real-time with Pu...
PDF
Streaming Millions of Contact Center Interactions in (Near) Real-Time with Pu...
ODP
Hotspot gc
PDF
Consistent hashing algorithmic tradeoffs
PPTX
Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...
PDF
LCU14 201- Binary Analysis Tools
PDF
Yarn optimization (Real life use case)
PDF
Security sizing meetup
PDF
MySQL configuration - The most important Variables
PDF
Software Profiling: Java Performance, Profiling and Flamegraphs
Mastering GC.pdf
Large-Scale, Semi-Automated Go Garbage Collection Tuning at Uber
Taming Go's Memory Usage — and Avoiding a Rust Rewrite
Memory Bandwidth QoS
hbaseconasia2019 Further GC optimization for HBase 2.x: Reading HFileBlock in...
The Future of zHeap
 
The Dark Side Of Go -- Go runtime related problems in TiDB in production
The Ruby GC is your friend!
Fixing Cinder Quotas - Update
SOLR Power FTW: short version
Streaming millions of Contact Center interactions in (near) real-time with Pu...
Streaming Millions of Contact Center Interactions in (Near) Real-Time with Pu...
Hotspot gc
Consistent hashing algorithmic tradeoffs
Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...
LCU14 201- Binary Analysis Tools
Yarn optimization (Real life use case)
Security sizing meetup
MySQL configuration - The most important Variables
Software Profiling: Java Performance, Profiling and Flamegraphs
Ad

More from HBaseCon (20)

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

Recently uploaded (20)

PDF
System and Network Administraation Chapter 3
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
L1 - Introduction to python Backend.pptx
PPTX
ai tools demonstartion for schools and inter college
PPTX
Introduction to Artificial Intelligence
PDF
Digital Strategies for Manufacturing Companies
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
System and Network Administraation Chapter 3
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Softaken Excel to vCard Converter Software.pdf
L1 - Introduction to python Backend.pptx
ai tools demonstartion for schools and inter college
Introduction to Artificial Intelligence
Digital Strategies for Manufacturing Companies
Operating system designcfffgfgggggggvggggggggg
Design an Analysis of Algorithms I-SECS-1021-03
Navsoft: AI-Powered Business Solutions & Custom Software Development
How to Migrate SBCGlobal Email to Yahoo Easily
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Reimagine Home Health with the Power of Agentic AI​
Design an Analysis of Algorithms II-SECS-1021-03
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Adobe Illustrator 28.6 Crack My Vision of Vector Design
VVF-Customer-Presentation2025-Ver1.9.pptx
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...

Solving Multi-tenancy and G1GC in Apache HBase