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:
- Buy instances as shown in Table 1. For details about how to buy an instance, see Buying a RocketMQ Instance.
- 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:
sh producer.sh -n "${Connection Address}" -t ${Topic Name} -s ${Message Size} -w ${Number of Producer Threads}
- Connection Address: obtained after purchasing a RocketMQ instance.
- Topic Name: set during topic creation.
- Message Size: 1 KB
- Number of Producer Threads: 256
Consumption command:
sh mqadmin consumeMessage -n "${Connection Address}" -t ${Topic Name} -g ${Consumer Group Name}
- Connection Address: obtained after purchasing a RocketMQ instance.
- Topic Name: set during topic creation.
- Consumer Group Name: set during consumer group creation.
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