Replies: 2 comments 2 replies
-
Streams will be much faster than Datagrams. You might want to turn off send buffering for the connection, but that won't make more than a 10% difference most likely. But raw TCP is usually faster than UDP because of the availability of offloads (on send and recv). But ideally, we could grab some Datapath.Light logs and analyze them with WPA to see what's up. Also, what OS & version are you using? |
Beta Was this translation helpful? Give feedback.
-
Any intuition on why Streams are faster? In my understanding Datagram doesn't do retransmissions so shouldn't it be faster than Streams? I agree about TCP offloads but I am able to get similar speeds with my standalone TCP and UDP servers (around 15ms compared to QUIC 150ms), I did have to increase the buffer in linux with I'm on Ubuntu 20.04 but I am not familiar with Datapath.Light logs, is it supported for Linux? Or should I use something else to get the logs e.g. enabling logging with this |
Beta Was this translation helpful? Give feedback.
-
Hi, I am working on creating a high-speed client/server using msquic, I don't need encryption and hence I have disabled that with
QUIC_PARAM_CONN_DISABLE_1RTT_ENCRYPTION
in my settings. I am sending5120000 bytes
of data as a test and sending through Stream and Datagram one after the other.The TCP program I wrote takes 10x less time (on a public cloud network) to transfer the data compared to my msquic approach despite disabling encryption.
Also, my Datagram approach takes even longer than Stream. For Stream I am giving the complete buffer to the API at once like this:
Whereas for Datagram I cannot give more than around
1100
as buffer length for one send, so I set it to1024
and then do a loop to send all the buffers one by one:What is the optimal approach in this case to transfer the data fast, I am not concerned about security or reliability and only looking for the optimal way to transfer the data both in Stream and Datagram scenarios (I expect the Datagram to be much faster than Stream as well).
Beta Was this translation helpful? Give feedback.
All reactions