![]() | ||||
| Credits: | The XMQ web site is provided by Linotex. | The XMQ and SPTK Windows installers are created with Advanced Installer free Open-Source license. | ||
| There were 0 unique visitors to this page | |||||||||||||||||||||||||||||||||||||||||
MQTT Performance Tests: Message PersistencePersistenceEverything on the other test pages runs in memory. This page measures what it costs to make delivery survive a broker restart: every session is persistent, every message is QoS 1, and the record of each delivery is written to Redis before the message is handed on. Nothing is lost if the broker stops, and the question is what that guarantee is worth in throughput and latency. The scenario is point-to-point, the same shape as the in-memory point-to-point page: each publisher has its own subscriber on its own topic, so the broker does no fan-out and what is measured is the per-message cost of routing plus the cost of persisting it. Both client groups connect with This configuration answers a particular need, and is not the one most deployments want. Persistence earns its cost where a message that never arrives is worse than a message that arrives late: commands to equipment that is intermittently connected, orders and transactions, anything a subscriber must receive even if it was offline when the message was sent, or if the broker restarted between the two. For live telemetry, metrics and status streams — where the next reading supersedes the last and a gap costs nothing — persistence buys nothing, and the in-memory figures on the other test pages are the ones that apply. It is worth setting the numbers below against that. Workloads that genuinely need durable delivery are usually counted in messages per device per minute rather than per second, so the rates measured here are well clear of what they ask for. The ceiling matters when durable and high-volume traffic share one broker, and the two can be separated: only sessions connecting with
10K 20K 30K 40K (beyond capacity) Latency uses a logarithmic axis. A flat line is a broker keeping up; a line that climbs for the whole run is a backlog growing behind it, and is drawn dashed. Hover the chart for per-interval values. Reading the results
Where the cost goes, and how to trade itBy default XMQ is fully durable: a QoS 1 message for a persistent session waits for its Redis record before it is delivered. Because the sending thread is parked for that round trip, the writes never overlap — one message, one round trip — and that, rather than the amount of work Redis does, is what sets the ceiling above. The For comparison, the same hardware and the same point-to-point shape without persistence sustains over 100,000 messages/second at 278us (see Point-to-point). Durability is therefore worth roughly a threefold reduction in throughput — and that is a lower bound, since the in-memory run had not reached its own limit. |
