Performance

Zero-copy

Move data without ever copying it to userspace.


In plain terms

sendfile(), splice(), io_uring. Kafka brokers stream from page cache directly to socket — bytes never enter the JVM heap.

Origin

sendfile(2) added to Linux 2.2 (1999). io_uring (2019) gave async zero-copy a clean userspace API. The technique appears under different names — DMA, splice, mmap+write — all the same idea: don't copy the bytes through userspace.

Where it shows up in production
  • Kafka broker Streams from page cache to socket via sendfile — bytes never touch the JVM heap.
  • Nginx static file serving sendfile on by default. The reason Nginx serves more static content per core than alternatives.
  • io_uring zerocopy_send Modern async API; standard in Linux 6+.
On Semicolony
Sources & further reading
Found this useful?