Performance test tool - GUI

更新时间:
复制 MD 格式

With this suite, you can run a performance test with a single click after a simple configuration. This topic describes how to install the AHBench-jenkins test suite on an ECS instance and run a performance test.

Prerequisites

Ensure that your ECS instance meets the following requirements:

  • Located in the same VPC as the Lindorm instance.

  • (Recommended) The ECS instance has 16 vCPUs or more.

  • Linux operating system.

  • JDK 1.8 or later.

  • Python 2.7.

Notes

  • The instance under test may experience high loads during the stress test. Do not run this test suite in a production environment.

  • The test suite runs only one test set at a time, and tasks within a set are executed serially. Do not run other test tasks in parallel.

  • The test suite uses the ahbenchtest-read and ahbenchtest-write tables for testing. These tables may be deleted and recreated during the test. Ensure that these tables can be safely deleted.

  • Ensure that the instance under test has sufficient storage space.

  • ECS instances run in a virtualized environment. Performance test results for the same instance type may fluctuate by 5% to 10%, which is within the expected range.

  • Before you start the service, ensure that you have configured the ECS security group to allow inbound access on port 8080. Otherwise, you cannot access the AHBench-jenkins service.

Before you begin

  • Add the primary private IP address of the ECS instance to the whitelist of the Lindorm instance. For more information, see Set a whitelist.

  • Configure the ECS security group to allow inbound access on port 8080.

  • Download the AHBench-jenkins test suite, upload it to your ECS instance, and decompress the package.

Step 1: Start the service

  1. Start the AHBench-jenkins service.

# Use the following command to set the port for the suite. The default port is 8080.
cd AHBench-jenkins-v1.0.0
./start.sh 8080
  1. In a web browser, access the service by entering the public endpoint of the ECS instance and the service port number in the format http://<ip>:<port>.

http://47.96.XX.XX:8080

Step 2: Select a test set template

  1. Click a test set template.

    Test set templates include FastTest and FullTest.

    • FastTest: Contains 10 million data entries. The test runs for about 2 hours, depending on the instance specifications, and requires at least 25 GB of storage space.

    • FullTest: Contains 2 billion data entries. The test runs for about 25 hours, depending on the instance specifications, and requires at least 2 TB of storage space.

  2. After you select a test set template, click Build with Parameters in the left-side navigation pane to configure the test task.

Step 3: Configure the test task

Required configurations

Lindorm

Parameter

Description

How to obtain

cluster_addr

The HBase Java API endpoint for the wide table engine of the Lindorm instance.

On the Database Connection page of the Lindorm console, click Wide Table Engine to view the HBase Java API endpoint.

If AHBench-jenkins is deployed on an ECS instance in the same VPC, use the internal endpoint. Otherwise, enable and use the public endpoint.

username

The database user for accessing the Lindorm instance.

Ensure that the user has global read, write, admin, trash, and system permissions.

In the cluster management system, click Data Management > User Management to grant permissions to the user. For more information, see Log on to the cluster management system and Manage ACL permissions.

password

The password for the database user.

If you forget the password, you can reset it in the cluster management system for the wide table engine. Click Data Management > User Management to change the password. For more information, see Log on to the cluster management system and Manage users.

HBase Performance-enhanced Edition

Parameter

Description

How to obtain

cluster_addr

The Java API endpoint of the ApsaraDB for HBase Performance-enhanced Edition instance.

On the Database Connection page of the ApsaraDB for HBase console, you can find the Java API Access Address in the Connection Information section.

If AHBench-jenkins is deployed on an ECS instance in the same VPC, use the internal endpoint. Otherwise, request and use a public endpoint.

username

The database user for accessing the ApsaraDB for HBase Performance-enhanced Edition instance.

Ensure that the user has global read, write, admin, trash, and system permissions.

In the cluster management system, click Data Management > User Management to grant permissions to the user. For more information, see Log on to the cluster management system and Manage ACL permissions.

password

The password for the database user.

If you forget the password, you can reset it in the cluster management system. Click Data Management > User Management to change the password. For more information, see Log on to the cluster management system and Manage users.

HBase Standard Edition

Parameter

Description

How to obtain

cluster_addr

The ZooKeeper connection string for the ApsaraDB for HBase Standard Edition instance.

On the Database Connection page of the ApsaraDB for HBase console, you can find the Java API Access Address in the Connection Information section.

If AHBench-jenkins is deployed on an ECS instance in the same VPC, use the internal endpoint. Otherwise, request and use a public endpoint.

General configurations (optional)

The following parameters are for test configuration. These include compression, encoding, thread count, data volume, field size, and test cases. You do not need to modify the default values. Modify them as needed.

Parameter

Description

test_name

The test name. Used for display purposes only.

table_name

The name of the test table. It is used to read and write data during the test.

row_len

The length of the primary key for each row.

col_num

The number of columns in each row.

col_len

The length of each column.

re_create_table

