https://linen.dev/ logo
I'm writing a simple HTTP file server with io_urin...
# general
r
I'm writing a simple HTTP file server with io_uring for large files. I'm hoping to use kernel offloads to move data as efficiently as possible. Ideally, data flows directly from NVMe to NIC. But more realistically, data bounces through at least one host buffer (page cache) via DMA. I thought of two possible ways 1. file -(SPLICE)-> pipe -(SPLICE)-> socket 2. file -(O_DIRECT READ)-> fixed registered userspace buffers -(SEND_ZC)-> socket I know for sure 2 will do both NVMe DMA and NIC DMA with TCP segmentation offload, so it's fast. But will 1 benefit from those same offloads? I wasn't sure if the kernel is smart enough