ByteDance Working To Make It Faster Kexec Booting The Linux Kernel | #linux | #linuxsecurity

ByteDance as the Chinese company behind TikTok has been working on a number of Linux kernel optimizations the past few years and their most recent work is for faster Kexec rebooting of the kernel. With their massive fleet of servers powering TikTok and other apps, they will do whatever they can to shave milliseconds off the boot/reboot time of their servers and that is what most of their Linux optimizations have been about — including this newest patch series for faster Kexec reboots.

ByteDance like many other large organizations rely on Kexec reboots to move to a new kernel either for security, maintenance, or optimization reasons. By using Kexec they avoid the more significant downtime of their servers POST’ing and other tasks. But even using Kexec to switch to a new kernel to avoid the hardware initialization and bootloader can still be too much downtime.

With today’s “faster kexec reboot” patch series they take aim at around 500 ms that can be optimized out and get the time from the machine kexec to start kernel function down to just 15 ms.

With the popularity of TikTok, Bytedance engineers continue doing whatever they can to optimize Linux kernel performance and reducing downtime of their servers.

The optimizations proposed include supporting the uncompressed kernel on x86/x86_64 to speed up the boot process rather than being a compressed kernel image, avoiding a memory copy when the kernel is uncompressed, and reusing the crash kernel reserved memory for normal kexec operations. Enabling uncompressed kernels on x86 alone shaved over 150 ms off their boot time but meant going from 8.5M to 53M for the kernel image size.

This patch series touching around 100 lines of Linux kernel code is what they are now hoping to upstream for shaving around a half second off their Kexec reboot times.

Original Source link

Leave a Reply

Your email address will not be published.

twenty seven − = twenty