ByteDance Working To Make It Faster Kexec Booting The Linux Kernel
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.