SlideShare a Scribd company logo
                         HBase‐0.20.0 Performance Evaluation 
                               Anty Rao and Schubert Zhang, August 21, 2009 
                    {ant.rao, schubert.zhang}@gmail.com,http://cloudepr.blogspot.com/ 
 
Background 
 
We  have  been  using  HBase  for  around  a  year  in  our  development  and  projects,  from  0.17.x  to 
0.19.x. We and all in the community know the critical performance and reliability issues of these 
releases. 
 
Now,  the  great  news  is  that  HBase‐0.20.0  will  be  released  soon.  Jonathan  Gray  from  Streamy, 
Ryan  Rawson  from  StumbleUpon,  Michael  Stack  from  Powerset/Microsoft,  Jean‐Daniel  Cryans 
from  OpenPlaces,  and  other  contributors  had  done  a  great  job  to  redesign  and  rewrite  many 
codes to promote HBase. The two presentations [1] [2] provide more details of this release. 
 
The primary themes of HBase‐0.20.0: 
     − Performance 
                Real‐time and Unjavafy software implementations. 
                HFile, based on BigTable’s SSTable. New file format limits index size. 
                New API 
                New Scanners 
                New Block Cache 
                Compression (LZO, GZ) 
                Almost a RegionServer rewrite 
     − ZooKeeper integration, multiple masters (partly, 0.21 will rewrite Master with better ZK 
           integration) 
Then, we will get a bran‐new, high performance (Random Access, Scan, Insert, …), and stronger 
HBase. HBase‐0.20.0 shall be a great milestone, and we should say thanks to all developers. 
 
Following items are very important for us:   
     − Insert performance: We have very big datasets, which are generated fast. 
     − Scan performance: For data analysis in MapReduce framework. 
     − Random Access performance: Provide real‐time services. 
     − Less memory and I/O overheads: We are neither Google nor Yahoo!, we cannot operate 
           big cluster with hundreds or thousands of machines, but we really have big data. 
     − The HFile: Same as SSTable. It should be a common and effective storage element. 
 
Testbed Setup 
 
Cluster:   
     − 4 slaves + 1 master 
     − Machine: 4 CPU cores (2.0G), 2x500GB 7200RPM SATA disks, 8GB RAM. 
     − Linux: RedHat 5.1 (2.6.18‐53.el5), ext3, no RAID 


                                                                                                         1
−     1Gbps network, all nodes under the same switch. 
         −     Hadoop‐0.20.0 (1GB heap), HBase‐0.20.0 RC2 (4GB heap), Zookeeper‐3.2.0 
 
By now, HBase‐0.20.0 RC2 is available for evaluation: 
http://people.apache.org/~stack/hbase‐0.20.0‐candidate‐2/. Refer to [2] and [4] for installation. 
 
Hadoop‐0.20.0 configuration important parameters: 
core‐site.xml: 
    parameter                           value           notes 
    io.file.buffer.size                 65536           Irrelevant to this evaluation. We like use this size to improve 
                                                        file I/O. [5] 
    io.seqfile.compress.blocksize       327680          Irrelevant to this evaluation. We like use this size to compress 
                                                        data block. 
 
hdfs‐site.xml 
    parameter                           value           notes 
    dfs.namenode.handler.count          20              [5] 
    dfs.datanode.handler.count          20              [5] [6] 
    dfs.datanode.max.xcievers           3072            Under heavy read load, you may see lots of DFSClient 
                                                        complains about no live nodes hold a particular block. [6] 
    dfs.replication                     2               Our cluster is very small. 2 replicas are enough. 
 
mapred‐site.xml 
    parameter                                     value                              notes 
    io.sort.factor                                25                                 [5] 
    io.sort.mb                                    250                                10 * io.sort.factor [5] 
    mapred.tasktracker.map.tasks.maximum  3                                          Since our cluster is very small, we 
                                                                                     set 3 to avoid client side bottleneck. 
    mapred.child.java.opts                        ‐Xmx512m                           JVM GC option 
                                                  ‐XX:+UseConcMarkSweepGC
    mapred.reduce.parallel.copies                 20                                  
    mapred.job.tracker.handler.count              10                                 [5] 
 
hadoop‐env.sh 
    parameter                 value                                                           notes 
    HADOOP_CLASSPATH          ${HADOOP_HOME}/../hbase‐0.20.0/hbase‐0.20.0.jar:                Use HBase jar and 
                              ${HADOOP_HOME}/../hbase‐0.20.0/conf:${HADOOP_                   configurations. Use 
                              HOME}/../hbase‐0.20.0/lib/zookeeper‐r785019‐hbas                Zookeeper jar. 
                              e‐1329.jar 
    HADOOP_OPTS               "‐server ‐XX:+UseConcMarkSweepGC"                               JVM GC option 
 
HBase‐0.20.0 configuration important parameters: 
hbase‐site.xml 


                                                                                                                            2
parameter                                    value    notes 
    hbase.cluster.distributed                    true     Fully‐distributed with unmanaged ZooKeeper Quorum 
    hbase.regionserver.handler.count             20        
 
