kernel linux speed performance

Performance Boost is coming to the Linux Kernel

Kairui Song, an engineer from Tencent, has introduced a new patch series for the Linux kernel that aims to significantly improve performance by introducing a “Swap Table” infrastructure. This concept was first proposed during a LSF/MM/BPF conference, where Kairui discussed the integration of swap cache, swap maps, and swap allocator functionality within the kernel.

“People have been complaining about the SWAP management subsystem. Many incremental workarounds and optimizations are added, but causes many other problems and making implementing new features more difficult. One reason is the current design almost has the minimal memory usage (1 byte swap map) with acceptable performance, so it’s hard to beat with incremental changes. But actually as more code and features are added, there are already lots of duplicated parts. So I’m proposing this idea to overhaul whole SWAP slot management from a different aspect, as the following work on the SWAP allocator.”

The Swap Table is designed to be a more future-proof solution for managing swap operations, which are essential for handling memory in Linux systems. The current implementation of swap code in the Linux kernel is deemed less efficient in terms of memory usage and performance. By redesigning this aspect of the kernel, the new patches promise to deliver a leaner and faster system.

The first phase of these patches was posted overnight and already demonstrates promising results. Benchmarks indicate that there are a 20% improvement in most scenarios when using a VM scalability benchmark. Additionally, Linux kernel build times have seen an increase in speed by up to a few percent, and the Redis/Valkey in-memory database has enjoyed approximately a 6 to 7% higher throughput.

“This phase I contains 9 patches, introduces the swap table infrastructure and uses it as the swap cache backend. By doing so, we have up to ~5-20% performance gain in throughput, RPS or build time for benchmark and workload tests.

Testing has shown that phase I has a significant performance improvement from 8c/1G ARM machine to 48c96t/128G x86_64 servers in many practical workloads.”

These initial results are very encouraging and suggest that the Swap Table could be a valuable addition to the Linux kernel. The hope is that this work will be accepted by the Linux kernel community for inclusion in the mainline kernel. Furthermore, the anticipation is that the remaining phases of the patch series will be developed and released soon, continuing the trend of performance enhancements.

It’s important to note that while these patches show significant real-world performance gains, the Linux kernel community will thoroughly review and test them to ensure they meet the high standards required for upstreaming into the mainline kernel. If successful, this could lead to substantial improvements in system performance for a wide range of applications and workloads.

Source: phoronix

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *