SlideShare uma empresa Scribd logo
1 de 14
Baixar para ler offline
HBase Off heaping
Anoop Sam John (Intel)
Ramkrishna S Vasudevan (Intel)
2
HBase Cache
▪HBase Cache for better read performance
–Keep data local to the process
▪L1 on heap LRU Cache
–Larger Cache Sizes => Larger Java Heap => GC issues
▪L2 Bucket Cache
–LRU
–Backed by off heap memory / File
–Can be larger than L1 allocation
–Not constrained by Java Heap Size
Bucket Cache - Reads
3
▪ Read block by block
▪ On heap block copy
▪ Less throughput vs L1
▪ GC Impacts
▪ Predictable latency problems
Region1
Region2
Read request
Read request
RegionServer
Scanner layers
Scanner layers
On heap
Block
Off heap Bucket Cache
Java ByteBuffer
Bucket slot
On heap
Block
Bucket Cache – Optimized Off heap Reads
4
▪ Delivers data directly from off
heap cache
▪ Less Heap needed
▪ Better throughput
▪ Predictable latency
▪ Jira # HBASE-11425
▪ Available in HBase 2.0
Region1
Region2
Read request
RegionServer
Off heap Bucket Cache
Refcount
Scanner layers
Scanner layers
callback
callback
Refcount
Java ByteBuffer
5
Alibaba : Old Performance Data With L2 Cache
▪ From A/B test cluster with 400+ nodes and on simulated data
▪ 12 GB off heap L2 cache
▪ Inconsistent throughput. Dips in latency
▪ HBase read from L2 does data copy to on heap
– More garbage and GC workload
6
Performance Data After Off heaping read path
▪ Backported patches to hbase-1.2 based codebase
▪ Average throughput improved from 18 to 25 million QPS – 30% improvement
▪ Linear throughput. Predictable latency.
▪ In production since Oct 2016
▪ Used in 2016 Singles’ Day, with peaks at 100K QPS per single RegionServer
Store
7
HBase Writes
▪Accumulate cells in memstore
–Default flushes at size >= 128 MB
▪Global memstore heap size
– Defaults to 40% of Xmx
▪MSLAB Chunks & Pool
– On heap Chunks of 2 MB
– Cells in memstore have data copied
over to chunks
– Reduce fragmentation
– Pool to Reuse chunks
v
RegionServer
Region 1
Region N
MSLAB Chunk Pool
memstorememstore
memstore
chunkchunk chunk
8
Write path Offheaping
▪ HBASE-15179 In HBase 2.0
▪ Reading request data into reusable off heap ByteBuffers
– ByteBuffer pool. Response Cell blocks already use this
– Using the same off heap ByteBuffers – Each of 64 KB size
– Reduce garbage and GC
– Usage of off heap avoid temp off heap copy in NIO.
▪ Protobuf upgrade
– PB 3.x latest version support off heap ByteBuffers throughout
– Shaded PB jars to avoid possible version conflict
– New PB ByteStream to work over 1 or more Off heap ByteBuffers
9
Write path Offheaping
▪ HBASE-15179
▪ Off heap MSLAB Chunk Pool
– 2 MB off heap chunks
– Global off heap memstore size – New config
hbase.regionserver.offheap.global.memstore
.size
– Separation of Cell data size, heap overhead
size tracking
– Region flush decision on cell size alone (128
MB default flush decision)
– Global level checking with data size and
heap overhead
v
RegionServer
Region 1
Region N
Off heap MSLAB Chunk Pool
memstorememstore
memstore
chunkchunk chunk
10
Write path Offheaping – Performance results
▪ Performance Evaluation tool
– 200 regions – Single node
– 3 cells per row
– 300 bytes value size / cell
– 100 GB data write
– G1GC
– 65% IHOP
– On heap tests
– 40 GB max heap
– 60% Global memstore size
– MSLAB pool 100%
– Off heap tests
– 24 GB global off heap memstores
(60% of 40 GB)
– 16 GB max heap
0
50000
100000
150000
200000
250000
300000
350000
10 25 50 75 100
Throughput
Threads
Off heap vs on heap write avg throughput
offheap
onheap
▪ 6% - 22% avg throughput gain
Accordion: Compacting memstore
Active Segment
HFile
Immutable Segment
Immutable Segment
Immutable Segment
HFile
Compacting
MemStore
Flush
Put Get/Scan
Compaction
RAM
Disk
12
Write path Offheaping – Performance results
▪ Off heap with Compacting memstore
– In memory flushes/flattening reduces heap
overhead.
– Allow memstore to grow bigger
– Off heap MSLAB pool with compacting
memstores perform the best.
▪ PE Tool – 50 threads and writing 25GB
0
50000
100000
150000
200000
250000
300000
350000
400000
450000
100 500 1024
AvgThroughput
Value Size per Cell
On heap
On heap+ Compacting
Memstore
On heap+ Compacting
Memstore + MSLAB off
offheap +Compacting
Memstore
13
 References