hbase‐env.sh 
    parameter                    value                                           notes 
    HBASE_CLASSPATH              ${HBASE_HOME}/../hadoop‐0.20.0/conf             Use hadoop configurations. 
    HBASE_HEAPSIZE               4000                                            Give HBase enough heap size 
    HBASE_OPTS                   "‐server ‐XX:+UseConcMarkSweepGC"               JVM GC option 
    HBASE_MANAGES_ZK             false                                           Refers to hbase.cluster.distributed 
 
Performance Evaluation Programs 
 
We  modified  the  class  org.apache.hadoop.hbase.PerformanceEvaluation,  since  the  code  has 
following problems: The patch is available at http://issues.apache.org/jira/browse/HBASE‐1778. 
     − It is not updated according to hadoop‐0.20.0. 
     − The  approach  to  split  maps  is  not  strict.  Need  to  provide  correct  InputSplit  and 
          InputFormat  classes.  Current  code  uses  TextInputFormat  and  FileSplit,  it  is  not 
          reasonable.   
 
The evaluation programs use MapReduce to do parallel operations against an HBase table.   
     − Total rows: 4,194,280. 
     − Row size: 1000 bytes for value, and 10 bytes for rowkey. Then we have ~4GB of data. 
     − Sequential  row  ranges:  40.  (It’s  also  used  to  define  the  total  number  of  MapTasks  in 
          each evaluation.)   
     − Rows of each sequential range: 104,857 
The principle is same as the evaluation programs described in Section 7, Performance Evaluation, 
of the Google BigTable paper [3], pages 8‐10. Since we have only 4 nodes to work as clients, we 
set mapred.tasktracker.map.tasks.maximum=3 to avoid client side bottleneck. 
 
Performance Evaluation 
 
Report‐1: Normal, autoFlush=false, writeToWAL=true 
                                                                                                   Google paper
                                 Eventual                                          Total
                                                          rows/s      ms/row                       (rows/s in
    Experiment                   Elapsed        row/s                              throughput
                                                          per node    per node                     single node
                                 Time(s)                                           (MB/s)
                                                                                                   cluster)
    random reads                          948      4424        1106      0.90              4.47                1212
    random writes(i)                      390     10755        2689      0.37             10.86                8850
    random writes                         370     11366        2834      0.35             11.45                8850
    sequential reads                      193     21732        5433      0.18             21.95                4425
    sequential writes(i)                  359     11683        2921      0.34             11.80                8547
    sequential writes                     204     20560        5140      0.19             20.77                8547
    scans                                  68     61681       15420      0.06             62.30              15385
 

                                                                                                                        3
Report‐2: Normal, autoFlush=true, writeToWAL=true 
                                                                                             Google paper
                             Eventual                                       Total
                                                   rows/s      ms/row                        (rows/s in
    Experiment               Elapsed     row/s                              throughput
                                                   per node    per node                      single node
                             Time(s)                                        (MB/s)
                                                                                             cluster)
    sequential writes(i)           461     9098        2275         0.44             9.19                8547
    sequential writes              376    11155        2789         0.36            11.27                8547
    random writes                  600     6990        1748         0.57             7.06                8850
 
Random writes  (i)  and  sequential  write  (i)  are  operations  against  a  new  table,  i.e. initial  writes. 
Random  writes  and  sequential  writes  are  operations  against  an  existing  table  that  is  already 
distributed  on  all  region  servers,  i.e.  distributed  writes.  Since  there  is  only  one  region  server  is 
accessed at the beginning of inserting, the performance is not so good until the regions are split 
across all region servers. The difference between initial writes and distributed writes for random 
writes is not so obvious, but that is distinct for sequential writes. 
 
In Google’s BigTable paper [3], the performance of random writes and sequential writes is very 
close. But in our result, sequential writes are faster than random writes, it seems the client side 
write‐buffer  (12MB,  autoFlush=false)  taking  effect,  since  it  can  reduce  the  number  of  RPC 
packages. And it may imply that further RPC optimizations can gain better performance. If we set 
autoFlush true, they will be close too, and less than the number of random writes in report‐1. The 
report‐2 shows our inference is correct. 
 
Random reads are far slower than all other operations. Each random read involves the transfer of 
a  64KB  HFlie  block  from  HDFS  to  a  region  server,  out  of  which  only  a  single  1000‐byte  value  is 
used. So the real throughput is approximately 1106*64KB=70MB/s of data read from HDFS, it is 
not low. [3] [8] 
 
The average time to random read a row is sub‐ms here (0.90ms) on average per node, that seems 
about as  good  as  we  can  get  on  our  hardware.  We're already  showing  10X better  performance 
than a disk seeking (10ms). It should be major contributed by the new BlockCache and new HFile 
implementations.  Any  other  improvements  will  have  to  come  from  HDFS  optimizations,  RPC 
optimizations, and of course we can always get better performance by loading up with more RAM 
for  the  file‐system  cache.  Try  16GB  or  more  RAM,  we  might  get  greater  performance.  But 
remember, we're serving out of memory and not disk seeking. Adding more memory (and region 
server  heap)  should  help  the  numbers  across  the  board.  The  BigTable  paper  [3]  shows  1212 
random  reads  per  second  on  a  single  node.  That's  sub‐ms  for  random  access,  it’s  clearly  not 
actually  doing  disk  seeks  for  most  gets.  (Thanks  for  good  comments  from  Jonathan  Gray  and 
Michael Stack.) [9] 
 
