How fast are Linux pipes anyway? (2022)

In this post, the author explores the implementation of Unix pipes in Linux by optimizing a test program. The goal is to improve the program’s performance, which initially has a throughput of around 3.5GiB/s, and eventually match the speed of a highly optimized FizzBuzz program that pushes output to a pipe at a rate of ~35GiB/s. The post goes into detail about the internals of how pipes are implemented in Linux and explains the steps taken to optimize the program. The author also highlights the use of vmsplice and splice syscalls to bypass certain performance limitations. The post assumes basic knowledge of C and delves into Linux kernel internals at certain points.

https://mazzo.li/posts/fast-pipes.html

To top