Help Center/ Distributed Message Service for RocketMQ/ User Guide/ Testing Instance Performance/ Testing Performance of Basic Edition RocketMQ 5.x Instances
Updated on 2024-11-14 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 1 KB 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

    rocketmq-01

    rocketmq.b2.large.4

    Ultra-high I/O | 300 GB

    Disabled

    Disabled

    rocketmq-02

    rocketmq.b2.large.8

    Ultra-high I/O | 300 GB

    Disabled

    Disabled

    rocketmq-03

    rocketmq.b2.large.12

    Ultra-high I/O | 300 GB

    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:

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

Consumption command:

sh mqadmin consumeMessage -n "${Connection Address}" -t ${Topic Name} -g ${Consumer Group Name}

Test Result Reference

Table 4 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