The performance of sequential reads and scans is very good here, even better than the Google 
paper’s  [3].  We  believe  this  performance  will  greatly  support  HBase  for  data  analysis 
(MapReduce). In Google’s BigTable paper [3], the performance of writes will be better than reads, 
includes  sequential  reads.  But  in  our  test  result,  the  sequential  reads  are  better  than  writes. 
Maybe there are rooms to improve the performance of writes in the future. 

                                                                                                                  4
 
And remember, the dataset size in our tests is not big enough (only average 1GB per node), so the 
hit ratio of BlockCache is very high (>40%). If a region server serves large dataset (e.g. 1TB), the 
power of BlockCache would be downgraded.   
 
Bloom filters can reduce the unnecessary search in HFiles, which can speed up reads, especially 
for large datasets when there are multiple files in an HBase region. 
 
We  can  also  consider  RAID0  on  multiple  disks,  and  mount  local  file  system  with  noatime  and 
nodiratime options, for performance improvements. 
 
Performance Evaluation (none WAL) 
 
In some use cases, such as bulk loading a large dataset into an HBase table, the overhead of the 
Write‐Ahead‐Logs  (commit‐logs)  are  considerable,  since  the  bulk  inserting  causes  the  logs  get 
rotated often and produce many disk I/O. Here we consider to disable WAL in such use cases, but 
the risk is data loss when region server crash. Here I cite a post of Jean‐Daniel Cryans on HBase 
mailing list [7]. 
             “As you may know, HDFS still does not support appends. That means that the write ahead logs or WAL 
       that  HBase  uses  are  only  helpful  if  synced  on  disk.  That  means  that  you  lose  some  data  during  a  region 
       server crash or a kill ‐9. In 0.19 the logs could be opened forever if they had under 100000 edits. Now in 0.20 
       we fixed that by capping the WAL to ~62MB and we also rotate the logs after 1 hour. This is all good because 
       it means far less data loss until we are able to append to files in HDFS. 
             Now to why this may slow down your import, the job I was talking about had huge rows so the logs 
       got rotated much more often whereas in 0.19 only the number of rows triggered a log rotation. Not writing 
       to the WAL has the advantage of using far less disk IO but, as you can guess, it means huge data loss in the 
       case  of  a  region  server  crash.  But,  in  many  cases,  a  RS  crash  still  means  that  you  must  restart  your  job 
       because log splitting can take more than 10 minutes so many tasks times out (I am currently working on that 
       for 0.21 to make it really faster btw).” 
 
So,  here  we  call  put.setWriteToWAL(false)  to  disable  WAL,  and  expect  get  better  writing 
performance. This table is the evaluation result. 
 
Report‐3: NonWAL (autoFlush=false, writeToWAL=false) 
                                                                                                           Google paper
                                    Eventual                                              Total
                                                             rows/s        ms/row                          (rows/s in
    Experiment                      Elapsed        row/s                                  throughput
                                                             per node      per node                        single node
                                    Time(s)                                               (MB/s)
                                                                                                           cluster)
    random reads                         1001       4190          1048          0.95              4.23                  1212
    random writes(i)                       260     16132          4033          0.25             16.29                  8850
    random writes                          194     21620          5405          0.19             21.84                  8850
    sequential reads                       187     22429          5607          0.18             22.65                  4425
    sequential writes(i)                   241     17404          4351          0.23             17.58                  8547
    sequential writes                      122     34379          8595          0.12             34.72                  8547
    scans                                   62     67650         16912          0.06             68.33                 15385

                                                                                                                                 5
 
We  can  see  the  performance  of  sequential  writes  and  random  writes  are  far  better  (~double) 
than  the  normal  case  (with  WAL).  So,  we  can  consider  using  this  method  to  solve  some  bulk 
loading problems which need high performance for inserting. But we suggest calling admin.flush() 
to flush the data in memstores to HDFS, immediately after each bulk loading job, to persist data 
and avoid loss as much as possible. The above evaluation does not include the time of flush.   
 
Conclusions 
 
Compares to the metrics in Google’s BigTable paper [3], the write performance is still not so good, 
but this result is much better than any previous HBase release, especially for the random reads. 
We even got better result than the paper [3] on sequential reads and scans. This result gives us 
more confidence.   
 
HBase‐0.20.0 should be good to be used: 
      − as a data store to be inserted/loaded large datasets fast 
      − to store large datasets to be analyzed by MapReduce jobs 
      − to provide real‐time query services 
 
We  have  made  a  comparison  of  the  performance  to  run  MapReduce  jobs  which  sequentially 
retrieve or scan data from HBase tables, and from HDFS files. The latter is trebly faster. And the 
gap is even bigger for sequential writes. 
 
HBase‐0.20.0 is not the final word on performance and features. We are looking forward to and 
researching following features, and need to read code detail.   
      − Other RPC‐related improvements 
      − Other Java‐related improvements 
      − New master implementation 
      − Bloom Filter 
      − Bulk‐load [10] 
 
In the world of big data, best performance usually comes from tow primary schemes:   
(1) Reducing disk I/O and disk seek.   
     If  we  come  back  to  review  the  BigTable  paper  [3]  Section  6,  Refinements,  we  can  find  the 
     goals of almost all those refinements are related to reducing disk I/O and disk seek, such as 
     Locality  Group,  Compression,  Caching  (Scan  Cache  and  Block  Cache),  Bloom  filters,  Group 
     commit, etc. 
