Announcement

Collapse
No announcement yet.

Compiling the kernel on a SSD

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

  • Compiling the kernel on a SSD

    I have a Vertex 2 SSD. FS is ext4 with noatime, discard options.
    /tmp, /var/log, etc... are mounted on tmpfs in ram.

    Is it recommended not to compile the kernel on an SSD because of the amount of the small writes decreasing the life of the disk?

    If so, having the sources in the ssd (due to the speed of the reads), how can i compile in ram or an HDD???

    thanks.

  • #2
    Kernel compiling probably won't be drastically worse on the SSD as just copying the kernel source onto it a few times. Remember that the various small writes are not subsequent writes to the same files, but just the creation of a lot of new files. In this regard, it is really not much different making all those small writes as making one great big write.

    In order to build the kernel in RAM would take a very significant amount of RAM. Probably on the order of 8+ GB, maybe 16+. You have tons of RAM? The most obvious way to accomplish this would be to union mount a ramdisk to the kernel source/build path.

    Comment


    • #3
      If you have lots of RAM, you can probably reduce I/O to the SSD by mounting your /tmp directory in a ram disk. I do this on an Eee PC 901 which has a relatively slow SSD for the root partition with:

      Code:
      tmpfs /tmp tmpfs defaults,nosuid 0 0
      in /etc/fstab.

      That should reduce writes to your SSD.

      -hank

      Comment


      • #4
        Ouch its MLC. I won't expect actual life time more than 100k hours. SLC are way better with over 2mln hrs and reported to be used in military, but the cost..

        I stay with HDD + tmpfs till SLC drop in price.

        Comment


        • #5
          I usually compile kernels in RAM (SSD is a Crucial C300 256Gb). It is simply matter of unpacking the source in /tmp (tmpfs) and doing everything else as usual. I have 8Gb of RAM and no swap, but less than 6GB are actually used in the process.

          Comment

          Working...
          X