Hi all,
I wrote up something on a performance footgun most of us walk right past. io.Copy looks innocent, but it is doing a lot more copying than you would think.
https://medium.com/dev-genius/zero-copy-go-why-io-copy-is-lying-to-you-sendfile-splice-11748e293462In it I cover:
- Why io.Copy does extra kernel to user to kernel round-trips
- How sendfile and splice actually move bytes without touching user space
- Benchmarks showing the real-world gap on large transfers
- Where zero-copy helps and where it does not
Curious what patterns you all reach for when squeezing throughput out of network and file I/O.