(2) Sequential data access.   
     When implementing our applications and organize/store our big data, we should always try 
     our  best  to  write  and  read  data  in  sequential  mode.  Maybe  sometimes  we  cannot  find  a 
     generalized  access  scheme  like  that  in  the  traditional  database  world,  to  access  data  in 
     various views, but this may be the trait of big data world. 
 
 


                                                                                                           6
References: 
     [1]   Ryan Rawson’s Presentation on NOSQL. 
           http://blog.oskarsson.nu/2009/06/nosql‐debrief.html 
     [2]   HBase goes Realtime, The HBase presentation at HadoopSummit2009 by Jonathan Gray 
           and Jean‐Daniel Cryans 
           http://wiki.apache.org/hadoop‐data/attachments/HBase(2f)HBasePresentations/attach
           ments/HBase_Goes_Realtime.pdf 
     [3]   Google paper, Bigtable: A Distributed Storage System for Structured Data 
           http://labs.google.com/papers/bigtable.html 
     [4]   HBase‐0.20.0‐RC2 Documentation, 
           http://people.apache.org/~stack/hbase‐0.20.0‐candidate‐2/docs/ 
     [5]   Cloudera, Hadoop Configuration Parameters. 
           http://www.cloudera.com/blog/category/mapreduce/page/2/ 
     [6]   HBase Troubleshooting, http://wiki.apache.org/hadoop/Hbase/Troubleshooting 
     [7]   Jean‐Daniel Cryans’s post on HBase mailing list, on Aug 12, 2009: Tip when migrating 
           your data loading MR jobs from 0.19 to 0.20. 
     [8]   ACM Queue, Adam Jacobs, 1010data Inc., The Pathologies of Big Data, 
           http://queue.acm.org/detail.cfm?id=1563874 
     [9]   Our another evaluation report:   
           http://docloud.blogspot.com/2009/08/hbase‐0200‐performance‐evaluation.html 
    [10]   Yahoo! Research, Efficient Bulk Insertion into a Distributed Ordered Table,
           http://research.yahoo.com/files/bulkload.pdf 




                                                                                              7

More Related Content

PPTX
Apache HBase Performance Tuning
PDF
Rigorous and Multi-tenant HBase Performance
PPTX
HBaseCon 2015: HBase Performance Tuning @ Salesforce
PDF
HBase Application Performance Improvement
PPTX
Meet hbase 2.0
PDF
HBaseCon 2012 | HBase Coprocessors – Deploy Shared Functionality Directly on ...
PPTX
HBase Accelerated: In-Memory Flush and Compaction
PDF
HBase Blockcache 101
Apache HBase Performance Tuning
Rigorous and Multi-tenant HBase Performance
HBaseCon 2015: HBase Performance Tuning @ Salesforce
HBase Application Performance Improvement
Meet hbase 2.0
HBaseCon 2012 | HBase Coprocessors – Deploy Shared Functionality Directly on ...
HBase Accelerated: In-Memory Flush and Compaction
HBase Blockcache 101

What's hot (20)

PPTX
Rigorous and Multi-tenant HBase Performance Measurement
PPTX
Off-heaping the Apache HBase Read Path
ODP
Hug Hbase Presentation.
PDF
HBaseCon 2015: HBase Operations at Xiaomi
PPT
HBaseCon 2012 | Learning HBase Internals - Lars Hofhansl, Salesforce
PPTX
Apache HBase, Accelerated: In-Memory Flush and Compaction
PDF
Meet HBase 1.0
PPTX
HBase and HDFS: Understanding FileSystem Usage in HBase
PPTX
HBase Low Latency
PDF
HBase Sizing Guide
PDF
HBase HUG Presentation: Avoiding Full GCs with MemStore-Local Allocation Buffers
PDF
HBaseCon 2012 | HBase and HDFS: Past, Present, Future - Todd Lipcon, Cloudera
PDF
HBase Storage Internals
PPTX
NoSQL: Cassadra vs. HBase
PDF
HBaseCon 2015: HBase at Scale in an Online and High-Demand Environment
PDF
HBaseCon 2015: Elastic HBase on Mesos
PPTX
HBaseCon 2015: Multitenancy in HBase
PDF
HBase Advanced - Lars George
PPTX
HBaseCon 2015: HBase 2.0 and Beyond Panel
PDF
Apache HBase Low Latency
Rigorous and Multi-tenant HBase Performance Measurement
Off-heaping the Apache HBase Read Path
Hug Hbase Presentation.
HBaseCon 2015: HBase Operations at Xiaomi
HBaseCon 2012 | Learning HBase Internals - Lars Hofhansl, Salesforce
Apache HBase, Accelerated: In-Memory Flush and Compaction
Meet HBase 1.0
HBase and HDFS: Understanding FileSystem Usage in HBase
HBase Low Latency
HBase Sizing Guide
HBase HUG Presentation: Avoiding Full GCs with MemStore-Local Allocation Buffers
HBaseCon 2012 | HBase and HDFS: Past, Present, Future - Todd Lipcon, Cloudera
HBase Storage Internals
NoSQL: Cassadra vs. HBase
HBaseCon 2015: HBase at Scale in an Online and High-Demand Environment
HBaseCon 2015: Elastic HBase on Mesos
HBaseCon 2015: Multitenancy in HBase
HBase Advanced - Lars George
HBaseCon 2015: HBase 2.0 and Beyond Panel
Apache HBase Low Latency
Ad

