Oracle Unveils Automatic Optimization System for Linux Nucleus Parameters

Oracle BPFTune, a project designed to automatically optimize Linux kernel settings, has been announced. BPFTune takes into account the tasks performed, activity in the system, and nature of the load. The project leverages the BPF kernel subsystem and is written in the SI language. The code is available on GitHub under the GPLv2 license.

The creation of BPFTune was motivated by the need to optimize self-sufficient systems with minimal administrator intervention. Additionally, the increasing complexity of modern kernels, with over 1,500 SYSCTL parameters affecting performance and resource consumption, makes manual optimization challenging. Administrators often rely on ready-made recipes without fully understanding their implications.

BPFTune continuously monitors the system’s state, adjusts kernel parameters affecting performance, and evaluates behavior changes to achieve optimal results. The project goes beyond common system statistics by considering detailed behavior of individual components, enabling fine-tuning at the socket and device level.

BPFTune implements optimizations through plugins loaded during process launch as shared object libraries (SO libraries). Each optimization plugin includes a BPF program and a user-space component. Plugins use the global ring buffer BPF to transfer events from the kernel to user space. Administrators can select plugins based on their needs and the plugins can be automatically disabled if the administrator manually modifies the associated kernel parameters.

During the auto-building process, BPFTune strives to find the optimal balance between resource provisioning and consumption while considering the indirect impact of changes. For example, increasing the network buffer size can increase throughput but also consume more memory and introduce data transmission delays. These trade-offs are taken into account to find the best settings.

BPFTune offers several plugins for different optimizations:

  • bpftune-tcp-cong – Automatic selection of optimal congestion control algorithm for network overload.
  • bpftune-neigh – Automatic selection of table size for MAC addresses of neighboring hosts (ip Neighbour or ARP table).
  • bpftune-ROTE – Automatic selection of routing table size.

/Reports, release notes, official announcements.