SlideShare a Scribd company logo
HBaes The Difinitive Guide
Chapter 11 : Performance Tuning




                                  1
HBase The Definitive Guide
            http://shop.oreilly.com/product/0636920014348.do




                                                               2
chapter 11 : Performance Tuning

• Garbage Collection Tuning
• Memstore-Local Allocation Buffer
• Compression
• Optimizing Splits and Compactions
• Load Balancing
• Merging Regions
• Client API: Best Practices
• Configuration
• Load Tests




                                      3
Garbage Collection Tuning

• Young
          128MB   512MB
   ex. -XX:MaxNewSize=128m -XX:NewSize=128m            -Xmn128m

• Concurrent Mark-Sweep GC                               GC
   ex. -XX:+UseParNewGC and -XX:+UseConcMarkSweepGC

• Concurrent Mark-Sweep Collector (CMS)           GC


           70%         Concorrent Mark-Sweep GC

   ex. -XX:CMSInitiatingOccupancyFraction=70




                                                                  4
Memstore-Local Allocation Buffer

• HBase        Region                                                   Heap      fragmentation


• 0.90.0                                          MSLAB
                                                  Memstore            HDFS      flush
        MemStoreLAB
                                 hbase-site.xml
        hbase.hregion.memstore.mslab.enabled
        hbase.hregion.memstore.mslab.max.allocation
      0.90.2

•
      http://www.cloudera.com/blog/2011/02/avoiding-full-gcs-in-hbase-with-memstore-local-
    allocation-buffers-part-1/
      http://www.slideshare.net/cloudera/hbase-hug-presentation




                                                                                                  5
Compression

• HBase                                     GZIP LZO Snappy




•
                                             major_compact


• HBase        Snappy
    http://dayafterneet.blogspot.com/2011/09/hbasesnappy.html




                                                                6
Optimizing Splits and Compactions

• Split

                         split   major_compact
     hbase.hregion.max.filesize    region
                                           ex.100GB



• Region Hotspotting
          Region                                      Region Hotspotting
   Key
     Sequential    ID   NG
     Random              Key




                                                                           7
Presplitting Regions

•                  Region




                            8
Load Balancing

• Resion

     hbase.balancer.period
   balancer          hbase.balancer.max.balancing
   hbase.balancer.period                            balancer




                                                               9
Merging Regions

• Resion          Region   Merge




                                   10
Client API: Best Practices

• Java Client API
   Disable auto-flush
                                 flushCommits()
   Use scanner-caching
     scan                                NG
   Limit scan scope
             family
   Close ResultScanners
   Block cache usage
   Optimal loading of row keys
     filter
   Turn off WAL on Puts
                                   ...




                                                 11
Configuration

•               HBase
    Decrease ZooKeeper timeout        zookeeper.session.timeout   ↓
    Increase handlers      hbase.regionserver.handler.count   ↑
    Increase heap settings ↑
    Enable data compression
    Increase region size     hbase.hregion.max.filesize   ↑
    Adjust block cache size     hfile.block.cache.size
    Adjust memstore limits
      hbase.regionserver.global.memstore.upperLimit
      hbase.region server.global.memstore.lowerLimit
    Increase blocking store files     hbase.hstore.blockingStoreFiles   ↑
    Increase block multiplier    hbase.hregion.memstore.block.multiplier   ↑
    Decrease maximum logfiles        hbase.regionserver.maxlogs    ↓




                                                                               12
Load Tests

• HBase      PerformanceEvaluation Tool




• YCSB       Load Test
                   http://dayafterneet.blogspot.com/2011/08/ycsbhbasemongodb.html

                                                                                    13