Similar to HBase 0.20.0 Performance Evaluation (20)

PDF
Hadoop - Lessons Learned
PDF
RuG Guest Lecture
PDF
HBase本輪読会資料(11章)
PDF
Hadoop I/O Analysis
PDF
Design for a Distributed Name Node
PDF
Spark and shark
PDF
GOTO 2011 preso: 3x Hadoop
PPTX
Spark and Shark: Lightning-Fast Analytics over Hadoop and Hive Data
PDF
HBase Sizing Notes
PDF
Beyond Map/Reduce: Getting Creative With Parallel Processing
KEY
Near-realtime analytics with Kafka and HBase
PDF
Hadoop pig
PDF
Berkeley Performance Tuning
PDF
Hadoop Overview & Architecture
 
PDF
Making Big Data Analytics Interactive and Real-­Time
PPTX
Scalable Parallel Computing on Clouds
PPTX
Strata + Hadoop World 2012: Apache HBase Features for the Enterprise
PPTX
MapReduce Paradigm
PPTX
MapReduce Paradigm
PPTX
HBaseCon 2012 | Base Metrics: What They Mean to You - Cloudera
Hadoop - Lessons Learned
RuG Guest Lecture
HBase本輪読会資料(11章)
Hadoop I/O Analysis
Design for a Distributed Name Node
Spark and shark
GOTO 2011 preso: 3x Hadoop
Spark and Shark: Lightning-Fast Analytics over Hadoop and Hive Data
HBase Sizing Notes
Beyond Map/Reduce: Getting Creative With Parallel Processing
Near-realtime analytics with Kafka and HBase
Hadoop pig
Berkeley Performance Tuning
Hadoop Overview & Architecture
 
Making Big Data Analytics Interactive and Real-­Time
Scalable Parallel Computing on Clouds
Strata + Hadoop World 2012: Apache HBase Features for the Enterprise
MapReduce Paradigm
MapReduce Paradigm
HBaseCon 2012 | Base Metrics: What They Mean to You - Cloudera
Ad

More from Schubert Zhang (20)

PDF
Blockchain in Action
PDF
科普区块链
PDF
Engineering Culture and Infrastructure
PDF
Simple practices in performance monitoring and evaluation
PPTX
Scrum Agile Development
PPTX
Career Advice
PDF
Engineering practices in big data storage and processing
PPTX
HiveServer2
PPTX
Horizon for Big Data
PDF
Bigtable数据模型解决CDR清单存储问题的资源估算
PPTX
Big Data Engineering Team Meeting 20120223a
PPTX
HBase Coprocessor Introduction
PDF
Hadoop大数据实践经验
PPTX
Wild Thinking of BigdataBase
PDF
RockStor - A Cloud Object System based on Hadoop
PPTX
Fans of running gump
PDF
Hadoop compress-stream
PDF
Ganglia轻度使用指南
PDF
DaStor/Cassandra report for CDR solution
PPTX
Big data and cloud
Blockchain in Action
科普区块链
Engineering Culture and Infrastructure
Simple practices in performance monitoring and evaluation
Scrum Agile Development
Career Advice
Engineering practices in big data storage and processing
HiveServer2
Horizon for Big Data
Bigtable数据模型解决CDR清单存储问题的资源估算
Big Data Engineering Team Meeting 20120223a
HBase Coprocessor Introduction
Hadoop大数据实践经验
Wild Thinking of BigdataBase
RockStor - A Cloud Object System based on Hadoop
Fans of running gump
Hadoop compress-stream
Ganglia轻度使用指南
DaStor/Cassandra report for CDR solution
Big data and cloud

Recently uploaded (20)

PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PDF
KodekX | Application Modernization Development
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Electronic commerce courselecture one. Pdf
PPT
Teaching material agriculture food technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Machine learning based COVID-19 study performance prediction
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Chapter 3 Spatial Domain Image Processing.pdf
NewMind AI Monthly Chronicles - July 2025
Diabetes mellitus diagnosis method based random forest with bat algorithm
Mobile App Security Testing_ A Comprehensive Guide.pdf
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
KodekX | Application Modernization Development
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Understanding_Digital_Forensics_Presentation.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Electronic commerce courselecture one. Pdf
Teaching material agriculture food technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Machine learning based COVID-19 study performance prediction
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Chapter 3 Spatial Domain Image Processing.pdf

