I tested this on my own system somewhat recently, with a Ryzen 5950X, 64 GB of 3600 MHz CL 18 RAM and a 1TB Samsung 970 Evo, using the config file that ships with Fedora 33.
I created a ramdisk as follows:
~$ sudo mount -t tmpfs -o size=32g tmpfs ~/ramdisk/
~$ cp -r Downloads/linux-5.14-rc3 ramdisk/
~/ramdisk$ cp /boot/config-5.13.5-100.fc33.x86_64 linux-5.14-rc3/.config
~/ramdisk$ cd linux-5.14-rc3/
~/ramdisk/linux-5.14-rc3$ time make -j 32
My compiler invocation was:
~/ramdisk/linux-5.14-rc3$ time make -j 32
And got the following results
Kernel: arch/x86/boot/bzImage is ready (#3)
real 6m2.575s
user 143m42.402s
sys 21m8.122s
When I compiled straight from the SSD I got a surprisingly similar number:
Kernel: arch/x86/boot/bzImage is ready (#1)
real 6m23.194s
user 154m24.760s
sys 23m26.304s
I drew the conclusion that for compiling Linux, NVMe might as well be RAM, though if I did something wrong I'd be happy to hear about it!
I created a ramdisk as follows:
My compiler invocation was: And got the following results When I compiled straight from the SSD I got a surprisingly similar number: I drew the conclusion that for compiling Linux, NVMe might as well be RAM, though if I did something wrong I'd be happy to hear about it!