Open alexmiller-apple opened 5 years ago
That is pretty cool! If FDB is under heavy load, the PacketWriter will probably have large amounts of data to send and receive. If FDB has little load this might not help but in that case we probably don't care.
Linux has somewhat recently introduced zero-copy networking primitives that we might be able to take advantage of.
Sending: https://lwn.net/Articles/726917/ Receiving: https://lwn.net/Articles/752188/
Commentary suggests that it's only helpful for some workloads dealing with large amounts of data, and gives feedback as to when its not being helpful or results in a copy anyway. But it should be easy for us to implement as it should only change arena lifetime, I think.