This is an old revision of the document!
MZBench & VMQ_MZBench
Overview and Installation
MZBench
is a generic load testing tool which uses bdl files to describe a load.VMQ_MZBench
is an extension (aka worker) to MZBench allowing you to load test an MQTT broker.- MZBench source code is too old to build on modern OS (Python 2 and other issues) and the official Docker image is too old to support
VMQ_MZBench
(don't ask me how I know) - An alternative Docker file works great. The incantation to run
MZBench
after the Docker container is built isdocker run --network="host" -d -p 4800:4800 mzbench
- The alternative docker file runs a listener on
0.0.0.0:4800
so point your brower to the load tester URL on port 4800 and you are good to go - You do not need to install
VMQ_MZBench
as it will be installed automatically by the bdl code.
Usage
The easiest way to use it is to log into the Docker container and create and run the bdl files from the command line. Then read the results in the web interface
- Log into container:
- find out container id:
docker ps
- log into shell:
docker exec -it <CONTAINER_ID> /bin/bash
- run test. Example:
cd /app/mzbench ./bin/mzbench run examples.bdl/ramp.bdl
Filimin Swarms
I wrote filiminSwarm2.py
which emulates groups of lamps. Because of a limitation in python and/or the mqtt implementation of python the script can only connect 340 lamps in a single Python instance. To work around this I also wrote a bash script that spawns multiple instances of the Python script (filiminSwarms2.sh
).
filiminSwarms2.sh
was able to create 60 swarms of 340 lamps each, grouped in 3s with each lamp in group touched every 5 to 7 seconds (filiminSwarms2.sh 60 3 5 7 0
) on an 8GB 4CPU Linode VM. That's a total of 20,400 lamps.- The script broke at 100 swarms
- Only 30 swarms ran successfully on 4GB 2CPU VM (broke at 40)