New Linux kernel patch speeds up server shutdowns • The Register

0

A new Linux kernel patch from an engineer at Google resolves an issue caused by a condition that many of us would love to encounter – having too many NVMe drives.

The problem is caused by the relatively long time it takes to properly power off a drive: apparently up to four and a half seconds.

Do you remember Sun’s X4500 storage server, originally named Thumper? It was really radical when it first appeared: a 3U dual-processor server, but with 48 drive bays. These days, Google has a bunch of boxes with a still pretty impressive 16 NVMe drives attached to each. And when they have to restart, they take a long time.

If you have a storage server with 16 disks, that’s 72 seconds of wasted time with each reboot. Barely an eon, but still boring – because it’s totally unnecessary.

The problem is that the kernel’s disk shutdown function is synchronous: for each disk, it waits for the shutdown command to complete before moving on to the next one. The new kernel patch does the exact same thing, but changes the way calls are issued to be asynchronous. It issues the call to the first reader, then immediately moves on to the next and progresses through the list. When they all return the desired state, the job is done.

Presto, one minute less than your reboot time. If you have more storage than Larry Page’s home computer anyway.

Although it doesn’t directly help most of us, sometimes these kinds of changes can have very pleasant side effects. For example, there is a tool for kernel developers called kexec which allows a kernel to load another kernel into memory and start it. This has a very desirable side effect though: it allows you to turbocharge Linux reboots. Since your computer needs to spend about a minute in its firmware, self-tests, etc., before loading the OS, if you can get around this and reboot directly from OS to OS another, you can reboot in seconds. rather than minutes. And if you think you have an SSD and the boots are super fast anyway, the effect is even more extreme with an SSD. ®

Boot Note

Like many other things, progress has made things worse and unfortunately the installation of the kexec-tools package on Ubuntu, which used to work like magic, no longer works. Let us know if you find a working solution.

Share.

About Author

Comments are closed.