Announcement

Collapse
No announcement yet.

Building The Linux Kernel In 60 Seconds

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

  • #21
    Originally posted by haplo602 View Post
    why isn't there a kernel compile time test in the 8150 test in the first place ? this would not start if you would stick to a standard test setup and not use tests not included there for anything.

    I went through both BD tests (original one and compiler comparison) and no kernel compile time graph. don't try to refer me to openbenchmarking.org. the site has a horrible layour for me (completely unintuitive and unclear) and there are very few people that will actualy look there if they don't find information in phoronix.com articles.
    Only tests used in articles are those in the Phoronix Test Suite / OpenBenchmarking.org, which are all in a standardized configuration. The results are on OpenBenchmarking.org.
    Michael Larabel
    http://www.michaellarabel.com/

    Comment


    • #22
      Originally posted by Michael View Post
      Only tests used in articles are those in the Phoronix Test Suite / OpenBenchmarking.org, which are all in a standardized configuration. The results are on OpenBenchmarking.org.
      "I refuse to actually tell the truth, now your procrastination will make sure you won't find the result, so bugger off."

      Comment


      • #23
        Originally posted by del_diablo View Post
        "I refuse to actually tell the truth, now your procrastination will make sure you won't find the result, so bugger off."
        The compile time results of the FX-8150 and 7 other CPUs will also be in the 3960X review when published, if you don't feel like clicking around OpenBenchmarking.org to find them.
        Michael Larabel
        http://www.michaellarabel.com/

        Comment


        • #24
          Originally posted by Michael View Post
          The compile time results of the FX-8150 and 7 other CPUs will also be in the 3960X review when published, if you don't feel like clicking around OpenBenchmarking.org to find them.
          I sometimes wonder if you've tried using the site yourself to find results - I thought Gentoo had a steep learning curve

          Comment


          • #25
            Originally posted by FireBurn View Post
            I sometimes wonder if you've tried using the site yourself to find results - I thought Gentoo had a steep learning curve
            Search -> click -> Done. Feature requests and other constructive feedback is always welcome as well.
            Michael Larabel
            http://www.michaellarabel.com/

            Comment


            • #26
              Code:
              real    0m28.677s
              user    1m25.066s
              sys     0m0.000s
              Full kernel build from make clean. Gotta love a ccache in RAM. Great for bisecting.

              Here's my script to automate it. Only dependencies are ccache, pbzip2, bash4:

              Code:
              #!/usr/bin/env bash
              # Copyright 2010, 2011 Dan Douglas
              # License: WTFPL
              
              declare -i csize=200                                      # max total cache size
              cdir="/home/ormaaj/doc/mnt/ccache"                         # tmp directory
              cachepath="/home/ormaaj/$(basename "$(pwd -P)").tar.bz2"   # cache directory
              ccachedir="/usr/lib/ccache/bin"                           # ccache toolchain symlinks path
              
              colorsetup() {
                  set -- 'red' 'setaf 1' 'green' 'setaf 2' 'reset' 'sgr0'
                  while (($#)); do
                      colrs["$1"]="$(tput -S <<<"$2")"
                      shift 2
                  done
              
                  echo() { printf -- '%s\n' "${colrs['green']}${@}${colrs['reset']}" ''; } >&2
              }
              
              die() {
                  printf '%s\n' "${colrs['red']}${!#:-'Error occured.'}${colrs['reset']}" ''
              
                  if [[ $1 == -n ]]; then
                      echo 'Nonfatal, continuing...'
                      return
                  else
                      local -i frame
                      while caller $frame; do
                          ((frame++))
                      done
                  fi
              
                  exit 1
              } >&2
              
              cleanup() {
                  echo 'Cleaning up tmpfs...'
                  umount "$cdir" || die -n "Failed unmounting tmpfs at: ${cdir}"
              }
              
              doCcache() {
                  if [[ ! -e $cdir ]]; then
                      echo "No existing temporary cache directory ${cdir}, creating..."
                      mkdir -p "$cdir"
                  fi
              
                  mount -t tmpfs -o "size=$((csize+50))m" tmpfs "$cdir" || die 'mount failed'
              
                  trap -- 'cleanup' EXIT
              
                  if [[ -e $cachepath ]]; then
                      tar --use-compress-prog=pbzip2 -xvf "$cachepath" -C "$cdir" || die 'Failed unpacking cache files'
                  else
                      echo "No previous cache found at: ${cachepath}, creating new." >&2
                  fi
              
                  export PATH="${ccachedir:-'/usr/lib/ccache/bin'}:${PATH}" CCACHE_SIZE="$csize" CCACHE_DIR="$cdir"
              
                  echo "$(ccache -s)"
                  doCompile
                  echo "$(ccache -s)"
                  pushd "$cdir"
                  tar --use-compress-prog=pbzip2 -cf "$cachepath" * || die -n 'Tar failed to pack up the ccache files!'
                  popd
                  cleanup
                  trap - EXIT
              }
              
              doCompile() {
                  make clean
                  if make -j8; then
                      make modules_install  || die
                      make firmware_install || die
                      cp "./arch/$(uname -m)/boot/bzImage" "/boot/$(basename "$(pwd -P)")" || die 'Failed while copying kernel image.'
                  else
                     die 'make failed'
                  fi
              }
              
              main() {
                  local -A colrs
                  colorsetup
                  pushd /usr/src/linux
              
                  if [[ $1 == -n ]]; then
                      doCompile
                  else
                      doCcache
                  fi
              
              #    schedtool -D -e emerge -v @module-rebuild
                  popd
              }
              
              main "$@"
              
              # vim: fenc=utf-8 ff=unix ts=4 sts=4 sw=4 ft=sh nowrap et :

              Comment


              • #27
                I think it's safe to say that Phoronix has sold out just like the other sites, as Michael has declined to be "open" and provide his kernel compiling parameters, but instead just invited us to stay tuned for his next article.

                I compiled the kernel with

                make defconfig
                export CONCURRENCY_LEVEL=8
                time make-kpkg --initrd --apend-to-version=-test kernel_image kernel_headers

                On the following setup:

                FX-8120
                64GB Crucial SSD as boot drive, also where the kernel source was compiled
                16GB of DDR3-1600

                and compiled it in 4 minutes and 30 seconds. HOWEVER, the actual compilation took between 1.5 and 2 minutes with 90%+ CPU utilization across all cores the entire time, and the rest was those scripts that run before and after, where CPU and disk utilization are all well under 50% the entire time. This casts doubt on exactly how Michael is timing this benchmark, as I'm sure he can't be timing the entire make-kpkg command, which is what any logical person would consider a timed kernel compiling, and there's no way that the Intel CPU can somehow magically perform the non-CPU bound portion of the compile faster.

                Of course, even if you compile the Linux kernel 10 times a day, the supposed, let's say: 10 extra minutes of waiting(assuming that we're comparing just the compilation part), is hardly going to inconvenience anybody, and I dare say that a $1000 16 core Opteron will do just as good and probably better than a $1000 Intel Xtreme edition CPU, not that anybody should be able to notice or care about it when the times are already so fast to begin with.

                Comment


                • #28
                  Originally posted by leeenux View Post
                  I think it's safe to say that Phoronix has sold out just like the other sites, as Michael has declined to be "open" and provide his kernel compiling parameters....
                  Huh? It's all open-source and there as part of the Phoronix Test Suite. Fetch the Phoronix Test Suite and run "phoronix-test-suite benchmark build-linux-kernel" and it will download, setup, and run the build test just like I do and then spit out your times.
                  Michael Larabel
                  http://www.michaellarabel.com/

                  Comment


                  • #29
                    AMD has been a fscking loser for a long time, just like Mr Q

                    Comment


                    • #30
                      Learning curve

                      I agree the learning curve for the openbenchmarking.org site is difficult. I gave up when I first tried to understand the site. However, I think I will pick it up on second review. I was able to find some of the results in question - Intel Core i7 3960X kernel comp. It did take me one search, then 4 clicks to find, which is very acceptable, since I still don't have a firm grasp on how to use the site. I haven't been able to get PTS working on my machine (gentoo amd64) but I'ma try again on that.

                      Comment

                      Working...
                      X