● https://blogs.apache.org/hbase/
● https://blogs.apache.org/hbase/entry/offheaping_the_read_path_in
Questions?
hbaseconasia2017: HBase Offheaping

Mais conteúdo relacionado

Mais de HBaseCon

hbaseconasia2017: HBase at JD.com
hbaseconasia2017: HBase at JD.comhbaseconasia2017: HBase at JD.com
hbaseconasia2017: HBase at JD.comHBaseCon
 
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 architectureHBaseCon
 
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 HuaweiHBaseCon
 
hbaseconasia2017: HBase Practice At XiaoMi
hbaseconasia2017: HBase Practice At XiaoMihbaseconasia2017: HBase Practice At XiaoMi
hbaseconasia2017: HBase Practice At XiaoMiHBaseCon
 
hbaseconasia2017: hbase-2.0.0
hbaseconasia2017: hbase-2.0.0hbaseconasia2017: hbase-2.0.0
hbaseconasia2017: hbase-2.0.0HBaseCon
 
HBaseCon2017 Democratizing HBase
HBaseCon2017 Democratizing HBaseHBaseCon2017 Democratizing HBase
HBaseCon2017 Democratizing HBaseHBaseCon
 
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 PinterestHBaseCon
 
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 HBaseHBaseCon
 
HBaseCon2017 Transactions in HBase
HBaseCon2017 Transactions in HBaseHBaseCon2017 Transactions in HBase
HBaseCon2017 Transactions in HBaseHBaseCon
 
HBaseCon2017 Highly-Available HBase
HBaseCon2017 Highly-Available HBaseHBaseCon2017 Highly-Available HBase
HBaseCon2017 Highly-Available HBaseHBaseCon
 
HBaseCon2017 Apache HBase at Didi
HBaseCon2017 Apache HBase at DidiHBaseCon2017 Apache HBase at Didi
HBaseCon2017 Apache HBase at DidiHBaseCon
 
HBaseCon2017 gohbase: Pure Go HBase Client
HBaseCon2017 gohbase: Pure Go HBase ClientHBaseCon2017 gohbase: Pure Go HBase Client
HBaseCon2017 gohbase: Pure Go HBase ClientHBaseCon
 
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
 
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 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 HBaseHBaseCon
 
HBaseCon2017 HBase at Xiaomi
HBaseCon2017 HBase at XiaomiHBaseCon2017 HBase at Xiaomi
HBaseCon2017 HBase at XiaomiHBaseCon
 
HBaseCon2017 HBase/Phoenix @ Scale @ Salesforce
HBaseCon2017 HBase/Phoenix @ Scale @ SalesforceHBaseCon2017 HBase/Phoenix @ Scale @ Salesforce
HBaseCon2017 HBase/Phoenix @ Scale @ SalesforceHBaseCon
 
HBaseCon2017 Community-Driven Graphs with JanusGraph
HBaseCon2017 Community-Driven Graphs with JanusGraphHBaseCon2017 Community-Driven Graphs with JanusGraph
HBaseCon2017 Community-Driven Graphs with JanusGraphHBaseCon
 
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 ...HBaseCon
 
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...HBaseCon
 

Mais de HBaseCon (20)

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 Practice At XiaoMi
hbaseconasia2017: HBase Practice At XiaoMihbaseconasia2017: HBase Practice At XiaoMi
hbaseconasia2017: HBase Practice At XiaoMi
 
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 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
 
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
 
HBaseCon2017 Transactions in HBase
HBaseCon2017 Transactions in HBaseHBaseCon2017 Transactions in HBase
HBaseCon2017 Transactions in HBase
 
HBaseCon2017 Highly-Available HBase
HBaseCon2017 Highly-Available HBaseHBaseCon2017 Highly-Available HBase
HBaseCon2017 Highly-Available HBase
 
HBaseCon2017 Apache HBase at Didi
HBaseCon2017 Apache HBase at DidiHBaseCon2017 Apache HBase at Didi
HBaseCon2017 Apache HBase at Didi
 
HBaseCon2017 gohbase: Pure Go HBase Client
HBaseCon2017 gohbase: Pure Go HBase ClientHBaseCon2017 gohbase: Pure Go HBase Client
HBaseCon2017 gohbase: Pure Go HBase Client
 
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
 
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 at Xiaomi
HBaseCon2017 HBase at XiaomiHBaseCon2017 HBase at Xiaomi
HBaseCon2017 HBase at Xiaomi
 
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...
 

Último

Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 

Último (20)

Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 

