AHBench is a benchmark test suite developed by the ApsaraDB for HBase team.

This test suite integrates the features included in the ApsaraDB for HBase Performance-enhanced Edition performance white paper, such as the Yahoo Cloud Serving Benchmark (YCSB) test set, test process control, and results aggregation. AHBench allows you to run benchmark tests without any complex programming required.

Download AHBench

Click here to download AHBench. Upload AHBench to the stress testing client and extract the file.

Runtime environment

The stress testing client must meet the following requirements:

  • Linux
  • JDK 1.8 or later
  • Python 2.7
  • We recommend that you use a client with at least 16 exclusive CPU cores.

Configurations

(Required) Configure the HBase cluster endpoint

  • Configure the endpoint of the HBase cluster in the AHBench/conf/hbase-site.xml file.
  • If you are using the ApsaraDB for HBase Enterprise Standard Edition, you need to retrieve the Zookeeper (ZK) address.
  • If you are using the ApsaraDB for HBase Performance-enhanced Edition, you need to retrieve the ZK address. For more information, see Use HBase Shell to access ApsaraDB for HBase.

(Required) Configure runtime environment variables

Use AHBench/conf/ahbench-env.properties to configure the environment variables for the tool.

vi AHBench/conf/ahbench-env.properties

# Configure the installation path for Java Development Kit (JDK) If the environment variable Path has been configured in the system, you can skip this step.
# JAVA_HOME=/usr/java/jdk1.8.0/

# Configure the version of the HBase cluster. If you use version 1.x, set the value to 1. If you use version 2.x, set the value to 2.
HBASE_VERSION=2
			

(Optional) Configure other related parameters

Use AHBench/conf/ahbench-config.properties to configure other parameters such as the compression algorithm, encoding algorithm, number of threads, data volume, and field size. The default parameters are recommended for most cases. You can customize the configurations to fit your needs.

Note: Some parameters are only supported in certain HBase editions. For example, ZSTD Compression and INDEX encoding are only supported in ApsaraDB for HBase Performance-enhanced Edition. You can configure the ZSTD and INDEX parameters to enhance the performance.

# Configure the compression algorithm of the table.
# Valid values: NONE, LZO, ZSTD, SNAPPY, GZ, LZ4, and ZSTD.
# Note that some systems may not support the specified compression algorithm.
# We recommend that you use the ZSTD compression algorithm for ApsaraDB for HBase Performance-enhanced Edition.
ahbench.table.compression=SNAPPY

# Configure the encoding algorithm of the table.
# Valid values: NONE, DIFF, and INDEX.
# Note that some systems may not support the specified encoding algorithm.
# We recommend that you use the INDEX encoding algorithm for ApsaraDB for HBase Performance-enhanced Edition.
ahbench.table.encoding=DIFF
			

Start the test

Fast test set

The test data includes 10 million entries, which occupies at least 20 GB storage. It takes about 40 minutes to finish testing and the actual time may vary based on different HBase editions.

cd AHBench
./fast_test
			

Full test set

The test data includes 2 billion entries, which occupies at least 2 TB storage. It takes about 25 hours to finish testing and the actual time may vary based on different HBase editions.

cd AHBench
./full_test
			

If you want to repeat the test and you have imported data in the previous test, you do not need to import data again. This reduces the execution time. It takes about 3.5 hours to finish testing after you skip the data import. The actual time may vary based on different HBase editions.

cd AHBench
./full_test --skipload
			

Test results

After all test cases are complete, a CSV file is generated in the current directory. CSV is short for Comma-Separated Values. You can import the benchmark results to the data analysis software such as Excel and Numbers for further analysis.

The following figure shows the test results in the CSV file.

Considerations and FAQ

  • The test suite uses the ahbenchtest-read and ahbenchtest-write tables for testing. AHBench may delete and create these tables during the test. If you have permissions, you definitely can delete these tables.
  • We recommend that you do not run the test tool in a production environment. The system may stop responding due to the heavy workloads of the test.
  • If AHBench returns an error and quits unexpectedly, check the following items:
    • Check whether JAVA_HOME is properly configured and the Python runtime environment is installed.
    • Check whether the endpoint of the cluster is correct.
    • Check whether the version of the HBase cluster is correct.
    • Check whether the cluster supports the specified compression algorithm.
    • Check whether the cluster is in the normal status.
    • Check whether the storage of the cluster is sufficient.
  • Elastic Compute Service (ECS) is a virtual runtime environment, benchmark results of the same configurations may fluctuate between 5 and 10 percent. This fluctuation is within the acceptable range.