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:
- 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
- Create topics as shown in Table 2. For details about how to create topics, see Creating a RocketMQ Topic.
- Create a consumer group as shown in Table 3. For details about how to create a consumer group, see Creating a RocketMQ Consumer Group.
- 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.
- 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
- Download the benchmark suite.
wget https://dms-demos.obs.cn-north-1.myhuaweicloud.com/rocketmq-tutorial.zip
- 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} | 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} | 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
| 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 |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot