The Dracut Initramfs Generator Is Slow - Could Be Much Faster As Shown By Distri's Minitrd
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.