tokio-smoltcp
tokio-smoltcp copied to clipboard
[Question] Performance issue in multi-thread runtime
I couldn't find another use cases in Github with tokio except yours.
I am working on a Project with also using smoltcp
as an user space network stack and provide wrappers for interpolate with existed Tokio IO structs (TcpStream, ...), but I found some problems:
- Since
Interface::poll
requires to call frequently in a very short interval, it have to be put in a separated task (the Reactor in this Project). - In the latest version of
smoltcp
,SocketSet
is now managed byInterface
, so if you want to callInterface::poll
, and alsoAsyncRead::poll_read
andAsyncRead::poll_write
onTcpStream
(wrapper ofTcpSocket
), you will have to take a lock on theInterface
. (which is the same in this Project, the SocketAllocator).
I don't know if you have any benchmark data about the current design of tokio-smoltcp
. I made a simple test with iperf3
, which showed that the interface is relatively slower than system's network stack.
Here I open an issue and hoping you can share any informations about this with me.