What cost does kernel-bypass networking actually remove, and what do you give up to get it?
Kernel bypass moves packet handling into user space so a market-data read no longer pays a syscall boundary, a kernel-to-user copy, interrupt and softirq handling, or a scheduler wakeup. You pay for it with a core burned on busy-polling, the loss of standard network tooling, and a driver-specific build. It also connects networking to the point an interviewer is testing.
What the interviewer is scoring
- Whether you can name the specific costs bypass removes rather than saying it "avoids the kernel"
- Does the candidate distinguish a throughput win from a tail-latency win
- That they raise the operational price without being prompted - tooling, a dedicated core, harder debugging
- Whether you know that a busy-polling receive loop trades CPU and power for the removal of a wakeup
- Does the candidate identify when the kernel stack is the correct choice anyway
Answer
Short answer
Kernel bypass moves packet handling into user space so a market-data read no longer pays a syscall boundary, a kernel-to-user copy, interrupt and softirq handling, or a scheduler wakeup.
What the kernel is charging you for
Say a multicast market-data packet arrives at the network interface and a strategy process wants the price. On a conventional stack that packet passes through a chain of steps, each of which costs something, and the costs are not the same kind of cost.
The interface raises an interrupt. The CPU takes the interrupt, which means it stops whatever it was doing, possibly evicting your working set from L1 and L2 on the way. Deferred processing then walks the packet up the protocol stack. Your thread, which was blocked in recvmsg or epoll_wait, becomes runnable, and the scheduler has to decide when to actually run it - the wakeup is not the same event as being on-CPU. When it does run, the payload is copied from kernel memory into your buffer, and crossing the syscall boundary itself costs a mode switch and, on hardware with speculative-execution mitigations enabled, a good deal more than it used to.
Order these by size rather than reaching for figures. A syscall with a scheduler wakeup and a cold cache is the dominant term. A kernel-to-user copy of a small market-data message is real but much smaller. An L1 hit is far cheaper than an L2 hit, which is far cheaper than a main-memory access, which is itself far cheaper than the syscall path above. What kernel bypass removes is the top of that list, not the bottom.
What bypass replaces it with
A bypass path maps the interface's receive rings directly into the process's address space and lets a user-space thread read descriptors out of them. There is no interrupt to take, because the thread spins on the ring looking for a new descriptor. There is no wakeup, because the thread never slept. There is no syscall on the data path. Depending on the approach, there may be no copy at all: the thread reads the payload in place out of a buffer the card wrote into.
flowchart TD
A[NIC receives packet] --> B{Path?}
B -- Kernel stack --> C[Interrupt then protocol stack]
C --> E[Thread wakeup by scheduler]
E --> F[Copy into user buffer via syscall]
B -- Bypass --> G[Descriptor written to mapped ring]
G --> H[Spinning thread reads in place]
F --> I[Strategy sees the price]
H --> IThe branch worth studying is that the bypass leg has no step where control leaves your thread. Every box on the kernel leg is a place where another process, another interrupt, or the scheduler's own bookkeeping can insert delay you did not ask for.
Why the win is mostly about jitter
This is the distinction that separates a strong answer. Bypass does improve the median, but the reason a trading system adopts it is variance. Every step on the kernel leg is a place where the delay depends on what else the machine is doing. An interrupt lands on a core running someone else's work. A wakeup competes with other runnable threads. The copy touches memory that may or may not be resident. None of that shows up in a mean, and all of it shows up at the ninety-ninth percentile and beyond.
If a candidate frames bypass as "it makes packets faster", the follow-up will be about throughput, and they will lose the thread. A high-throughput bulk transfer path does very well on the kernel stack, because the per-packet costs amortise across large segments and offloads do real work. Bypass earns its keep where a single small message must be handled with a predictable delay, which is exactly the market-data and order-entry case and almost nothing else.
The bill you pay operationally
A core, permanently. A spinning receive loop consumes a full core whether or not traffic is arriving, and you will isolate that core from the scheduler so nothing else lands on it. That is a real cost in power, in heat, and in how many strategies fit on a box.
Your tooling stops working. Traffic that never enters the kernel is invisible to the ordinary packet-capture and socket-statistics tools, and to the kernel counters your monitoring already scrapes. You either use the capture facility the bypass stack provides, or you tap the traffic in hardware upstream, or you fly blind during an incident. Teams reliably underestimate this, and then discover it at the worst possible moment.
You inherit a hardware dependency and a build. The bypass path is tied to particular interface families and driver versions, so a card refresh becomes a software project. Bugs move into your process: a malformed packet that the kernel would have quietly dropped now reaches code you wrote, and a mistake in the ring-handling logic corrupts memory rather than returning an error code.
What people misjudge about where the latency went
The frequent error is treating bypass as the whole answer when it is one term in a sum. Once the syscall and the wakeup are gone, the remaining budget is dominated by things bypass does nothing about: whether your data is in cache, whether the strategy allocates on the hot path, whether the order-entry side serialises through a lock, whether the switch upstream is adding queuing delay. A team that adopts bypass without also fixing its memory layout and its allocation behaviour often measures a smaller improvement than expected, and the reason is that they removed the largest term and left the second-largest untouched.
The corollary is worth saying out loud in an interview: measure first, and measure percentiles. If your ninety-ninth percentile is being set by a garbage-collection pause, a page fault on first touch, or a lock convoy, kernel bypass will not move it.
Where the kernel stack is still right
Everything off the critical path. Configuration feeds, risk queries, logging, replay ingestion, the connection to the historical store, and the operator-facing interfaces all belong on ordinary sockets, because the operational cost of bypass is only worth paying for the messages whose delay reaches a trading decision. A design that puts the whole application on a bypass stack because part of it needed to is a design that has confused a technique with a principle.
There is also a middle position that is often the correct first step. Pinning threads, isolating cores, disabling frequency scaling, and enabling the kernel's own busy-polling on a socket removes some of the wakeup cost while keeping every tool you own. It is worth trying that and measuring before committing to a bypass stack, because the delta tells you how much of your problem was ever the kernel.
The reason to bypass the kernel is not that the kernel is slow on average, it is that every step you removed was a place where something else on the machine could make you late.
© 2026 Preptima. Originally published at preptima.com.
Likely follow-ups
- If you kept the kernel stack but pinned threads and enabled busy-polling on the socket, how much of the bypass win would you expect to keep?
- How do you reproduce a packet-loss incident on a bypass path when tcpdump cannot see the traffic?
- Where in a market-data-to-order pipeline is the first place bypass stops helping, and what dominates from there?
- How would you run two independent strategy processes on one bypass-capable interface without one starving the other?
Related questions
- How would you design an order book, and what makes it hard?hardAlso on market-data and low-latency7 min
- Why does the standard Linux network stack fail at MMO scale, and how do you bypass it using DPDK?hardAlso on kernel-bypass and networking2 min
- Why do low-latency systems preallocate arenas instead of calling the general-purpose allocator on the hot path?hardAlso on jitter7 min
- Your application cannot reach a service that should be up. Walk me through diagnosing it from the shell.mediumAlso on networking6 min