Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Do SSD need customisation?

  1. #1
    Join Date
    Aug 2011
    Location
    Brasil
    Beans
    42
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Do SSD need customization?

    Hi!

    I'm using Ubuntu 12.04 64 bits. And a SSD.
    Do 12.04 need some customization when using SSD?
    Some time ago, SSDs needed this to get performance (i'm not talking about a few MB/s) and to preserve lifetime.
    My motherboard have AHCI and it's already enabled.

    The only think i did it not to use swap and i mount the temp to RAM. Since i use 8 GB RAM, i could afford this "luxury".
    Last edited by quirino77; May 17th, 2012 at 12:49 PM. Reason: Changing "customisation" to "customization". Spelling check told me to use the wrong one.

  2. #2
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Do SSD need customisation?

    You have done most of it. You want to change some settings to reduce writes and enable trim with the discard command in your fstab.

    How to Tweak Your SSD in Ubuntu for Better Performance
    http://www.howtogeek.com/62761/how-t...r-performance/
    See comment: There’s no reason to use BOTH noatime and nodiratime, using noatime implies nodiratime.
    http://techgage.com/print/enabling_a...rt_under_linux

    With SSD or Flash drives, Use ext2 or ext4 without journal:
    sudo tune2fs -O ^has_journal /dev/sda1
    sudo tune2fs -o discard /dev/sda1
    No swap or set swapiness or install 'Dynamic Swap Space Manager' from the Ubuntu Software Center
    After installing, change the fstab so that everything gets mounted with noatime.
    change to noop i/o scheduler

    I did not change settings when I first installed, so I did this. This comments suggest an alternative way to using discard.
    Alternate to discard, call fstrim via cron
    http://opensuse.14.n6.nabble.com/SSD...td3313048.html
    fred@fred-Precise:~$ sudo fstrim -v /
    /: 23267893248 bytes were trimmed

    fred@fred-Precise:~$ cat /sys/block/sda/queue/scheduler
    noop deadline [cfq]
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  3. #3
    Join Date
    Aug 2011
    Location
    Brasil
    Beans
    42
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Do SSD need customisation?

    Thank's oldfred.

    All the links are about 1 year old. The one from howtogeek i had read, but i got in doubt.

    Even with the latest Ubuntu (12.04), are this tweaks still necessary?

  4. #4
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Do SSD need customisation?

    You still need discard for trim and noatime to reduce writes. You can also use ext4 but turn journal off. I think that was about all I actually did.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  5. #5
    Join Date
    Nov 2008
    Location
    Sheffield, UK
    Beans
    1,514
    Distro
    Ubuntu

    Re: Do SSD need customisation?

    I just enabled discard,

    new ssd's have massive lifetimes so dont worry about the noatime

    as for alignment - dnt bother. I've installed a few SSD's in older customers PC's as an affordable upgrade, tested all with and without alignment and gained only a few MB/s

  6. #6
    Join Date
    Jan 2011
    Beans
    1,151

    Re: Do SSD need customisation?

    Quote Originally Posted by SlugSlug View Post
    I just enabled discard,

    new ssd's have massive lifetimes so dont worry about the noatime

    as for alignment - dnt bother. I've installed a few SSD's in older customers PC's as an affordable upgrade, tested all with and without alignment and gained only a few MB/s
    Not really. If your talking about SLC then maybe. Most ssd uses sandforce controller to reduce writes. If you have heavy compressed files or mp3 then there wont be any benefit
    (\ /)
    (O.o)
    (> <)
    This is Bunny. Copy Bunny into your signature to help him on his way to world domination.

  7. #7
    Join Date
    Nov 2008
    Location
    Sheffield, UK
    Beans
    1,514
    Distro
    Ubuntu

    Re: Do SSD need customisation?

    Quote Originally Posted by idoitprone View Post
    Not really. If your talking about SLC then maybe. Most ssd uses sandforce controller to reduce writes. If you have heavy compressed files or mp3 then there wont be any benefit

    \Not sure I follow

  8. #8
    Join Date
    Jan 2011
    Beans
    1,151

    Re: Do SSD need customisation?

    (\ /)
    (O.o)
    (> <)
    This is Bunny. Copy Bunny into your signature to help him on his way to world domination.

  9. #9
    Join Date
    Jul 2010
    Beans
    100

    Re: Do SSD need customisation?

    Sounds like your machine is up to date. Some of the following may then not apply, as newer SSDs are probably better, but posting it here in case it may help you or others.

    My Ubuntu experience with a netbook with Solid State Drive (SSD) was frustrating. For example when browsing the screen would freeze for a few seconds, and with annoying regularity. Its easy to find advice about why this is and how to improve things. The key problem is (allegedly) while SSDs read faster than hard drives (eg when opening a programme) they write much slower (eg when saving a file). Certainly true of older ones. And most default settings in programmes are not SSD friendly - by default the computer does lots of writing to the drive.

    I found while there’s loads of advice for this issue, for a Linux newbie it always had some key bit of info missing . So this isn’t original - it’s just what I found helpful with hopefully full instructions. It’s not for tekkies - but may help those who are new/learning. And of course any improvements welcome!

    I made these tweaks to my Acer Aspire One (A110L - 8GB) running Xubuntu 12.04 LTS. I re-formatted the SSD using file system is ext4. If you’re running different systems you may need to tweak instructions or even further advice! Now I've made the changes, it really flies, despite being an old cheap netwook.

    Please note these are system file changes so back up important files first, and preferably have a disk version of your operating system ready just in case.

    1. Stop unnecessary saving to the Hard Drive

    One thing before you begin - when you format the SSD in ext4, you should get an option about whether you want to format it with or without journaling. Without is probably best if speed is your priority, but mine is formatted with journaling, which is supposed to protect you from data loss. This also affects one of the recommended tweaks.
    
    Why use the Ext4 file system? This is because it supports TRIM which helps SSD drives. There’s an action below which (I think) only relates to ext4 file systems.

    If you have an SSD, type:

    sudo nano /etc/fstab

    This allows you to edit the fstab file - a system file which controls lots of your computers actions, so be careful.

    You can tweak your system as follows IF YOU FORMATTED WITH JOURNALLING:

    There’s a line in the fstab file as below:

    UUID=[NUMS-AND-LETTERS] / ext4 errors=remount-ro 0 1

    Insert the text in red below

    UUID=[NUMS-AND-LETTERS] / ext4 noatime,discard,data=ordered,errors=remount-ro 0 1

    A further change to fstab is below. At the end of the text, add the following (Cut and paste worked for me):

    tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
    none /var/tmp aufs noatime,br:/tmp=rw:/var/tmp=ro 0 0
    none /var/log aufs noatime,br:/tmp=rw:/var/log=ro 0 0
    none /var/cache aufs noatime,br:/tmp=rw:/var/cache=ro 0 0

    Press ctrl+x to exit. it asks if you want to save changes Y/N - answer yes to save changes

    The result? TRIM is enabled. And the computer will no longer record that you accessed files (which actually meant new info on the files ie re-write to the hard drive) which caused pauses when your netbook needs to create a temp file - I think this happens when you print or open email attachments. Instead a temporary file is created in the RAM - so writes to memory are much quicker. It also has the advantage (again, allegedly) of prolonging the life of your drive, because SSDs are likely to wear out more quickly if data is re-written to them frequently.

    Any downsides? Well your netbook won’t be keeping logs of all your activity. It loses them when you shut down. I guess most of us wouldn’t notice this. If you want to keep your log files, omit the 3rd line.

    see this link for details and other options:

    https://wiki.ubuntu.com/MagicFab/SSDchecklist

    2.Tweak your operating system so it schedules tasks to suit SSDs

    There is always lots going on in your computer - so tweak the system so the way it does them suits SSDs. The default task scheduler in Linux is an “elevator" which suits hard drives not SSDs. To change this open a terminal and type in cat /sys/block/sda/queue/scheduler

    It will show something like
    
    noop anticipatory deadline [cfq]

    Move the brackets using the cursor arrow keys until either noop or deadline is bracketed. This change needs to be done each time you log in as the system reverts to CFQ.

    There are ways to make this permanent. If the sole storage device in the system is an SSD, consider setting the I/O scheduler for the entire system via the elevator kernel parameter:

    For example, with GRUB2, add the following in /etc/default/grub:

    sudo nano /etc/default/grub

    GRUB_CMDLINE_LINUX="elevator=noop"

    Again, select ctrl+x to exit, and “y” to save changes.You must run update-grub afterwards - so then in terminal type

    sudo update-grub


    3. Speed up Firefox

    Many of my problems were with browsing. Again, because Firefox writes to the hard disk. If Firefox is your browser you can change this - in the address bar type about-config. You then get a warning - if you are happy to proceed click on I will be careful, I promise.

    Click the right mouse key somewhere on the list that has appeared, select “new” then “integer" tell Firefox you want a new integer - name it toolkit.storage.synchronous and set its value to 0.

    Firefox by default caches data to the hard drive. This is no good for a slow-writing SSD but it can be fixed by telling Firefox to cache data in a temporary file in RAM (/tmp) which you set up under the first step.

    To do this, type about:config in the browser window. Click ‘I’ll be careful, I promise!’ and then create a new string by (as above) right-clicking and selecting new and then string and naming it browser.cache.disk.parent_directory - when Firefox asks for a value type ‘/tmp’

    Result? Firefox saves to the temp file in RAM (quicker)

    Another alternative to this in about:config - you can achieve similar result by typing browser.cache.disk.enable and double clicking on the line to set it to false, which will stop Firefox caching to disk completely.

    Other Firefox fixes:

    Another issue is Firefox’s default maintenance of a large history file of where you browse. In older versions you could reduce the size by reduce in options the number of days it stores (edit-preferences-privacy) eg to 10 .

    New versions only allow you to disable history through edit/preferences/privacy.

    REFERENCES

    Here are links with useful suggestions

    http://tombuntu.com/index.php/2008/0...-state-drives/

    https://wiki.archlinux.org/index.php/Solid_State_Drives

    http://itezer.com/blog/ubuntu-linux/...-with-ssd.html

  10. #10
    Join Date
    Aug 2011
    Location
    Brasil
    Beans
    42
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Do SSD need customisation?

    My fstab is:

    UUID=xxx / ext4 noatime,discard,nodiratime,errors=remount-ro 0 1
    tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

    I will try the others mounts you told.


    I have journal on on my / partition. Can i turn it off being the / ? If i could, is it with the command: sudo tune2fs -O ^has_journal /dev/sda3

    I used to make the Firefox tweak to use the temp. But not anymore since i also use Chrome and Chromium and i don't know how to do the same on them.

    By the way, i don't few my machine slow or with freezes. I feel it quite fast. I'm satisfied, just want to preserve the SSD.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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