hbaseconasia2017: HBase Offheaping

  • 1. HBase Off heaping Anoop Sam John (Intel) Ramkrishna S Vasudevan (Intel)
  • 2. 2 HBase Cache ▪HBase Cache for better read performance –Keep data local to the process ▪L1 on heap LRU Cache –Larger Cache Sizes => Larger Java Heap => GC issues ▪L2 Bucket Cache –LRU –Backed by off heap memory / File –Can be larger than L1 allocation –Not constrained by Java Heap Size
  • 3. Bucket Cache - Reads 3 ▪ Read block by block ▪ On heap block copy ▪ Less throughput vs L1 ▪ GC Impacts ▪ Predictable latency problems Region1 Region2 Read request Read request RegionServer Scanner layers Scanner layers On heap Block Off heap Bucket Cache Java ByteBuffer Bucket slot On heap Block
  • 4. Bucket Cache – Optimized Off heap Reads 4 ▪ Delivers data directly from off heap cache ▪ Less Heap needed ▪ Better throughput ▪ Predictable latency ▪ Jira # HBASE-11425 ▪ Available in HBase 2.0 Region1 Region2 Read request RegionServer Off heap Bucket Cache Refcount Scanner layers Scanner layers callback callback Refcount Java ByteBuffer
  • 5. 5 Alibaba : Old Performance Data With L2 Cache ▪ From A/B test cluster with 400+ nodes and on simulated data ▪ 12 GB off heap L2 cache ▪ Inconsistent throughput. Dips in latency ▪ HBase read from L2 does data copy to on heap – More garbage and GC workload
  • 6. 6 Performance Data After Off heaping read path ▪ Backported patches to hbase-1.2 based codebase ▪ Average throughput improved from 18 to 25 million QPS – 30% improvement ▪ Linear throughput. Predictable latency. ▪ In production since Oct 2016 ▪ Used in 2016 Singles’ Day, with peaks at 100K QPS per single RegionServer
  • 7. Store 7 HBase Writes ▪Accumulate cells in memstore –Default flushes at size >= 128 MB ▪Global memstore heap size – Defaults to 40% of Xmx ▪MSLAB Chunks & Pool – On heap Chunks of 2 MB – Cells in memstore have data copied over to chunks – Reduce fragmentation – Pool to Reuse chunks v RegionServer Region 1 Region N MSLAB Chunk Pool memstorememstore memstore chunkchunk chunk
  • 8. 8 Write path Offheaping ▪ HBASE-15179 In HBase 2.0 ▪ Reading request data into reusable off heap ByteBuffers – ByteBuffer pool. Response Cell blocks already use this – Using the same off heap ByteBuffers – Each of 64 KB size – Reduce garbage and GC – Usage of off heap avoid temp off heap copy in NIO. ▪ Protobuf upgrade – PB 3.x latest version support off heap ByteBuffers throughout – Shaded PB jars to avoid possible version conflict – New PB ByteStream to work over 1 or more Off heap ByteBuffers
  • 9. 9 Write path Offheaping ▪ HBASE-15179 ▪ Off heap MSLAB Chunk Pool – 2 MB off heap chunks – Global off heap memstore size – New config hbase.regionserver.offheap.global.memstore .size – Separation of Cell data size, heap overhead size tracking – Region flush decision on cell size alone (128 MB default flush decision) – Global level checking with data size and heap overhead v RegionServer Region 1 Region N Off heap MSLAB Chunk Pool memstorememstore memstore chunkchunk chunk
  • 10. 10 Write path Offheaping – Performance results ▪ Performance Evaluation tool – 200 regions – Single node – 3 cells per row – 300 bytes value size / cell – 100 GB data write – G1GC – 65% IHOP – On heap tests – 40 GB max heap – 60% Global memstore size – MSLAB pool 100% – Off heap tests – 24 GB global off heap memstores (60% of 40 GB) – 16 GB max heap 0 50000 100000 150000 200000 250000 300000 350000 10 25 50 75 100 Throughput Threads Off heap vs on heap write avg throughput offheap onheap ▪ 6% - 22% avg throughput gain
  • 11. Accordion: Compacting memstore Active Segment HFile Immutable Segment Immutable Segment Immutable Segment HFile Compacting MemStore Flush Put Get/Scan Compaction RAM Disk
  • 12. 12 Write path Offheaping – Performance results ▪ Off heap with Compacting memstore – In memory flushes/flattening reduces heap overhead. – Allow memstore to grow bigger – Off heap MSLAB pool with compacting memstores perform the best. ▪ PE Tool – 50 threads and writing 25GB 0 50000 100000 150000 200000 250000 300000 350000 400000 450000 100 500 1024 AvgThroughput Value Size per Cell On heap On heap+ Compacting Memstore On heap+ Compacting Memstore + MSLAB off offheap +Compacting Memstore
  • 13. 13  References ● https://blogs.apache.org/hbase/ ● https://blogs.apache.org/hbase/entry/offheaping_the_read_path_in Questions?