I ran the first RUDP tests and here’s what I got:
Using zlib compression, local host, release and 16MB messages in a tight loop – ~80MB/s. It’s limited by the compression speed
Same test but without compression – ~1GB/s
Message spam test:
Local host, release, 200byte messages in a tight loop – 70K/s.
Main purpose of the test was to check for obvious bottlenecks and other issues. I found a couple that were crippling performance – like my pool not working correctly and loosing some datagrams, or the allocation of the shared_ptr ref_count (which I replaced just now with a boost::intrussive_ptr). So far it seems to work ok.
I need to redo the tests on the raspberry pi but I’ll be limited by the wifi, for sure.
Next on my list are:
– Handle connection loss. Now if one end drops the other end will start pooling messages until it’s out of memory.
– Limit the amount of pending messages I can allow. If bandwidth is low I need to cut down the data rate to avoid messages stacking up in the RUDP queues.
– Tune it on the actual hardware. I need to figure out the optimal MTU and minimum resend period. The MTU will be a compromise between too much protocol overhead and very expensive resends adn the minimum resend period between latency and bandwidth.