|
|
Subscribe / Log in / New account

Batch processing of network packets

Batch processing of network packets

Posted Aug 22, 2018 16:18 UTC (Wed) by dps (guest, #5725)
In reply to: Batch processing of network packets by cagrazia
Parent article: Batch processing of network packets

At least some applications were saving 100ns is worth money sometimes bypass the Linux kernel network stack. I believe that solarflare has a LD_PRELOAD library that moves some of tcp to user space, thereby avoiding context switching.

I suspect there is a lot of hardware off load too but in the final analysis somebody else got that job :-(

It might be worth knowing that solarflare et al target customers that want to be close to stock exchanges because the speed of light is finite.


to post comments

Batch processing of network packets

Posted Aug 26, 2018 0:44 UTC (Sun) by BenHutchings (subscriber, #37955) [Link]

At least some applications were saving 100ns is worth money sometimes bypass the Linux kernel network stack. I believe that solarflare has a LD_PRELOAD library that moves some of tcp to user space, thereby avoiding context switching.

It certainly used to be that the major performance win of user-level networking was not so much the avoidance of kernel/user context switches, but improving temporal locality of access to packets.

With kernel networking, the kernel has to demux incoming packets into socket queues and account for the memory allocated to each socket, as the packets come in. So the CPU will access packet headers during demux and then again some time later when the application receives the packets. With user-level networking, the hardware does demux into (typically) per-process queues and the CPU will access packet headers only when the application receives the packet. (The packet buffers are naturally accounted to the process.)

Still, the cost of context switches has been increased substantially by mitigations for speculation leaks. So that may be a bigger part of the performance advantage now.

I suspect there is a lot of hardware off load too but in the final analysis somebody else got that job :-(

I worked on Solarflare drivers up to the SFC9100 generation, and there was no TCP offload or anything really unusual there. The essential features are checksum offload, flow steering/filtering, and lots of queues.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds