Facebook sets Linux kernel tools free
Code to help those managing lots of servers unleashed, designated by jumbles of letters
After years of making the world more open and connected – to everyone's delight – Facebook recently moved on to bringing the world closer together.
Amid its pursuit of global compression, the data harvesting biz nonetheless developed a handful of difficult-to-pronounce Linux kernel components to make the open source operating system better suited to swarms of servers.
On Tuesday, Facebook made its suite of kernel tools available as open source, to help other organizations looking for a way to manage large numbers of Linux servers more efficiently.
"The kernel components and tools included in this release can be adapted to solve a virtually limitless number of production problems," said Facebook engineers Tejun Heo and Thomas Connally in a blog post. "...We believe that this collection of services and products will be helpful for any developer building apps to serve millions of users on multiple platforms."
First, there's BPF, a code execution engine in the Linux kernel. The name once meant Berkeley Packet Filter and now encompasses a broader set of functions. The software allows bytecode to run in response to specific events for the purpose of modifying and extending kernel behavior. In essence, it's a generic instruction set capable of making C calls.
Though based on a kernel agent for filtering packets between the boundary separating kernel and user-space, BPF is intended for more than just networking. It can be used for tracing and sandboxing, for example. Facebook uses the BPF virtual machine for network traffic optimization in conjunction with its open source Katran load balancing software.
Google and Netflix have also been involved with BPF.
Then there's Btrfs, a vowel-starved file system designed for data centers, with an eye towards fault tolerance, file repair, and easy administration. There's apparently a need for such things as Fujitsu, Intel, Oracle, SUSE and Red Hat are among the organizations that have contributed to project's evolution.
According to Heo and Connally, Btrfs has made Facebook's data centers more efficient for a variety of applications. "Recently, Btrfs helped eliminate priority inversions caused by the journaling behavior of the previous file system, when used for I/O control with cgroup2," they said.
The Register asked Facebook if it could provide any metrics to quantify how its code improves things. A company spokesperson declined to go beyond the general promise of efficiency outlined in the blog post.
That brings us to cgroup2, a Linux kernel tool for controlling workloads by dividing them into groups and allocating resources like memory, IO, and processing. Facebook uses the software to isolate and protect main system workloads from binaries and other system services being run. It even conducted a case study to document utilization improvements.
Open source turns 20 years old, looks to attract normal peopleREAD MORE
Another piece of code candy in the suite is called Netconsd. Though it sounds like a laxative, it's in fact code for shuttling and structuring Linux netconsole messages, which is to say log data.
"It logs data continuously from millions of hosts and allows engineers to extract meaningful signals from the voluminous log data noise generated in the kernel, helping on-call production engineers rapidly identify and diagnose misbehaving services," said Heo and Connally.
As a complement to cgroup2, PSI, which stands for Pressure Stall Information and serves double duty as an unintended homonym for the K-pop singer of "Gangnam Style," offers a way to measure memory, CPU, and I/O. The point of the tool is to allow organizations to respond to resource shortages before things go off the rails.
And lastly, there's Oomd. Not to be confused with an '80s techno-pop band OMD, it's a process executioner that respond to out-of-memory (OOM) conditions. Oomd intervenes in userspace to prevent OOM conditions in the Linux kernel. It supports custom logic detection and can be tailored for different workloads. ®