Results 1 to 5 of 5

Thread: Compiling the kernel on a SSD

  1. #1
    Join Date
    Dec 2009
    Posts
    77

    Default 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. #2
    Join Date
    Oct 2009
    Posts
    2,145

    Default

    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.

  3. #3
    Join Date
    Dec 2010
    Posts
    2

    Default

    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

  4. #4
    Join Date
    Apr 2010
    Posts
    1,946

    Default

    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.

  5. #5
    Join Date
    Dec 2009
    Location
    Italy
    Posts
    176

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •