Announcement

Collapse
No announcement yet.

First time ssd instalation :)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    First time ssd instalation :)

    Hello all!

    I just bought my first ssd It is an intel 330 and I've been searching for ways to get the most out of it (performance and long levity). I have come to a few things on which I'd like your opinions and advice.

    1) Partition alignment. The most detailed guide I've read is that of the following link. Is there a better/easier way than the one described?

    http://lifehacker.com/5837769/make-s...ve-performance

    2) I've read that it would be good to put the swap partition on a hdd, which in my case will be my current hdd. Thing is, that I would also like the hdd to spin down when not in use. Is this possible when having the swap on the hdd? Some wrote that there is no need for a swap partition when you are not interested in hibernation, which really is of no interest to me.

    3) Partitioning: 20GB root, 80GB home (both ext4 filesystem), rest unused in case I decide to try dual boot with some other distro or something. Should I be using the entire device or is it ok as it was with hdds?

    4) Enable trim for each partition

    5) Setting the swappiness to 0 to minimize the swap use.

    6) Remove the journaling from the ext4 filesystem to prolong the disk's life.

    7) Disabling the nepomuk desktop search thing as in my current system.


    Feel free to suggest any additional things. I am mostly in hurry for 1-3 as they are in the pre-installation stage, others can be tweaked afterwards as far as I know. I was hoping to install tonight

    Thanks in advance!

    ======================================
    UPDATE:


    Alright, after my research of the ssd info I looked for I came to some conclusions and made the following settings. All are according to the numbering of the questions I issued in the beginning.

    1) Regarding partition alignment, created partitions by:

    Code:
    sudo parted /dev/sda
    unit MiB #(change the unit to MiB)
    mklabel msdos #(make new blank msdos table)
    mkpart primary 1 20481
    mkpart primary 20481 102401
    quit
    2) No swap. Still looking into the spin down thing, I think I read that hdparm in installed by default for 12.04 but no spindown occurs if the pc is on AC power. So I guess it works out of the box for laptops, not desktops. Haven't found a gui utility in muon software center, maybe I'll research more on it at a later time.

    3) exactly as described, see (1)

    4) Not enabled, will do it manually when I feel like it. Once every week or so, maybe less. Read somewhere that automatic trim makes deleting files slower.

    5, 6, 7) no changes

    Extras:
    1) Set Bios mode to ACHI

    2) No Writes for Read Timestamps: added noatime, nodiratime in etc/fstab
    http://askubuntu.com/questions/1400/...he-os-for-ssds

    3) scheduler = noop: I added added the following command in in /etc/rc.local. Same link as before.
    Code:
    echo noop > /sys/block/sda/queue/scheduler
    Lots of thanks to everyone for their help and interest, I'll make further updates if anything interesting comes up. bb!
    Last edited by zahtar; Feb 17, 2013, 06:38 AM. Reason: updated with solutions

    #2
    Originally posted by zahtar View Post
    6) remove the journalling from the ext4 filesystem to prolong the disk's life.
    do not disable journalling!!!

    Comment


      #3
      So it could mess with things? Thanks for the heads up!

      What do you think about the rest?

      Comment


        #4
        Originally posted by zahtar View Post
        So it could mess with things? Thanks for the heads up!

        What do you think about the rest?
        Rest is very sane and good.

        Comment


          #5
          thanks mate. So I guess spindown will be ok with low swappiness right?

          I'll install and see

          Comment


            #6
            Don't bother with swap. Also spindown is irrelevant with an ssd...

            Comment


              #7
              The spindown regards the second drive, the hdd where the swap is currently located in my system.

              The idea is to install fresh in the ssd and keep the curent hdd for storage and swap with the ability to spin down when not in use.

              Comment


                #8
                If you have a lot of RAM, youll probably never use swap.

                I mount /var on my HDD...

                Comment


                  #9
                  what is /var for?

                  how about achi mode in bios?

                  currently I am in Native-ide. Should I change that? before installation?

                  thnx again

                  Comment


                    #10
                    Most advice to withhold swap from the SSD is outdated. If you need swap space and you end up accessing it - a very slow process by it's nature - why further cripple your system by putting it on the slowest device on your system? Another relevant point in this regard is the current crop of SSDs aren't delicate like they were and have the same guarantee (and thus expected lifespan) as a platter drive. Besides the vm.swappiness=1 change also set vm.vfs_cache_pressure=50 to minimize swap usage.

                    Worried about wear? Quote from Archlinux Wiki:
                    A 32GB SSD with a mediocre 10x write amplification factor, a standard 10000 write/erase cycle, and 10GB of data written per day, would get an 8 years life expectancy. It gets better with bigger SSDs and modern controllers with less write amplification.
                    Unless your drive is running near capacity, it is also currently advised to NOT enable TRIM as a mount option, rather to run it either manually or periodically. TRIM will significantly increase time for deleting files. This is purely a performance change, so do as you wish.

                    Rather than disabling journal-ling, disable access time stamping by using noatime and nodiratime mount options.

                    Other tips for performance: If you have ample RAM, mount tmpfs in RAM to further reduce drive access. Verify your scheduler is set for noop or deadline rather than cfq. In a mixed (hdd with ssd) environment, you'll want to leave the hard drives at cfq or deadline if you have several. You can enter a udev rule to control this. If I remember correctly - Ubuntu variants already have the above set by default, but it's worth verifying. I just keep all mine (1 ssd 4 hdd) at deadline.

                    Partition alignment is automatic using GPT. If you use fdisk to format, specify 32 sectors and heads when creating partitions and then start your first partition at sector 2.

                    Code:
                    fdisk -S 32 -H 32 /dev/sda
                    Assuming your SSD has a 512 Erase Block Size (most do), format partitions like this:

                    Code:
                    mkfs -t ext4 -b 4096 -E stride=128,stripe-width=128 /dev/sdXX
                    This properly aligns erase blocks with byte blocks. Sub your drive letter/partition number for XX in the above example.
                    Last edited by oshunluvr; Feb 11, 2013, 08:34 PM.

                    Please Read Me

                    Comment


                      #11
                      Originally posted by zahtar View Post
                      what is /var for?

                      how about achi mode in bios?

                      currently I am in Native-ide. Should I change that? before installation?

                      thnx again
                      AHCI is preferred.

                      BTW, you can disable journal-ing if you want - risking only your data, but stats show only a 3.5% increase in speed.

                      /var contains files written during system operation. Personally, I'd leave it on the SSD.

                      My SSD currently holds my 16GB swap and 3 linux installs. However, I use btrfs as my filesystem.

                      Please Read Me

                      Comment


                        #12
                        Originally posted by oshunluvr View Post
                        Most advice to withhold swap from the SSD is outdated. If you need swap space and you end up accessing it - a very slow process by it's nature - why further cripple your system by putting it on the slowest device on your system? Another relevant point in this regard is the current crop of SSDs aren't delicate like they were and have the same guarantee (and thus expected lifespan) as a platter drive. Besides the vm.swappiness=1 change also set vm.vfs_cache_pressure=50 to minimize swap usage.

                        Worried about wear? Quote from Archlinux Wiki:


                        Unless your drive is running near capacity, it is also currently advised to NOT enable TRIM as a mount option, rather to run it either manually or periodically. TRIM will significantly increase time for deleting files. This is purely a performance change, so do as you wish.

                        Rather than disabling journal-ling, disable access time stamping by using noatime and nodiratime mount options.

                        Other tips for performance: If you have ample RAM, mount tmpfs in RAM to further reduce drive access. Verify your scheduler is set for noop or deadline rather than cfq. In a mixed (hdd with ssd) environment, you'll want to leave the hard drives at cfq or deadline if you have several. You can enter a udev rule to control this. If I remember correctly - Ubuntu variants already have the above set by default, but it's worth verifying. I just keep all mine (1 ssd 4 hdd) at deadline.

                        Partition alignment is automatic using GPT. If you use fdisk to format, specify 32 sectors and heads when creating partitions and then start your first partition at sector 2.

                        Code:
                        fdisk -S 32 -H 32 /dev/sda
                        Assuming your SSD has a 512 Erase Block Size (most do), format partitions like this:

                        Code:
                        mkfs -t ext4 -b 4096 -E stride=128,stripe-width=128 /dev/sdXX
                        This properly aligns erase blocks with byte blocks. Sub your drive letter/partition number for XX in the above example.
                        Lot's of good advice. OP take note!!!

                        Comment


                          #13
                          Originally posted by oshunluvr View Post
                          Rather than disabling journal-ling, disable access time stamping by using noatime and nodiratime mount options.
                          IMO, "noatime" does not really give any significant benefits over "relatime" (which I think is currently the default in *buntus...if not overridden in mount options). With relatime, the access stamp is only written if the file is modified (and written to disk anyway). And relatime should work around the possible (though usually rare on desktop machines) issues with noatime.

                          EDIT: https://wiki.archlinux.org/index.php...#atime_options
                          Last edited by kubicle; Feb 12, 2013, 02:36 AM.

                          Comment


                            #14
                            oshunluvr thank you all for your thorough response! dmeyer and kubicle, thank you too

                            I am afraid my knowledge in this kind of details is so limited that I have difficulty understanding many parts of your advice. Many of the questions I put in my forst post are things from guides, blogs, forum posts etc that I read and seemed like good ideas to enhance my drive performance and reliability. I am a mainstream user with the interest to look things up, but I cannot follow in very technical details. I mainly use the pc for office and browsing, and have no programming knowledge (minimal command line knowledge as well).

                            So in order to stop wasting your time and clear things up:

                            1) what is journaling? Is it a process that every linux system uses anyway or something that a basic user can disable without sideffects? I read in quite a few places using noatime and nodiratime options (in fstab I think, I kept bookmarks) so I have them planned. Can't remember if it was in the trim enabling part.

                            2) what is the scheduler? I had the same advice in this, noop or perhaps better deadline.

                            3) I have 4GB ram (512 of which is shared for graphics use) and almost never do multitasking. And those times it is nothing crazy. I plan on using ssd for root + home and my current hdd as storage and maybe swap too. I had the impression that running torrents via hdd would be better regarding drive wear, but all advice seems minimizing those hesitations. Am I right about this? (worst case scenario includes my 3 yeas warranty for this ssd). If I end up using swap, is the swap partition supposed to be half the size of the ram? equal? double? can't remember that, but starting to think not using it anyway....

                            4) a user in another forum gave me this advice which I did follow last night creating partitions:

                            Code:
                            sudo parted /dev/sda
                            unit MiB #(change the unit to MiB)
                            mklabel msdos #(make new blank msdos table)
                            mkpart primary 1 20481
                            mkpart primary 20481 102401
                            quit
                            Do these serve different purposes than yours? Haven't installed or even formatted yet, everything can change easily without problems.

                            Thanks again for your support

                            Comment


                              #15
                              Journaling is the file system keeping tabs on your data. It runs checksums against data to verify nothing went haywire during write. There are several non-journaling filesystems and is you want absolutely the best performance you can run without it - risking data loss as a side effect. As I sadi it's about a 3% gain in speed but a large crap-shoot with your data. Not worth it IMO.

                              Scheduler is how the system determines which way to handle disk I/O tasks along with other CPU processes. Basically:

                              CFQ [cfq] (Completely Fair Queuing) is an I/O scheduler for the Linux kernel and default under many Linux distributions.
                              Noop scheduler (noop) is the simplest I/O scheduler for the Linux kernel based upon FIFO queue concept.
                              Anticipatory scheduler (anticipatory) is an algorithm for scheduling hard disk input/output as well as old scheduler which is replaced by CFQ
                              Deadline scheduler (deadline) - it attempt to guarantee a start service time for a request.

                              Assuming that your disk name /dev/sda, type:
                              Code:
                              cat /sys/block/sda/queue/scheduler
                              Sample output:
                              Code:
                              noop anticipatory deadline [cfq]
                              You can change this if you'd like by adding "elevator=deadline" to the boot line, or in a mixed environment you might prefer to leave your HDD cfq and set the SSD for deadline. To do this you need a udev rule something like this:

                              Code:
                              ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="deadline"
                              This will leave rotating disks alone, but change SSDs.

                              I'm not a big expert on udev. Hopefully, someone will jump in here.

                              Please Read Me

                              Comment

                              Working...
                              X