An introduction to netlink and details on Tenus, a networking library in golang.
SockMi is a mechanism for the migration of a TCP/IP connection between two Linux systems. Only the migrating peer of the connection needs to reside on a Linux system. The migration is completely transparent for the other peer that can reside on a system running any operating system. SockMi requires neither changes to existing Linux kernel data structures nor new system calls.
Shmoocon 2013 - C10M Defending The Internet At Scale (by theprez98)
Now that we have the C10K concurrent connection problem licked, how do we level up and support 10 million concurrent connections? Impossible you say. Nope, systems right now are delivering 10 million concurrent connections using techniques that are as radical as they may be unfamiliar.
A gentle introduction to the difficult art of writing kernel module.
A look at how Go programs keep time information in Linux. Syscalls, monotonic clocks and locales…
Kernel-bypass networking is gaining popularity. This means moving control of Ethernet hardware directly into userspace processes to avoid the overhead of communicating with the operating system kernel. This gives userspace all of the raw performance traditionally enjoyed by the kernel – and all of the responsibility too. This is important for certain specialized applications that can gain as much as 20x more performance.
splice() is a Linux system call that can be used for copying data from a socket to another socket or a file. The big advantage of using splice is that it performs the data transfer with the so-called zero-copy: data remains in kernel space and is never copied to user space, and that makes a big difference.
This code shows how to use splice from Python. From the description:
Using the ‘splice’ syscall from Python, in this demonstration to transfer the output of some process to a client through a socket, using zero-copy transfers.
I did’t know Linux implemented this kind of optimization: code generation on the kernel for parsing network packets. When you want to filter some network packets that go through the kernel, this JIT mechanism generates native code for your filtering rules, so parsing is several orders of magnitude faster…
Contrary to common sense, large buffers are really a big problem on servers and routers. These are some of the countermeasures included in the latest Linux kernel (see this as well)
Kernel SamePage Merging is a recent linux kernel feature which combines identical memory pages from multiple processes into one copy on write memory region