The Dracut Initramfs Generator Is Slow - Could Be Much Faster As Shown By Distri's Minitrd

Written by Michael Larabel in Operating Systems on 26 January 2020 at 08:23 AM EST. 47 Comments
OPERATING SYSTEMS
Dracut that is used for generating the initramfs image on Linux distributions like Fedora / RHEL, Debian, openSUSE, and many other distributions could be much faster.

Former Debian developer Michael Stapelberg recently demonstrated that Dracut is quite slow and could be much faster. Stapelberg was researching the initramfs generation speed by Dracut as part of his work on Distri, the experimental Linux distribution project researching fast package management. Distri remains just a research project for constructing a simple and fast package management system for constructing a Linux distribution built off Stapelberg's frustrations with Debian.

In speeding up disk image creation, Michael noticed that Dracut was spending a lot of time on initramfs generation. He was able to speed up Dracut by switching from gzip to pigz for multi-threaded compression, but still took a lot of time with a modern Ryzen 9 3900X system.

He began working on an experimental generator called minitrd that is written in the Go programming language. Thanks in part to writing in Go while Dracut is in Shell scripts with a C helper, there's a performance win right there.

In the end Stapelberg found a 20x improvement over Dracut. He isn't trying to get distributions to switch to his minitrd (and for now is just focused on the experimental Distri project), but he hopes that this will motivate developers to work on enhancing the performance of upstream Dracut for benefiting the many Linux distributions relying on it.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week