/etc insider

since 1999 (and still editing)

kexec to solve slow reboot your Linux server

| Comments

Days when boys showed off with theirs UNIX systems uptime are mostly gone. Currently, if you don’t reboot your system it means only one of two: either you don’t get fixes for kernel issues or you have kernel live patching.

Meanwhile typical SOHO boxes have quite vivid BIOSes, “production grade” boxes are not fast usually – you can easily spend a few minutes (or even more) awaiting all those procedures to finish. In some scenarios, alas, you’re not the only person who would wait for services to come back. With kexec you can eliminate most of the delays related to BIOS and firmware activity. Having tried kernel preloading with kexec might look like this:

1
kexec -l vmlinuz-2.6.32-openvz-042stab112.15-amd64 --initrd=initrd.img-2.6.32-openvz-042stab112.15-amd64 --reuse-cmdline

To me this reduced reboot to alive network time from 55 seconds down to 12. Your mileage may be even more impressive.

Comments