rzmq 0.5.19: crates.io | Github - Async, Pure Rust ZeroMQ with Leading Performance on Linux
In my earlier post about what was coming in rzmq 0.5.19, I said it would be an 8GB/s update to 11GB/s update, ha I was wrong and it went up to an INSANE 16.2 GB/s! After much optimization and much pain coming from bugs from both rzmq and fibre, I deliver the highest throughput ZeroMQ library in the world.
Also in this update are more socket options like enabling ZMTP 2.0 for old devices. Someone had it implemented in the library in their own branch, so I adapted it so I could do protocol switching. Another option for controlling the io-uring zerocopy send threshold so you don't waste zerocopy sendbuffers on small payloads. Sometimes, copying is better. More options to control send/recv batching, mostly for throughput sockets like PUB/SUB and PUSH/PULL, the more you send, the bigger the batches should be, but up to a point some batches can be too big for caches. Reducing the batch count and sizes can be helpful for request/response sockets like REQ/REP, DEALER/ROUTER.
Better backpressure valves and a more correct fairness system for picking sockets have been added.
One of the bugs that was fixed artificially lowered throughput and increased CPU usage. Yikes! I'm surprised I did not catch it, but one bug here, restructure here, bug over there led me to a throughput killer. As soon as I squashed it boom, a rocket was launched!
io-uring is back to the old architecture where work is done on the worker. Lots of code reuse after the restructure though. Many bug fixes happened here! To scale up io-uring, I will consider if multiple workers is beneficial in the future.
fibre 0.5.10 is also out with bug fixes and a HUGE PERF UDPATE to SPSC. A breathtaking 10 item/s increase from 14M item/s throughput to a massive 24M item/s through the bench crate. Though it is rated at a SCREAMING 200M items per second via criterion benchmark. There's room for punishment in trying to increase it too!
rzmq is more stable, more correct, more cpu and memory efficient than the last version. It offers flexible simultaneous tokio and io-uring (per socket opt in) with NULL/PLAIN/CURVE/NOISE-XX over both standard and io-uring.
rzmq is an ongoing effort to deliver the LEADING edge performance on Linux.
