Laminar, Mio, and IOCP Potential Issue

(Fletcher) #1

This is for discussion the potential issue we have between the three.


(Justin LeFebvre) #2

I’ll give a quick rundown of the issue we’re seeing. Recently, I’ve put together a PR ( to convert the underlying UDP socket we’re using to pull bytes from the network from the std library socket to a mio socket. As part of the review of the PR, @TimonPost put together an example script to try to exercise the system a bit and mentioned that he was receiving far fewer packets than were being sent. I, then, took the same script and ran it on my Mac expecting to see similar behavior but it seemed to be working fine for me. I was able to receive all of the packets the client was sending. @TimonPost then ran the same test on Linux and was also able to receive all of the packets without any issue.

Suspecting that the issue may stem from Mio’s Windows support itself, I went looking to see if there was an issue specifically about UDP support in Windows and found this which seems to point to there being some problems in the underlying Windows system for Mio. However, and correct me if I’m wrong, in some preliminary testing using Mio directly by running their benchmarks and by running our own benchmarks, we are not seeing the same level of performance degradation that Laminar is currently exhibiting.


(Fletcher) #3

Using mio directly, @TimonPost did not see any issues on Windows. I’m guessing there is some odd interaction with the laminar code and how mio uses iocp, but we’ll have to investigate more.