HBase 0.20.0 Performance Evaluation

  • 1.   HBase‐0.20.0 Performance Evaluation  Anty Rao and Schubert Zhang, August 21, 2009  {ant.rao, schubert.zhang}@gmail.com,http://cloudepr.blogspot.com/    Background    We  have  been  using  HBase  for  around  a  year  in  our  development  and  projects,  from  0.17.x  to  0.19.x. We and all in the community know the critical performance and reliability issues of these  releases.    Now,  the  great  news  is  that  HBase‐0.20.0  will  be  released  soon.  Jonathan  Gray  from  Streamy,  Ryan  Rawson  from  StumbleUpon,  Michael  Stack  from  Powerset/Microsoft,  Jean‐Daniel  Cryans  from  OpenPlaces,  and  other  contributors  had  done  a  great  job  to  redesign  and  rewrite  many  codes to promote HBase. The two presentations [1] [2] provide more details of this release.    The primary themes of HBase‐0.20.0:  − Performance   Real‐time and Unjavafy software implementations.   HFile, based on BigTable’s SSTable. New file format limits index size.   New API   New Scanners   New Block Cache   Compression (LZO, GZ)   Almost a RegionServer rewrite  − ZooKeeper integration, multiple masters (partly, 0.21 will rewrite Master with better ZK  integration)  Then, we will get a bran‐new, high performance (Random Access, Scan, Insert, …), and stronger  HBase. HBase‐0.20.0 shall be a great milestone, and we should say thanks to all developers.    Following items are very important for us:    − Insert performance: We have very big datasets, which are generated fast.  − Scan performance: For data analysis in MapReduce framework.  − Random Access performance: Provide real‐time services.  − Less memory and I/O overheads: We are neither Google nor Yahoo!, we cannot operate  big cluster with hundreds or thousands of machines, but we really have big data.  − The HFile: Same as SSTable. It should be a common and effective storage element.    Testbed Setup    Cluster:    − 4 slaves + 1 master  − Machine: 4 CPU cores (2.0G), 2x500GB 7200RPM SATA disks, 8GB RAM.  − Linux: RedHat 5.1 (2.6.18‐53.el5), ext3, no RAID    1
  • 2. 1Gbps network, all nodes under the same switch.  − Hadoop‐0.20.0 (1GB heap), HBase‐0.20.0 RC2 (4GB heap), Zookeeper‐3.2.0    By now, HBase‐0.20.0 RC2 is available for evaluation:  http://people.apache.org/~stack/hbase‐0.20.0‐candidate‐2/. Refer to [2] and [4] for installation.    Hadoop‐0.20.0 configuration important parameters:  core‐site.xml:  parameter  value  notes  io.file.buffer.size  65536  Irrelevant to this evaluation. We like use this size to improve  file I/O. [5]  io.seqfile.compress.blocksize  327680  Irrelevant to this evaluation. We like use this size to compress  data block.    hdfs‐site.xml  parameter  value  notes  dfs.namenode.handler.count  20  [5]  dfs.datanode.handler.count  20  [5] [6]  dfs.datanode.max.xcievers  3072  Under heavy read load, you may see lots of DFSClient  complains about no live nodes hold a particular block. [6]  dfs.replication  2  Our cluster is very small. 2 replicas are enough.    mapred‐site.xml  parameter  value  notes  io.sort.factor  25  [5]  io.sort.mb  250  10 * io.sort.factor [5]  mapred.tasktracker.map.tasks.maximum  3  Since our cluster is very small, we  set 3 to avoid client side bottleneck.  mapred.child.java.opts  ‐Xmx512m  JVM GC option  ‐XX:+UseConcMarkSweepGC mapred.reduce.parallel.copies  20    mapred.job.tracker.handler.count  10  [5]    hadoop‐env.sh  parameter  value  notes  HADOOP_CLASSPATH  ${HADOOP_HOME}/../hbase‐0.20.0/hbase‐0.20.0.jar: Use HBase jar and  ${HADOOP_HOME}/../hbase‐0.20.0/conf:${HADOOP_ configurations. Use  HOME}/../hbase‐0.20.0/lib/zookeeper‐r785019‐hbas Zookeeper jar.  e‐1329.jar  HADOOP_OPTS  "‐server ‐XX:+UseConcMarkSweepGC"  JVM GC option    HBase‐0.20.0 configuration important parameters:  hbase‐site.xml    2
  • 3. parameter  value  notes  hbase.cluster.distributed  true  Fully‐distributed with unmanaged ZooKeeper Quorum  hbase.regionserver.handler.count  20      hbase‐env.sh  parameter  value  notes  HBASE_CLASSPATH  ${HBASE_HOME}/../hadoop‐0.20.0/conf  Use hadoop configurations.  HBASE_HEAPSIZE  4000  Give HBase enough heap size  HBASE_OPTS  "‐server ‐XX:+UseConcMarkSweepGC"  JVM GC option  HBASE_MANAGES_ZK  false  Refers to hbase.cluster.distributed    Performance Evaluation Programs    We  modified  the  class  org.apache.hadoop.hbase.PerformanceEvaluation,  since  the  code  has  following problems: The patch is available at http://issues.apache.org/jira/browse/HBASE‐1778.  − It is not updated according to hadoop‐0.20.0.  − The  approach  to  split  maps  is  not  strict.  Need  to  provide  correct  InputSplit  and  InputFormat  classes.  Current  code  uses  TextInputFormat  and  FileSplit,  it  is  not  reasonable.      The evaluation programs use MapReduce to do parallel operations against an HBase table.    − Total rows: 4,194,280.  − Row size: 1000 bytes for value, and 10 bytes for rowkey. Then we have ~4GB of data.  − Sequential  row  ranges:  40.  (It’s  also  used  to  define  the  total  number  of  MapTasks  in  each evaluation.)    − Rows of each sequential range: 104,857  The principle is same as the evaluation programs described in Section 7, Performance Evaluation,  of the Google BigTable paper [3], pages 8‐10. Since we have only 4 nodes to work as clients, we  set mapred.tasktracker.map.tasks.maximum=3 to avoid client side bottleneck.    Performance Evaluation    Report‐1: Normal, autoFlush=false, writeToWAL=true  Google paper Eventual Total rows/s ms/row (rows/s in Experiment Elapsed row/s throughput per node per node single node Time(s) (MB/s) cluster) random reads 948 4424 1106 0.90 4.47 1212 random writes(i) 390 10755 2689 0.37 10.86 8850 random writes 370 11366 2834 0.35 11.45 8850 sequential reads 193 21732 5433 0.18 21.95 4425 sequential writes(i) 359 11683 2921 0.34 11.80 8547 sequential writes 204 20560 5140 0.19 20.77 8547 scans 68 61681 15420 0.06 62.30 15385     3
  • 4. Report‐2: Normal, autoFlush=true, writeToWAL=true  Google paper Eventual Total rows/s ms/row (rows/s in Experiment Elapsed row/s throughput per node per node single node Time(s) (MB/s) cluster) sequential writes(i) 461 9098 2275 0.44 9.19 8547 sequential writes 376 11155 2789 0.36 11.27 8547 random writes 600 6990 1748 0.57 7.06 8850   Random writes  (i)  and  sequential  write  (i)  are  operations  against  a  new  table,  i.e. initial  writes.  Random  writes  and  sequential  writes  are  operations  against  an  existing  table  that  is  already  distributed  on  all  region  servers,  i.e.  distributed  writes.  Since  there  is  only  one  region  server  is  accessed at the beginning of inserting, the performance is not so good until the regions are split  across all region servers. The difference between initial writes and distributed writes for random  writes is not so obvious, but that is distinct for sequential writes.    In Google’s BigTable paper [3], the performance of random writes and sequential writes is very  close. But in our result, sequential writes are faster than random writes, it seems the client side  write‐buffer  (12MB,  autoFlush=false)  taking  effect,  since  it  can  reduce  the  number  of  RPC  packages. And it may imply that further RPC optimizations can gain better performance. If we set  autoFlush true, they will be close too, and less than the number of random writes in report‐1. The  report‐2 shows our inference is correct.    Random reads are far slower than all other operations. Each random read involves the transfer of  a  64KB  HFlie  block  from  HDFS  to  a  region  server,  out  of  which  only  a  single  1000‐byte  value  is  used. So the real throughput is approximately 1106*64KB=70MB/s of data read from HDFS, it is  not low. [3] [8]    The average time to random read a row is sub‐ms here (0.90ms) on average per node, that seems  about as  good  as  we  can  get  on  our  hardware.  We're already  showing  10X better  performance  than a disk seeking (10ms). It should be major contributed by the new BlockCache and new HFile  implementations.  Any  other  improvements  will  have  to  come  from  HDFS  optimizations,  RPC  optimizations, and of course we can always get better performance by loading up with more RAM  for  the  file‐system  cache.  Try  16GB  or  more  RAM,  we  might  get  greater  performance.  But  remember, we're serving out of memory and not disk seeking. Adding more memory (and region  server  heap)  should  help  the  numbers  across  the  board.  The  BigTable  paper  [3]  shows  1212  random  reads  per  second  on  a  single  node.  That's  sub‐ms  for  random  access,  it’s  clearly  not  actually  doing  disk  seeks  for  most  gets.  (Thanks  for  good  comments  from  Jonathan  Gray  and  Michael Stack.) [9]    The performance of sequential reads and scans is very good here, even better than the Google  paper’s  [3].  We  believe  this  performance  will  greatly  support  HBase  for  data  analysis  (MapReduce). In Google’s BigTable paper [3], the performance of writes will be better than reads,  includes  sequential  reads.  But  in  our  test  result,  the  sequential  reads  are  better  than  writes.  Maybe there are rooms to improve the performance of writes in the future.    4
  • 5.   And remember, the dataset size in our tests is not big enough (only average 1GB per node), so the  hit ratio of BlockCache is very high (>40%). If a region server serves large dataset (e.g. 1TB), the  power of BlockCache would be downgraded.      Bloom filters can reduce the unnecessary search in HFiles, which can speed up reads, especially  for large datasets when there are multiple files in an HBase region.    We  can  also  consider  RAID0  on  multiple  disks,  and  mount  local  file  system  with  noatime  and  nodiratime options, for performance improvements.    Performance Evaluation (none WAL)    In some use cases, such as bulk loading a large dataset into an HBase table, the overhead of the  Write‐Ahead‐Logs  (commit‐logs)  are  considerable,  since  the  bulk  inserting  causes  the  logs  get  rotated often and produce many disk I/O. Here we consider to disable WAL in such use cases, but  the risk is data loss when region server crash. Here I cite a post of Jean‐Daniel Cryans on HBase  mailing list [7].  “As you may know, HDFS still does not support appends. That means that the write ahead logs or WAL  that  HBase  uses  are  only  helpful  if  synced  on  disk.  That  means  that  you  lose  some  data  during  a  region  server crash or a kill ‐9. In 0.19 the logs could be opened forever if they had under 100000 edits. Now in 0.20  we fixed that by capping the WAL to ~62MB and we also rotate the logs after 1 hour. This is all good because  it means far less data loss until we are able to append to files in HDFS.  Now to why this may slow down your import, the job I was talking about had huge rows so the logs  got rotated much more often whereas in 0.19 only the number of rows triggered a log rotation. Not writing  to the WAL has the advantage of using far less disk IO but, as you can guess, it means huge data loss in the  case  of  a  region  server  crash.  But,  in  many  cases,  a  RS  crash  still  means  that  you  must  restart  your  job  because log splitting can take more than 10 minutes so many tasks times out (I am currently working on that  for 0.21 to make it really faster btw).”    So,  here  we  call  put.setWriteToWAL(false)  to  disable  WAL,  and  expect  get  better  writing  performance. This table is the evaluation result.    Report‐3: NonWAL (autoFlush=false, writeToWAL=false)  Google paper Eventual Total rows/s ms/row (rows/s in Experiment Elapsed row/s throughput per node per node single node Time(s) (MB/s) cluster) random reads 1001 4190 1048 0.95 4.23 1212 random writes(i) 260 16132 4033 0.25 16.29 8850 random writes 194 21620 5405 0.19 21.84 8850 sequential reads 187 22429 5607 0.18 22.65 4425 sequential writes(i) 241 17404 4351 0.23 17.58 8547 sequential writes 122 34379 8595 0.12 34.72 8547 scans 62 67650 16912 0.06 68.33 15385   5
  • 6.   We  can  see  the  performance  of  sequential  writes  and  random  writes  are  far  better  (~double)  than  the  normal  case  (with  WAL).  So,  we  can  consider  using  this  method  to  solve  some  bulk  loading problems which need high performance for inserting. But we suggest calling admin.flush()  to flush the data in memstores to HDFS, immediately after each bulk loading job, to persist data  and avoid loss as much as possible. The above evaluation does not include the time of flush.      Conclusions    Compares to the metrics in Google’s BigTable paper [3], the write performance is still not so good,  but this result is much better than any previous HBase release, especially for the random reads.  We even got better result than the paper [3] on sequential reads and scans. This result gives us  more confidence.      HBase‐0.20.0 should be good to be used:  − as a data store to be inserted/loaded large datasets fast  − to store large datasets to be analyzed by MapReduce jobs  − to provide real‐time query services    We  have  made  a  comparison  of  the  performance  to  run  MapReduce  jobs  which  sequentially  retrieve or scan data from HBase tables, and from HDFS files. The latter is trebly faster. And the  gap is even bigger for sequential writes.    HBase‐0.20.0 is not the final word on performance and features. We are looking forward to and  researching following features, and need to read code detail.    − Other RPC‐related improvements  − Other Java‐related improvements  − New master implementation  − Bloom Filter  − Bulk‐load [10]    In the world of big data, best performance usually comes from tow primary schemes:    (1) Reducing disk I/O and disk seek.    If  we  come  back  to  review  the  BigTable  paper  [3]  Section  6,  Refinements,  we  can  find  the  goals of almost all those refinements are related to reducing disk I/O and disk seek, such as  Locality  Group,  Compression,  Caching  (Scan  Cache  and  Block  Cache),  Bloom  filters,  Group  commit, etc.  (2) Sequential data access.    When implementing our applications and organize/store our big data, we should always try  our  best  to  write  and  read  data  in  sequential  mode.  Maybe  sometimes  we  cannot  find  a  generalized  access  scheme  like  that  in  the  traditional  database  world,  to  access  data  in  various views, but this may be the trait of big data world.        6
  • 7. References:  [1] Ryan Rawson’s Presentation on NOSQL.  http://blog.oskarsson.nu/2009/06/nosql‐debrief.html  [2] HBase goes Realtime, The HBase presentation at HadoopSummit2009 by Jonathan Gray  and Jean‐Daniel Cryans  http://wiki.apache.org/hadoop‐data/attachments/HBase(2f)HBasePresentations/attach ments/HBase_Goes_Realtime.pdf  [3] Google paper, Bigtable: A Distributed Storage System for Structured Data  http://labs.google.com/papers/bigtable.html  [4] HBase‐0.20.0‐RC2 Documentation,  http://people.apache.org/~stack/hbase‐0.20.0‐candidate‐2/docs/  [5] Cloudera, Hadoop Configuration Parameters.  http://www.cloudera.com/blog/category/mapreduce/page/2/  [6] HBase Troubleshooting, http://wiki.apache.org/hadoop/Hbase/Troubleshooting  [7] Jean‐Daniel Cryans’s post on HBase mailing list, on Aug 12, 2009: Tip when migrating  your data loading MR jobs from 0.19 to 0.20.  [8] ACM Queue, Adam Jacobs, 1010data Inc., The Pathologies of Big Data,  http://queue.acm.org/detail.cfm?id=1563874  [9] Our another evaluation report:    http://docloud.blogspot.com/2009/08/hbase‐0200‐performance‐evaluation.html  [10] Yahoo! Research, Efficient Bulk Insertion into a Distributed Ordered Table, http://research.yahoo.com/files/bulkload.pdf    7