aquatic_udp (UDP BitTorrent tracker) performance improvements: up to 2.25 million responses per second

61 points even-greater-ape

I've done a new round of benchmarking of open UDP BitTorrent tracker implementations. Results were great for aquatic\_udp, achieving double the throughput of opentracker when running on 8 CPU cores:

​

https://preview.redd.it/o4zdisvdihba1.png?width=597&format=png&auto=webp&v=enabled&s=6a6d8ca56574c2edbfef010becef73c4bace92c8

Results can be compared to those from the previous round done a year ago:

​

https://preview.redd.it/cgryslfxihba1.png?width=563&format=png&auto=webp&v=enabled&s=c2edffe31d0017840dd8f6b46634501e6fead089

The main code improvement to aquatic\_udp since the last load testing round was writing a new HMAC-based connection id validator. Connection IDs are used to ensure that UDP packets really originate from the IP they say the do. Previously, IDs were generated randomly and stored for the duration of peer validity. The new approach is faster and saves a lot of memory. Other improvements include reducing size of peer metadata, likely causing better cache performance. Improvements to dependencies and Rust codegen probably contributed too.