You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since there is poll_flush for triggering a send syscall (which I consider to be expensive), how about buffering data in poll_write up to the chunking threshold?
As an example, the protocol I’m currently working on alternates between writing 4 bytes and some kB. While debugging some issues I saw that the 4 bytes were sent over the wire with a 12 byte header. In my send loop I deliberately call poll_write for as long as I have data, followed by poll_flush and then waiting for more inputs. With some chunking this would probably increase bandwidth by a large factor.
I know from testing that mplex requires flushing, but since yamux currently does not (which I don’t think is documented) we’d probably need to review all protocols for proper use of poll_flush after such a change.
The text was updated successfully, but these errors were encountered:
Off the top of my head, this makes sense to me. While we have optimized this implementation for large payloads (see e.g. #100), we have not done so for small messages.
Since there is
poll_flush
for triggering a send syscall (which I consider to be expensive), how about buffering data inpoll_write
up to the chunking threshold?As an example, the protocol I’m currently working on alternates between writing 4 bytes and some kB. While debugging some issues I saw that the 4 bytes were sent over the wire with a 12 byte header. In my send loop I deliberately call
poll_write
for as long as I have data, followed bypoll_flush
and then waiting for more inputs. With some chunking this would probably increase bandwidth by a large factor.I know from testing that
mplex
requires flushing, but sinceyamux
currently does not (which I don’t think is documented) we’d probably need to review all protocols for proper use ofpoll_flush
after such a change.The text was updated successfully, but these errors were encountered: