Earlier quoted context omitted.
I'm sceptical of the efficiency gains with sendfile; seems marginal at best, even in the late 90s when it was at the height of popularity.
> seems marginal at best Depends on the workload. Normally you would go read() -> write() so: 1. Disk -> page cache (DMA) 2. Kernel -> user copy (read) 3. User -> kernel copy (write) 4. Kernel -> NIC (DMA) sendfile(): 1. Disk -> page cache (DMA) No user space copies, kernel wires those pages straight to the socket 2. Kernel -> NIC (DMA) So basically, it eliminates 1-2 memory copies along with the associated cache pol…
Which makes me sceptical for the argument for kTLS which is stated in the article; what benefit does offloading your crypto to the kernel provider (possibly making it more brittle). I've seen the author of haproxy say that performance he's seen has been only marginal, but did point out it was useful in that you can strace your process and see plaintext instead of ciphertext which is nice.
[1]: https://blog.tjll.net/reverse-proxy-hot-dog-eating-contest-c...