Help Center/ Distributed Message Service for RocketMQ/ User Guide/ Testing Instance Performance/ Testing Performance of Basic Edition RocketMQ 5.x Instances
Updated on 2026-01-26 GMT+08:00

Testing Performance of Basic Edition RocketMQ 5.x Instances

This section covers performance tests on basic edition RocketMQ 5.x instances by sending 3,800 byte messages. The performance is measured by message production/consumption rate and average production latency.

Test Environment

Do as follows to set up the test environment:

  1. Buy instances as shown in Table 1. For details about how to buy an instance, see Buying a RocketMQ Instance.
    Table 1 Instance parameters

    Name

    Flavor

    Storage Space

    ACL

    Public Access

    SSL

    rocketmq-01

    rocketmq.b2.large.4

    Ultra-high I/O | 300 GB

    Disabled

    Disabled

    Disabled

    rocketmq-02

    rocketmq.b2.large.8

    Ultra-high I/O | 300 GB

    Disabled

    Disabled

    Disabled

    rocketmq-03

    rocketmq.b2.large.12

    Ultra-high I/O | 300 GB

    Disabled

    Disabled

    Disabled

  2. Create topics as shown in Table 2. For details about how to create topics, see Creating a RocketMQ Topic.
    Table 2 Topic parameters

    Name

    Message Type

    topic-01

    Normal

  3. Create a consumer group as shown in Table 3. For details about how to create a consumer group, see Creating a RocketMQ Consumer Group.
    Table 3 Consumer group parameters

    Name

    Max. Retries

    Broadcast

    Orderly

    group-01

    16

    Disabled

    Disabled

  4. Buy a Linux ECS (with the same region, AZ, VPC, subnet, and security group as the RocketMQ instance). For details about how to purchase an ECS, see Purchasing a Custom ECS.
  5. Install Java JDK on the ECS and configure the environment variables JAVA_HOME and PATH.
    export JAVA_HOME=/root/jdk1.8.0_231 
    export PATH=$JAVA_HOME/bin:$PATH
  6. Download the benchmark suite.
    wget https://dms-demos.obs.cn-north-1.myhuaweicloud.com/rocketmq-tutorial.zip
  7. Decompress the benchmark suite.
    unzip rocketmq-tutorial.zip

Test Commands

Production command:

Run the following command in the benchmark folder:

sh producer.sh -n "${Connection Address}" -t ${Topic Name} -s ${Message Size} -w ${Number of Producer Threads}
Table 4 Message production parameters

Parameter

Description

Example Value

Connection address

Connection address of a RocketMQ instance. Obtain the address from the Connection area on the Overview page of the instance.

192.168.111.182:8100;192.168.111.14:8100

Topic name

Name of a topic created in the RocketMQ instance, which is obtained from Table 2.

topic-01

Message size

The message size is custom.

The maximum message size supported by RocketMQ is 4 MB.

3,800 (unit: byte)

Number of producer threads

Number of producer threads.

256

Run the following command with the values obtained in Table 4 to produce a message:

sh producer.sh -n "192.168.111.182:8100;192.168.111.14:8100" -t topic-01 -s 3800 -w 256

Consumption command:

Run the following command in the benchmark folder:

sh consumer.sh -n "${Connection Address}" -t ${Topic Name} -g ${Consumer Group Name}
Table 5 Message consumption parameters

Parameter

Description

Example Value

Connection address

Connection address of a RocketMQ instance. Obtain the address from the Connection area on the Overview page of the instance.

192.168.111.182:8100;192.168.111.14:8100

Topic name

Name of a topic created in the RocketMQ instance, which is obtained from Table 2.

topic-01

Consumer group name

Name of a consumer group created in the RocketMQ instance, which is obtained from Table 3.

group-01

Run the following command with the values obtained in Table 5 to consume messages:

sh consumer.sh -n "192.168.111.182:8100;192.168.111.14:8100" -t topic-01 -g group-01

Test Result Reference

Table 6 Test result reference

Metric

rocketmq.b2.large.4

rocketmq.b2.large.8

rocketmq.b2.large.12

Production rate

1,008.500/s

2,019.710/s

3,011.640/s

Consumption rate

1,008.520/s

2,019.710/s

3,010.590/s

Average production latency

26.336 ms

8.788 ms

5.876 ms