Stop Letting io.Copy Steal Your Throughput — The Zero-Copy Fix

130 views
Skip to first unread message

Cheikh Seck

unread,
Jul 22, 2026, 2:01:22 AM (yesterday) Jul 22
to golang-nuts
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-11748e293462


In 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.

Duncan Harris

unread,
6:56 AM (10 hours ago) 6:56 AM
to golang-nuts
Posting pay to view article links seems to me to be not appropriate for this group.
I don't know if you intended this or not, but posting it as free to read URL would be better.

Duncan

Cheikh Seck

unread,
8:37 AM (8 hours ago) 8:37 AM
to Duncan Harris, golang-nuts

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/3cbd4b25-edbe-4e68-ad5b-59f5c893ba73n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages