Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: Is there a simple guide to optimise linux for ssd?  (Read 500 times)

Bowdon

  • Content Team
  • Kitizen
  • *
  • Posts: 1205
Is there a simple guide to optimise linux for ssd?
« on: August 23, 2017, 12:25:51 PM »

I'm going to be testing Linux Mint soon on my old computer. I've been watching quite a few videos on how to install it.

When I install it on an ssd quite a few people on youtube keep mentioning about optimising it for ssd.

So my question is, does anyone have a clear and simple (very simple for me  ;D ) guide to optimise linux mint for ssd?
Logged
BT Infinity 2 - HG612 & Asus RT-N66U - ECI Cab

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 38619
  • Penguins CAN fly
    • DSLstats
Logged
  Eric

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 38619
  • Penguins CAN fly
    • DSLstats
Re: Is there a simple guide to optimise linux for ssd?
« Reply #2 on: August 25, 2017, 08:18:51 AM »

I found this useful guide to setting up trim on a recent Debian system, and it will very likely work on an Ubuntu-based system such as Mint. I've done this on my Debian Stretch system, and it all worked fine.

Quote
Command to trim an SSD:

sudo fstrim --all (or sudo fstrim -a)

Returns 0 (success), 32 (all failed) or 64 (some failed)

Commands to enable automatic trim:

A systemd .timer that will automatically run `fstrim -a` every week can be enabled in Debian with these commands:
sudo apt install util-linux
sudo cp /usr/share/doc/util-linux/examples/fstrim.{service,timer} /etc/systemd/system
sudo systemctl enable fstrim.timer
sudo systemctl start fstrim.timer

Check the status of the .timer with:
sudo systemctl list-timers

Stop the .timer from running automatically with:
sudo systemctl disable fstrim.timer

Read `man systemctl` & `man systemd.timer` for more on this.
« Last Edit: August 25, 2017, 08:23:30 AM by roseway »
Logged
  Eric

Chrysalis

  • Content Team
  • Kitizen
  • *
  • Posts: 4880
Re: Is there a simple guide to optimise linux for ssd?
« Reply #3 on: August 25, 2017, 09:35:08 AM »

a modern version of linux should do the 4k alignment for you, the only thing left is to mount with the discard flag which is needed for trim. :)
Logged
Sky Fiber Pro - Billion 8800NL bridge & PFSense BOX running PFSense 2.4 - ECI Cab

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 38619
  • Penguins CAN fly
    • DSLstats
Re: Is there a simple guide to optimise linux for ssd?
« Reply #4 on: August 25, 2017, 10:31:20 AM »

Some SSD drives have problems with continuous trim (the discard flag), and it's widely recommended to use periodic trim instead, as described in my reply number 2 above. This is discussed in the Arch Linux article I linked to earlier.
Logged
  Eric

Chrysalis

  • Content Team
  • Kitizen
  • *
  • Posts: 4880
Re: Is there a simple guide to optimise linux for ssd?
« Reply #5 on: August 25, 2017, 11:59:57 AM »

thanks for clarifying eric :)

just had a quick look at the article you posted and learnt something new, it explains why discard was never added as a default flag. :)
Logged
Sky Fiber Pro - Billion 8800NL bridge & PFSense BOX running PFSense 2.4 - ECI Cab

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 38619
  • Penguins CAN fly
    • DSLstats
Re: Is there a simple guide to optimise linux for ssd?
« Reply #6 on: August 25, 2017, 12:27:46 PM »

Yes, the Arch Linux documentation is very good.
Logged
  Eric

parkdale

  • Reg Member
  • ***
  • Posts: 145
Re: Is there a simple guide to optimise linux for ssd?
« Reply #7 on: August 25, 2017, 06:33:54 PM »

In Ubuntu 16.04 and in Linux Mint 18.x automatic TRIM is enabled by default, when you install Ubuntu 16.04 or Linux Mint 18.x on an SSD. Namely by a weekly "cron job".
Logged