apple / foundationdb

FoundationDB - the open source, distributed, transactional key-value store
https://apple.github.io/foundationdb/
Apache License 2.0
14.56k stars 1.32k forks source link

Zero-copy networking #1355

Open alexmiller-apple opened 5 years ago

alexmiller-apple commented 5 years ago

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.

mpilman commented 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.