Testing Performance of RocketMQ 4.8.0 Instances
This section describes a performance test on RocketMQ 4.8.0 instances. The test is performed by sending 1 KB messages with more than 80% CPU usage. The performance is measured by network inbound/outbound traffic, message production/consumption rate, CPU core load, and memory usage.
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
Brokers
Storage Space
ACL
Public Access
rocketmq-01
rocketmq.4u8g.cluster.small
1
High I/O | 300 GB
Disabled
Disabled
rocketmq-02
rocketmq.4u8g.cluster
1
High I/O | 300 GB
Disabled
Disabled
rocketmq-03
rocketmq.8u16g.cluster
1
High I/O | 300 GB
Disabled
Disabled
rocketmq-04
rocketmq.12u24g.cluster
1
High I/O | 300 GB
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://dist.apache.org/repos/dist/release/rocketmq/5.1.4/rocketmq-all-5.1.4-bin-release.zip
- Decompress the benchmark suite.
unzip rocketmq-all-5.1.4-bin-release.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: When testing rocketmq.4u8g.cluster.small, rocketmq.4u8g.cluster, and rocketmq.8u16g.cluster, set the number to 256. When testing rocketmq.12u24g.cluster, set the number to 640.
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.4u8g.cluster.small |
rocketmq.4u8g.cluster |
rocketmq.8u16g.cluster |
rocketmq.12u24g.cluster |
---|---|---|---|---|
Message production rate |
56,532 per second |
62,443 per second |
92,476 per second |
138,369 per second |
Message consumption rate |
53,793 per second |
60,106 per second |
90,563 per second |
116,154 per second |
Inbound traffic |
91 MB/s |
99.64 MB/s |
143.64 MB/s |
238.19 MB/s |
Outbound traffic |
223 MB/s |
314 MB/s |
451 MB/s |
674 MB/s |
CPU usage |
86% |
90% |
81% |
81% |
Average load per CPU core |
2.77 |
3.03 |
1.73 |
1.73 |
Memory usage |
63% |
55% |
49% |
47% |
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