An interesting procedure change has been made in the Linux kernel regarding NVMe drives’ shut down process. The new Linux Kernel patch has changed the queueing process for the systems that have multiple NVMe drives in them, which should, as a result, vastly improve the reboot times.
Waiting for shutdown…
The Linux kernel will no longer wait for an NVMe drive to shut down to go for the next one
According to the patch notes, the old procedure for shutting down NVMe drives was synchronous; it creates a shutdown queue for all of the drives. A single NVMe drive’s shutdown takes about 4.5 seconds and servers might have way more than that. Shutting them one by one takes approximately 72 seconds, which means a lot of time for uptime-critical systems, such as servers.
The new patch changes the old procedure with an asynchronous one; which means as soon as the shutdown order is given to the target NVMe drive, the system goes for the other one without waiting for its shutting down process. This change is made at the PCIe bus level and modifies the core driver and it is backward compatible.
Theoradicly this patch would reduce the 72 seconds shutting down period to approximately 5 seconds for the NVMe drives in our example of the 16-drive system. However, the results might change in real-world applications.
It sounds like a pretty nice performance uplift for no cost.