Hadoop/HBase

    hbase-env.sh         HBASE_HEAPSIZE                                16384       2000        HRegionServer    Java Heap


    core-site.xml        fs.inmemory.size.mb                           200         75          fs   in-memory       (MB)

                                                                                               SequenceFile
                         io.file.buffer.size                           131072


    hdfs-site.xml        dfs.namenode.handler.count                    50          10          NameNode

                                                                                               DataNode
                         dfs.datanode.max.xcievers                     8192        256


    hbase-site.xml       hbase.regionserver.handler.count              50          10          RegionServer


                         hbase.hregion.max.filesize                    536870912   268435456   HFile

                                                                                               HFile       BlockCache
                         hfile.block.cache.size                        0.3         0.2
                                                                                                                (0.2!20%)
                                                                                               HStore
                         hbase.hstore.blockingStoreFiles               10          7
                                                                                               BlockingStoreFile

                         hbase.hregion.memstore.mslab.enabled          TRUE        FALSE       mslab


                         hbase.hregion.memstore.mslab.chunksize        2097152     2097152     mslab    chunksize


                         hbase.hregion.memstore.mslab.max.allocation   1024768     262144      mslab




※                HBase      Chapter.11
                                                                                                                            14
table


                                                               lookup   BloomFilter
BLOOMFILTER                        ROW            NONE
                                                         (NONE/ROW/ROWCOL)




COMPRESSION                        SNAPPY         NONE
                                                          NONE/GZ/LZO/SNAPPY)




IN_MEMORY                          true/false
                                                                                HDFS




※             HBase   Chapter.11
                                                                                       15
- 100 threads
※1,500,000 records                         HBase(100 threads - 15 nodes)
※qps(query per second)                     HBase(100 threads / in_memory - 15 nodes)

100000 qps
 90000 qps
 80000 qps                                 86914

 70000 qps
 60000 qps
 50000 qps
 40000 qps                                                        43630
 30000 qps
                                   28125
 20000 qps               24943
 10000 qps      12468                                     12542
     0 qps
                     insert           select                 delete




                                                                                  16
- 100 threads
※1,500,000 records                        HBase(100 threads - 15 nodes)
※latency μs                               HBase(100 threads / in_memory - 15 nodes)

 20000 μs
 18000 μs
 16000 μs                16786
 14000 μs
 12000 μs
               11943                                    11841
 10000 μs
  8000 μs
  6000 μs
                                   6059
  4000 μs
  2000 μs                                                       2651
     0 μs                                 1156
                     insert          select                 delete




                                                                                 17
thread                          (in_memory)

※1,500,000 records
※qps(query per second)
                                       100   200       300   400
                                       500   600       700
350000 qps
300000 qps
250000 qps
200000 qps
150000 qps
100000 qps
 50000 qps
     0 qps
                     insert   select               delete




                                                                   18
thread                          (not in_memory)

※1,500,000 records
※qps(query per second)
                                       100   200       300     400
                                       500   600       700
350000 qps
300000 qps
250000 qps
200000 qps
150000 qps
100000 qps
 50000 qps
     0 qps
                     insert   select               delete




                                                                     19

More Related Content

