Announcement

Collapse
No announcement yet.

Building The Default x86_64 Linux Kernel In Just 16 Seconds

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    @Michael
    Can you please time a whole LLVM 10.0 git build?

    LLVM / Clang
    git pull http://llvm.org/git/llvm.git
    mkdir build
    cd build
    cmake -DLLVM_TARGETS_TO_BUILD="X86;AMDGPU" -DLLVM_APPEND_VC_REV=OFF -DCMAKE_BUILD_TYPE="Release" -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_PARALLEL_COMPILE_JOBS="64/128" ../

    Look at the last variable.

    Comment


    • #22
      Michael How many gentooer do you know?

      My whole distrib is built in a tmpfs.
      All the other gentooer friends I know have configured it like that because... it's faster.

      Actually more funny, the only thing that I don't build in a tmpfs, is the kernel, because the tmpfs is /var/tmp (for portage building shenanigans)

      Comment


      • #23
        Originally posted by Michael View Post

        It's not a matter of "not heard of", but rather trying to be realistic - how many people actually build in tmpfs?
        Like others already said, it's a standard procedure these days. SSD disks don't really benefit from wear. Distro packagers want to minimize their costs. Unless you're actively developing the kernel, the only important outcomes of the building process are the zImage and the modules (on x86). Incremental recompilation isn't even recommended if you're changing the configuration.

        Now that we have containers and various flavors or overlays and CoW file systems, building a kernel in RAM is like 1 to 2 more lines of code to your benchmark scripts. I'm a bit confused.. when one has access to such beasts in terms of computing power, why aren't you even curious. If it's obvious that the I/O becomes a bottleneck, why not try:
        Code:
        mkdir /tmp/kernel
        mount -t tmpfs -o size=4G tmpfs /tmp/kernel
        tar xf https://cdn.kernel.org/pub/linux/ker...x-5.2.8.tar.xz -C /tmp/kernel
        cd /tmp/kernel/linux-5.2.8/
        make defconfig
        make -j128
        Haven't tried if that works, but I'm pretty confident it does.

        Comment


        • #24
          It would be nice to know how long this takes on NVMe and AHCI drives as well.
          But wow!

          Comment


          • #25
            someone here phoronix is really enjoying seeing amd cpu doing a lot better than intel

            Comment


            • #26
              Originally posted by RavFX View Post
              Michael How many gentooer do you know?

              My whole distrib is built in a tmpfs.
              All the other gentooer friends I know have configured it like that because... it's faster.

              Actually more funny, the only thing that I don't build in a tmpfs, is the kernel, because the tmpfs is /var/tmp (for portage building shenanigans)
              Meh, that sounds nasty. People usually assume /var/tmp persists over reboot.

              Comment


              • #27
                Originally posted by nanonyme View Post

                Meh, that sounds nasty. People usually assume /var/tmp persists over reboot.
                https://wiki.gentoo.org/wiki/Portage_TMPDIR_on_tmpfs

                It's in Gentoo doc.

                Comment


                • #28
                  Yeah, I've had /var/tmp/portage as a tmpfs on my Gentoo boxes for forever. This is a big motivation for getting at least 32gb if ram in them as building chromium nowadays can chew up close to 12gb of disk during the build. And yeah, Zen2 is a monster for compiling code - Yesterday I recompiled everything on my new 3900x Gentoo media server with GCC-9.2 and znver2 (the ebuild showed up in portage yesterday) and ~1100 packages only took about 7hrs to build.

                  Comment


                  • #29
                    I wonder though if most files aren't cached already anyways - the impact may not be as noticeable as some think.

                    Comment


                    • #30
                      Originally posted by nils_ View Post
                      I wonder though if most files aren't cached already anyways - the impact may not be as noticeable as some think.
                      So true.

                      Tried it on my poor Xeon 3470 4c/8t, 24 GB for amd-staging-drm-next.
                      Only some seconds if any.
                      Last edited by nuetzel; 08-14-2019, 11:31 AM. Reason: Typo.

                      Comment

                      Working...
                      X