Tuning the Linux kernel with AI brings significant performance improvements

Alfonso Maruccia

Posts: 1,025   +302
Staff
In context: Linux offers developers and engineers a means to "tune" its operations, providing thousands of individual parameters that can adjust how the open-source kernel manages resources. Tuning can offer a simpler method to enhance operational performance without the need for recompilation, but it can still be a challenging endeavor, even for the most skilled FOSS coders out there.

Kernel tuning is so challenging that there is an attempt to leverage AI to handle it instead of human developers. Chinese IT company ByteDance recently presented the results of its tests with Linux kernel autotuning, an AI-based solution that could liberate human engineers and make better tuning decisions by analyzing historical data – a task humans often find challenging.

Achieving optimal Linux performance through tuning is a time-consuming process that requires a Linux expert to conduct numerous experiments. Different workloads necessitate distinct tuning approaches for various sets of kernel parameters. Cong Wang, a developer at ByteDance, mentioned that in large-scale data centers, such as those used by the company, manual tuning of the Linux kernel for "hundreds" of different workloads has become nearly impossible.

While tools designed to simplify kernel tuning do exist, they provide specific types of optimizations. ByteDance's approach aims to introduce the first automation solution in the world of kernel tuning – a technology that could cover all Linux tuning parameters with minimal engineering effort.

Wang's team specifically focused on optimizing the Linux memory management system. By employing machine learning algorithms such as Bayesian optimization, the company discovered that automated parameter tuning could achieve better results than those typically achieved by most Linux kernel engineers.

ByteDance's "autotuning machine" is designed to automatically adjust Linux internal settings based on a specific workload and hardware configuration. The kernel is dynamically tweaked to ensure optimal performance in every scenario, addressing the longstanding challenge of manually tuning the kernel for each computing instance.

The AI-based autotuning effort by Wang and colleagues seems to work remarkably well, for the most part. According to ByteDance's presentation, machine learning algorithms can dynamically optimize the system by monitoring kernel performance in real-time, providing enhanced efficiency with optimized resource usage. The AI system also features a user-friendly interface, allowing users with limited technical knowledge to benefit from a better-working kernel. Meanwhile, advanced users can customize autotuning parameters.

ByteDance claims that machine learning algorithms can reduce an application's memory usage by 30 percent or optimize HTTP network latency on an NGINX server to provide a 12 percent improvement in network performance over manual tuning. In cloud and data center scenarios, these improvements can lead to significant cost savings and performance optimization. The developers concede that kernel autotuning through machine learning doesn't work in every instance, but it is expected to become increasingly necessary.

Permalink to story.

 
When I read the title I thought AI was rewriting the Kernal and I thought that's wildly impressive but changing parameters to see what improves performance doesn't strike me as all that hard.

Wouldn't you just monitor performance and then alter each parameter (oreferably starting with the most important parameters) and see how performance changes. If it improves then you leave your change in place otherwise you change it back. Then move to the next param etc. Then loop round and restart again. When it doesn't make any more changes it can stop.You could have minimum and maximum values on certain parameters.

I'll admit that, while I'm a long time user of Linux, I've never changed any of these parameters (or felt a need to) but that sounds like it would work.
 
Like Tik-Tok, this is a brilliant way for the CCP to get a tool into your datacenter and analyze your hardware configuration and software stack and then phone home the results so that their cyber teams can exploit your operation. Tik-Tok is another brilliant covert surveillance and spying tool. Both items come across as helpful tools or a fun distraction.... meanwhile their true intent is much much more sinister. This tool may actually help you tune your kernel but AT WHAT COST. Im sorry but I trust no foreign communist entity when it comes to allowing anything in-house. People always said Kaspersky was "safe" to use also. We now know most people have booted them from being used for Virus protection.
 
But manual tuning is expensive for a reason. You don't want to for example, remove any checks on files or strings that are send to a server in general. If AI is not properly tuned, it might remove it because it provides performance.
 
Like Tik-Tok, this is a brilliant way for the CCP to get a tool into your datacenter and analyze your hardware configuration and software stack and then phone home the results so that their cyber teams can exploit your operation. Tik-Tok is another brilliant covert surveillance and spying tool. Both items come across as helpful tools or a fun distraction.... meanwhile their true intent is much much more sinister. This tool may actually help you tune your kernel but AT WHAT COST. Im sorry but I trust no foreign communist entity when it comes to allowing anything in-house. People always said Kaspersky was "safe" to use also. We now know most people have booted them from being used for Virus protection.
Any spying in an open source AI tool would be found REAL quick. People dumped Kaspersky over hysteria, not for any technical reason.

You carry a government spy device in your pocket at all times, and leave a nice slimy trail behind you whenever you access the internet.
 
Back