PDF
HBase Blockcache 101
PDF
Efficient Memory Mapped File I/O for In-Memory File Systems (HotStorage '17)
PDF
03 h base-2-installation_andshell
PDF
Deploying infrastructure with Opscode Chef
PDF
Meet HBase 1.0
PDF
Facebook keynote-nicolas-qcon
PDF
DPC2007 PHP And Oracle (Kuassi Mensah)
 
PDF
DPC2007 PDO (Lukas Kahwe Smith)
 
HBase Blockcache 101
Efficient Memory Mapped File I/O for In-Memory File Systems (HotStorage '17)
03 h base-2-installation_andshell
Deploying infrastructure with Opscode Chef
Meet HBase 1.0
Facebook keynote-nicolas-qcon
DPC2007 PHP And Oracle (Kuassi Mensah)
 
DPC2007 PDO (Lukas Kahwe Smith)
 

What's hot (18)

PDF
Memcached Code Camp 2009
PDF
DPC2007 MySQL Stored Routines for PHP Developers (Roland Bouman)
 
PDF
The Essential postgresql.conf
PDF
Moxi - Memcached Proxy
PPTX
Hadoop Summit 2012 | HBase Consistency and Performance Improvements
PDF
Mastering PostgreSQL Administration
 
ODP
Cassandra as Memcache
PPTX
Meet hbase 2.0
PPTX
Off-heaping the Apache HBase Read Path
PPTX
Scaling HBase for Big Data
PDF
NoSql Databases and Polyglot Applications
PDF
PostgreSQL Performance Tuning
PDF
Accelerating HBase with NVMe and Bucket Cache
PPTX
Operating and supporting HBase Clusters
PPTX
Digital Library Collection Management using HBase
PPTX
PostGreSQL Performance Tuning
PPTX
HBase Accelerated: In-Memory Flush and Compaction
PPTX
Using memcache to improve php performance
Memcached Code Camp 2009
DPC2007 MySQL Stored Routines for PHP Developers (Roland Bouman)
 
The Essential postgresql.conf
Moxi - Memcached Proxy
Hadoop Summit 2012 | HBase Consistency and Performance Improvements
Mastering PostgreSQL Administration
 
Cassandra as Memcache
Meet hbase 2.0
Off-heaping the Apache HBase Read Path
Scaling HBase for Big Data
NoSql Databases and Polyglot Applications
PostgreSQL Performance Tuning
Accelerating HBase with NVMe and Bucket Cache
Operating and supporting HBase Clusters
Digital Library Collection Management using HBase
PostGreSQL Performance Tuning
HBase Accelerated: In-Memory Flush and Compaction
Using memcache to improve php performance
Ad

Viewers also liked (6)

PDF
Hortonworks Technical Workshop: HBase and Apache Phoenix
PDF
HBase for Architects
PDF
Intro to HBase Internals & Schema Design (for HBase users)
PPTX
Introduction to Apache ZooKeeper
PDF
Intro to HBase
PPTX
Apache HBase Performance Tuning
Hortonworks Technical Workshop: HBase and Apache Phoenix
HBase for Architects
Intro to HBase Internals & Schema Design (for HBase users)
Introduction to Apache ZooKeeper
Intro to HBase
Apache HBase Performance Tuning
Ad

Similar to HBase本輪読会資料(11章) (20)

PDF
HBase 0.20.0 Performance Evaluation
PPTX
HBase: Extreme makeover
PPTX
HBaseCon 2015: HBase Performance Tuning @ Salesforce
PDF
支撑Facebook消息处理的h base存储系统
PDF
Facebook Messages & HBase
ODP
ODP
PPTX
006 performance tuningandclusteradmin
PPTX
HBase New Features
 
PDF
HBase: Extreme Makeover
PPTX
PPT
8a. How To Setup HBase with Docker
PDF
NoSQL 동향
PDF
HBase tales from the trenches
KEY
Whirr dev-up-puppetconf2011
PPTX
ApacheCon-HBase-2016
PPTX
Meet HBase 2.0
PPTX
Meet Apache HBase - 2.0
PPTX
Supporting Apache HBase : Troubleshooting and Supportability Improvements
HBase 0.20.0 Performance Evaluation
HBase: Extreme makeover
HBaseCon 2015: HBase Performance Tuning @ Salesforce
支撑Facebook消息处理的h base存储系统
Facebook Messages & HBase
006 performance tuningandclusteradmin
HBase New Features
 
HBase: Extreme Makeover
8a. How To Setup HBase with Docker
NoSQL 동향
HBase tales from the trenches
Whirr dev-up-puppetconf2011
ApacheCon-HBase-2016
Meet HBase 2.0
Meet Apache HBase - 2.0
Supporting Apache HBase : Troubleshooting and Supportability Improvements

More from moai kids (20)

PDF
中国最新ニュースアプリ事情
PDF
FluentdとRedshiftの素敵な関係
PDF
Twitterのsnowflakeについて
PDF
Programming Hive Reading #4
PDF
Programming Hive Reading #3
PDF
"Programming Hive" Reading #1
PDF
Casual Compression on MongoDB
PDF
Introduction to MongoDB
PDF
Hadoop Conference Japan 2011 Fallに行ってきました
PDF
snappyについて
PDF
第四回月次セミナー(公開版)
KEY
第三回月次セミナー(公開版)
PDF
Pythonで自然言語処理
PDF
HandlerSocket plugin Client for Javaとそれを用いたベンチマーク
PDF
Yammer試用レポート(公開版)
PDF
掲示板時間軸コーパスを用いたワードトレンド解析(公開版)
PDF
中国と私(仮題)
PDF
不自然言語処理コンテストLT資料
PDF
n-gramコーパスを用いた類義語自動獲得手法について
KEY
Analysis of ‘lang-8’
中国最新ニュースアプリ事情
FluentdとRedshiftの素敵な関係
Twitterのsnowflakeについて
Programming Hive Reading #4
Programming Hive Reading #3
"Programming Hive" Reading #1
Casual Compression on MongoDB
Introduction to MongoDB
Hadoop Conference Japan 2011 Fallに行ってきました
snappyについて
第四回月次セミナー(公開版)
第三回月次セミナー(公開版)
Pythonで自然言語処理
HandlerSocket plugin Client for Javaとそれを用いたベンチマーク
Yammer試用レポート(公開版)
掲示板時間軸コーパスを用いたワードトレンド解析(公開版)
中国と私(仮題)
不自然言語処理コンテストLT資料
n-gramコーパスを用いた類義語自動獲得手法について
Analysis of ‘lang-8’

Recently uploaded (20)

PDF
Modernizing your data center with Dell and AMD
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
KodekX | Application Modernization Development
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Encapsulation theory and applications.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Cloud computing and distributed systems.
PDF
Electronic commerce courselecture one. Pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
Modernizing your data center with Dell and AMD
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Spectral efficient network and resource selection model in 5G networks
The Rise and Fall of 3GPP – Time for a Sabbatical?
20250228 LYD VKU AI Blended-Learning.pptx
Review of recent advances in non-invasive hemoglobin estimation
Building Integrated photovoltaic BIPV_UPV.pdf
KodekX | Application Modernization Development
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Reach Out and Touch Someone: Haptics and Empathic Computing
Encapsulation theory and applications.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Cloud computing and distributed systems.
Electronic commerce courselecture one. Pdf
Encapsulation_ Review paper, used for researhc scholars
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Network Security Unit 5.pdf for BCA BBA.
NewMind AI Monthly Chronicles - July 2025
Advanced methodologies resolving dimensionality complications for autism neur...

HBase本輪読会資料(11章)

  • 1. HBaes The Difinitive Guide Chapter 11 : Performance Tuning 1
  • 2. HBase The Definitive Guide http://shop.oreilly.com/product/0636920014348.do 2
  • 3. chapter 11 : Performance Tuning • Garbage Collection Tuning • Memstore-Local Allocation Buffer • Compression • Optimizing Splits and Compactions • Load Balancing • Merging Regions • Client API: Best Practices • Configuration • Load Tests 3
  • 4. Garbage Collection Tuning • Young 128MB 512MB ex. -XX:MaxNewSize=128m -XX:NewSize=128m -Xmn128m • Concurrent Mark-Sweep GC GC ex. -XX:+UseParNewGC and -XX:+UseConcMarkSweepGC • Concurrent Mark-Sweep Collector (CMS) GC 70% Concorrent Mark-Sweep GC ex. -XX:CMSInitiatingOccupancyFraction=70 4
  • 5. Memstore-Local Allocation Buffer • HBase Region Heap fragmentation • 0.90.0 MSLAB Memstore HDFS flush MemStoreLAB hbase-site.xml hbase.hregion.memstore.mslab.enabled hbase.hregion.memstore.mslab.max.allocation 0.90.2 • http://www.cloudera.com/blog/2011/02/avoiding-full-gcs-in-hbase-with-memstore-local- allocation-buffers-part-1/ http://www.slideshare.net/cloudera/hbase-hug-presentation 5
  • 6. Compression • HBase GZIP LZO Snappy • major_compact • HBase Snappy http://dayafterneet.blogspot.com/2011/09/hbasesnappy.html 6
  • 7. Optimizing Splits and Compactions • Split split major_compact hbase.hregion.max.filesize region ex.100GB • Region Hotspotting Region Region Hotspotting Key Sequential ID NG Random Key 7
  • 9. Load Balancing • Resion hbase.balancer.period balancer hbase.balancer.max.balancing hbase.balancer.period balancer 9
  • 10. Merging Regions • Resion Region Merge 10
  • 11. Client API: Best Practices • Java Client API Disable auto-flush flushCommits() Use scanner-caching scan NG Limit scan scope family Close ResultScanners Block cache usage Optimal loading of row keys filter Turn off WAL on Puts ... 11
  • 12. Configuration • HBase Decrease ZooKeeper timeout zookeeper.session.timeout ↓ Increase handlers hbase.regionserver.handler.count ↑ Increase heap settings ↑ Enable data compression Increase region size hbase.hregion.max.filesize ↑ Adjust block cache size hfile.block.cache.size Adjust memstore limits hbase.regionserver.global.memstore.upperLimit hbase.region server.global.memstore.lowerLimit Increase blocking store files hbase.hstore.blockingStoreFiles ↑ Increase block multiplier hbase.hregion.memstore.block.multiplier ↑ Decrease maximum logfiles hbase.regionserver.maxlogs ↓ 12
  • 13. Load Tests • HBase PerformanceEvaluation Tool • YCSB Load Test http://dayafterneet.blogspot.com/2011/08/ycsbhbasemongodb.html 13
  • 14. Hadoop/HBase hbase-env.sh HBASE_HEAPSIZE 16384 2000 HRegionServer Java Heap core-site.xml fs.inmemory.size.mb 200 75 fs in-memory (MB) SequenceFile io.file.buffer.size 131072 hdfs-site.xml dfs.namenode.handler.count 50 10 NameNode DataNode dfs.datanode.max.xcievers 8192 256 hbase-site.xml hbase.regionserver.handler.count 50 10 RegionServer hbase.hregion.max.filesize 536870912 268435456 HFile HFile BlockCache hfile.block.cache.size 0.3 0.2 (0.2!20%) HStore hbase.hstore.blockingStoreFiles 10 7 BlockingStoreFile hbase.hregion.memstore.mslab.enabled TRUE FALSE mslab hbase.hregion.memstore.mslab.chunksize 2097152 2097152 mslab chunksize hbase.hregion.memstore.mslab.max.allocation 1024768 262144 mslab ※ HBase Chapter.11 14
  • 15. table lookup BloomFilter BLOOMFILTER ROW NONE (NONE/ROW/ROWCOL) COMPRESSION SNAPPY NONE NONE/GZ/LZO/SNAPPY) IN_MEMORY true/false HDFS ※ HBase Chapter.11 15
  • 16. - 100 threads ※1,500,000 records HBase(100 threads - 15 nodes) ※qps(query per second) HBase(100 threads / in_memory - 15 nodes) 100000 qps 90000 qps 80000 qps 86914 70000 qps 60000 qps 50000 qps 40000 qps 43630 30000 qps 28125 20000 qps 24943 10000 qps 12468 12542 0 qps insert select delete 16
  • 17. - 100 threads ※1,500,000 records HBase(100 threads - 15 nodes) ※latency μs HBase(100 threads / in_memory - 15 nodes) 20000 μs 18000 μs 16000 μs 16786 14000 μs 12000 μs 11943 11841 10000 μs 8000 μs 6000 μs 6059 4000 μs 2000 μs 2651 0 μs 1156 insert select delete 17
  • 18. thread (in_memory) ※1,500,000 records ※qps(query per second) 100 200 300 400 500 600 700 350000 qps 300000 qps 250000 qps 200000 qps 150000 qps 100000 qps 50000 qps 0 qps insert select delete 18
  • 19. thread (not in_memory) ※1,500,000 records ※qps(query per second) 100 200 300 400 500 600 700 350000 qps 300000 qps 250000 qps 200000 qps 150000 qps 100000 qps 50000 qps 0 qps insert select delete 19