Benchmark
Java Tools
Install: RabbitMQ PerfTest
Usage
#> alternatives --list
libnssckbi.so.x86_64 auto /usr/lib64/pkcs11/p11-kit-trust.so
ld auto /usr/bin/ld.bfd
mta auto /usr/sbin/sendmail.postfix
ksh auto /bin/ksh93
java manual /usr/lib/jvm/java-11-openjdk-11.0.8.10-1.el7.x86_64/bin/java
jre_openjdk auto /usr/lib/jvm/java-11-openjdk-11.0.8.10-1.el7.x86_64
jre_11 auto /usr/lib/jvm/java-11-openjdk-11.0.8.10-1.el7.x86_64
jre_11_openjdk auto /usr/lib/jvm/jre-11-openjdk-11.0.8.10-1.el7.x86_64
#> export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.8.10-1.el7.x86_64
#> cd rabbitmq-perf-test-2.18.0
#> bin/runjava com.rabbitmq.perf.PerfTest --help
Scenario #1
- Condition:
- Queue:
50200 - Producer:
100200 - Consumer:
150200 - Message Size: 20KB
- Message Rate:
50/20/s - Ack Mode:
AutoManual
- Queue:
- Throughput:
- Publish: 5000/s
- Consumer: 5000/s
Auto-Ack
- Resource:
- CPU (2 Core): 110 %
- Memory (4 GB): 8.8 %
bin/runjava com.rabbitmq.perf.PerfTest --uri amqp://<username>:<password>@<rabbitmq-server-ip>:<port>/<vhost> \
--queue-pattern 'perf-test-%d' \
--queue-pattern-from 1 \
--queue-pattern-to 50200 \
--producers 100200 \
--consumers 150200 \
--size 20000 \
--rate 50 \
--autoack20
效能優化與影響
- 效能影響因素: How to Run Benchmarks | RabbitMQ - Blog
- 13 Common RabbitMQ Mistakes and How to Avoid Them - CloudAMQP