A brand-new Linux kernel patch from a Google engineer resolves an issue triggered by a condition that much of us might rather like to experience– having a lot of NVMe drives.
The problem is caused by the relatively long period of time it requires to appropriately close down a drive:
obviously, as much as four-and-a-half seconds. Remember Sun’s X4500 storage server, originally codenamed Thumper!.?. !?
It was really radical when it appeared: a 3U dual-processor server, but with a stonking 48 drive bays.
These days Google has a lot of boxes with a still-fairly-impressive 16 NVMe drives attached to every one. And when they need to reboot, they take a long time.
If you have a storage server with 16 drives, that’s 72 seconds of lost time hanging around whenever it reboots. Hardly an eon, however still frustrating– since it’s totally unneeded. The issue is that the kernel’s drive-shutdown
function is synchronous: for each drive, it waits for the shutdown command to finish before continuing to the next. The brand-new kernel patch does exactly the very same thing, however changes the manner in which the calls are issued to be asynchronous.
It provides the call to the first drive, then instantly proceeds to the next, and works its way down the list. When they all return the desired status, the task is done. Presto, a minute off your reboot
time. If you have more storage than Larry Page’s personal computer anyhow. Although this doesn’t straight assist
the majority of us, sometimes these sorts of modifications can have extremely enjoyable side effects. For instance, there’s a tool for kernel developers called kexec which enables one kernel to load another kernel into memory and begin it.
This has a really desirable negative effects, though: it permits you to turbocharge Linux restarts. Because your computer has to invest a minute or so in its firmware, carrying out some self-tests and so on before it loads the os, if you can bypass that and simply restart directly from one OS into the other, you can reboot in seconds rather than minutes.
And if you’re thinking that you have an SSD and bootups are super fast anyway, the result is even more severe with an SSD.
® Bootnote Like many other things, development has actually made things worse, and unfortunately, installing the kexec-tools plan on Ubuntu, which used to just magically work, now does not.
Do let us understand if you discover a working repair.