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: 200
- Producer: 200
- Consumer: 200
- Message Size: 20KB
- Message Rate: 20/s
- Ack Mode: Manual
- Throughput:
- Publish: 4000/s
- Consumer: 4000/s
- 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 200 \
--producers 200 \
--consumers 200 \
--size 20000 \
--rate 20
效能優化與影響
- 效能影響因素: How to Run Benchmarks | RabbitMQ - Blog
- 13 Common RabbitMQ Mistakes and How to Avoid Them - CloudAMQP