Specifies whether to recreate the table.

compression

The compression algorithm for the table. Supported compression algorithms include NONE, LZO, SNAPPY, GZ, LZ4, and ZSTD.

Note

ZSTD is supported only in ApsaraDB for HBase Performance-enhanced Edition and Lindorm.

encoding

The encoding algorithm for the table. Supported encoding algorithms include NONE, DIFF, and INDEX.

Note

INDEX is supported only in ApsaraDB for HBase Performance-enhanced Edition and Lindorm.

regions

The number of predefined partitions.

pre_load

Specifies whether to preload data. Read-related tests can be performed only on preloaded data.

load_params

Parameters for preloading, including concurrent threads, rate limit (target operations per second), and the number of rows to load.

load_wait

The wait time after preloading.

warm_up

Specifies whether to perform a warm-up read before the test.

warm_up_params

Parameters for the warm-up, including concurrent threads, run time (in seconds), and the read range.

threads

The number of concurrent test threads.

exec_time

The run time for each test case.

recordcount

The set of key ranges for read tests.

batch_rows

The number of rows for batch reads and writes.

scan_rows

The number of rows for a single scan operation.

interval_time

The wait time between test cases.

case1-case10

The test cases that run in sequence. Select the test cases to run as needed.

  • none: Does not run this test case.

  • singleread: Random read-only.

  • uniformsinglewrite: Single-row write.

  • uniformscan: Range read, uniform distribution.

  • batchwrite: Batch write, uniform distribution.

  • workload-a: A mix of random reads and random writes, 50:50 ratio, Zipfian distribution.

  • workload-b: A mix of random reads and random writes, 95:5 ratio, Zipfian distribution.

  • workload-c: Read-only, Zipfian distribution.

  • workload-d: A mix of random reads and random writes, 95:5 ratio, latest distribution.

  • workload-e: A mix of range reads and random writes, 95:5 ratio, Zipfian distribution.

  • workload-f: A mix of random reads and read-modify-writes, 50:50 ratio, Zipfian distribution.

Note
  • Some parameters are supported only in specific HBase versions. For example, the ZSTD compression algorithm and the INDEX encoding algorithm are supported only in ApsaraDB for HBase Performance-enhanced Edition and Lindorm. Configure ZSTD and INDEX for better performance.

  • To repeat the test, disable re_create_table and pre_load to skip table recreation and data import. This requires that the previous test ran successfully. When the import stage is skipped, the total test run time is about 3.5 hours. This time may vary depending on the specifications of the test instance.

Step 4: Start the test

Click the BUILD button to submit the test task to the execution queue.

Step 5: Analyze test results

After the test cases finish running, a CSV file is generated. View and download the file in your browser.

The generated files include result files for each test case (batchwrite.csv, scan.csv, singleread.csv, singlewrite.csv, and workloada.csv to workloadf.csv), the test parameter file (test_params.csv), and the summary result file (total_result.csv).

Copy the data to a data analysis application, such as Excel or Numbers, for further analysis. The following example shows the results in a CSV file.

TestName,OperationType,Throughput(rows/s),AverageLatency(us),P95Latency(us),P99Latency(us),P999Latency(us)
batchwrite,BATCH,101437.0,125750.6753771419,210431.0,254463.0,314111.0
scan,SCAN,1655724.0,7704.259769699419,21295.0,58655.0,85887.0
singleread,READ,75501.0,1689.6162362271912,2044.0,2669.0,22415.0
singlewrite,INSERT,42512.0,3001.4856138550078,4483.0,9263.0,50271.0
workloada,READ,26010.0,1996.9924856520854,2789.0,4135.0,27535.0
workloada,UPDATE,26011.0,2907.7582520171654,3963.0,5891.0,31071.0
workloadb,READ,59728.0,1989.3114753677578,2771.0,3699.0,19631.0
workloadb,UPDATE,3150.0,2770.810318072335,4025.0,5311.0,22783.0
workloadc,READ,67388.0,1892.5555709970954,2555.0,3433.0,17103.0
workloadd,READ,61513.0,1926.9758923129186,2717.0,3705.0,15391.0
workloadd,INSERT,3237.0,2781.8499603085943,4055.0,5623.0,18815.0
workloade,INSERT,188.0,4851.740461394097,13071.0,48319.0,109183.0
workloade,SCAN,349277.0,26626.44060447983,68415.0,417535.0,463615.0
workloadf,READ,28806.0,2688.784531208804,4383.0,10071.0,55967.0
workloadf,UPDATE,14402.0,3481.2656232319496,5551.0,8895.0,55455.0
workloadf,READ-MODIFY-WRITE,14402.0,6398.633906954003,9551.0,24639.0,66623.0

Troubleshooting

If a test exits with an error, check the following:

  • Java and Python are installed with the correct versions.

  • The test instance address and required configurations are correct.

  • The test instance supports the specified compression algorithm.

  • The test instance is running correctly.