A small example of an hbase data read optimization

Source: Internet
Author: User

Today, an experienced God in the group raised a question (@ dust matter) and recorded it.

A June set up a small cluster, 7 Datanode, a master node. The demand is this: through the MR Program to read the data in the HBase table, the program runs after the discovery speed is relatively slow, through the query task detailed discovery, the cumulative need 1542 map completed, there are currently 14 map in execution. Customer is not satisfied with this speed, how can I optimize it?


First, through job, there are 1542 maps that need to be executed, stating that HBase has 1542 partitions (one map per partition), which is a knowledge point.

Data does not have hot spots, hbase processing performance is not a problem

There are 1542 maps that need to be executed, but only 14 in parallel, indicating that the map has insufficient data.

After asking, he did not configure, the default per machine only 2 map, so the degree of parallelism is 7*2=14, that is, running 14 map at the same time

So prompt him to go to configure the file reconfiguration, each machine configures the amount of map data is CPU, because 8 CPUs, so configure 8 map. Then the parallel processing capability is 7*8=56 (56 maps at the same time).

Run 4 times times faster.

Parameter modification:

Conf/mapred-site.xml

Version 1.0 is this parameter mapred.tasktracker.map.tasks.maximum configuration map

Mapred.tasktracker.reduce.tasks.maximum Configuring reduce

Https://hadoop.apache.org/docs/r1.0.4/mapred-default.html

Version 2.0 is this parameter mapreduce.tasktracker.map.tasks.maximum configuration map

Mapreduce.tasktracker.reduce.tasks.maximum Configuring reduce

Http://hadoop.apache.org/docs/r2.4.1/hadoop-mapreduce-client/hadoop-mapreduce-client-core/mapred-default.xml

Reflection:

    1. Hadoop clusters are built and must be optimized (optimization needs to be optimized according to your different business scenarios)

    2. A region corresponding to a map, then in turn, bulk import data to hbase, how to optimize it?

A small example of an hbase data read optimization

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.