r/AskProgramming • u/sodikovakapsle • Jul 23 '26
C/C++ What is this optimization technique called in high-performance network software?
I’m working on a traffic generator to test my own XDP/eBPF filter in a controlled lab environment (my PC sending traffic to my Raspberry Pi on my own network).
I noticed that in some applications, two programs written in the same language can have vastly different performance.
For example, some software can only send a few requests/messages per second, while others can generate thousands per second even on relatively weak hardware.
What is this concept or optimization area called?
I’m looking for topics such as:
asynchronous I/O
multithreading vs event-driven architectures
lock-free programming
kernel bypass
zero-copy networking
batching
efficient socket APIs
packet generation optimization
If I want to build a high-performance TCP/UDP packet generator for benchmarking my own network stack and XDP filter, what technologies, algorithms, or papers should I study? For traffic generator i am using c# and for the XDP filter classic C. ( or should i use different for the traffic generator? I think its okey its console app )
View all comments
Show parent comment
3
u/sodikovakapsle Jul 23 '26
Sure. A better example would be packet generators or network benchmarking tools.
Imagine two programs written in C# (or C). Both send TCP/UDP traffic from the same machine to the same target.
Program A can only generate around 10,000 packets per second.
Program B can generate several million packets per second on the same hardware.
I’m not asking about intentionally bad code with sleep() calls or obvious inefficiencies. I’m interested in the architectural and low-level techniques that allow Program B to achieve such a large performance difference.
For example: async I/O, batching, lock-free data structures, zero-copy, kernel bypass, efficient memory management, or other networking optimizations.
I’m trying to learn what this field of optimization is generally called because I’m building a traffic generator to benchmark my own XDP/eBPF filter in a lab environment.