4 ms·
What it means is that it doesn't matter if they are faster or not because the OS isn't the bottleneck. The bottleneck is the framework or the user application i
by shin_lao 11y ago
What it means is that it doesn't matter if they are faster or not because the OS isn't the bottleneck. The bottleneck is the framework or the user application in most of the cases.
- mwcampbell 11y agoThat, and you're giving up a lot to gain that marginal increase in performance.
- dsp1234 11y agoone does not typically find that applications are limited by user-kernel context switches. the OS isn't the bottleneck. Curious, then why are we seeing articles here all the time on bypassing the linux kernel for low latency networking?
- Twirrim 11y agoJust curious, how does a unikernel solve network latency?
- masklinn 11y agoThe issue GP talks about comes from the cost of context-switching on a syscall (going into "kernel mode", performing the call, then going back into "application mode"). There's no context switch in a unikernel.
- BrainInAJar 11y agoWell, unless you count the hypervisor context switch, which you do.
- silly1 11y agoAre you assuming SRV-IOV passthrough (which has its own performance profile) ? Because normal virt -definitely- hits a context switch when it goes from unikernels virtual NIC to real NIC, if not twice.
- shin_lao 11y agoYou don't bypass the kernel, you bypass the TCP stack of the kernel and this is for very specific applications.
- elihu 11y agoBypassing the kernel entirely is pretty normal in HPC applications. Infiniband implementations typically memory-map the device's registers into user-space so that applications can send and receive messages without a system call.
- shin_lao 11y agoThis is not bypassing a kernel. This is called Remote Direct Memory Access (RDMA) and there is still a kernel. FYI most of the devices inside your computer work through DMA.
- EvanPlaice 11y agoOn in particular is network capturing via libpcap. It's basically an alternative driver that comes with additional capabilities. Such as capturing promiscuously, and filtering captures.
- u320 11y agoUnless you are running a load balancer, static http server or in-memory key-value store. Those aren't exactly fringe use cases.
- shin_lao 11y agoDevelopers of such software might care about unikernels, users, probably less.
- acdha 11y agoEven in those examples, it applies mostly to the subset of users who have very large numbers of very simple requests. The ratio of kernel to userland work is bad if you're receiving an entire network request just to increment a word in memory but usually quite tolerable if, say, you're shoveling video files out and most of the time is spent in something like sendfile() or if your small request actually requires a non-trivial amount of computation.
- lmm 11y agoIf you're doing nontrivial computation that absolutely dominates the kernel overhead (almost by definition). But how frequent is that? A huge amount of programming boils down to CRUD and very basic transformations, maybe a little bit of fanning out/in, all of which involve minimal actual compute.
- Demiurge 11y agoThis is a correct approach from a developers point of view, however, it is out of scope from the operators point of view. You can always improve your software stack as a developer. These are not exclusive, and are different, should not be conflated.