1

I have installed ubuntu 16.04 on my SSD(Adata Su650 240GB). I wanted to know if there are any tweaks that are needed to be done for the SSD to work properly and increase its lifespan.

Note:- During installation I didn't create any Swap partition.

1 Answers1

1

There should not be any tools needed to be activated as they already will be when installing the system. fstrim is that tool but if your ssd is not supported you can not use it anyways.

journalctl -u fstrim

will show the status.

systemctl list-timers --all

will show the active timers (so will also show fstrim).

sudo systemctl start fstrim.timer

to active it if it is disabled. It will do nothing though if your ssd is unsupported.

 lsblk --discard

to check for support. Check the values of DISC-GRAN (discard granularity) and DISC-MAX (discard max bytes) columns. Non-zero values indicate TRIM support.

And we do not use a swap partition anymore. We use a swapfile. See more /etc/fstab. It will show how swap is created on your system. Here you can also check for fstrim support: the line that mounts your ssd will have a setting errors= with the option discard.

Rinzwind
  • 299,756
  • Will swap file reduce my ssd's lifespan? If so then how can I disable it permanantely? – Nehal Choudhury Jul 05 '19 at 07:43
  • Trim already takes care of limiting writes as much as possible and you do not want to use Linux without a swap. Please read https://askubuntu.com/questions/652337/why-no-swap-partitions-on-ssd-drives – Rinzwind Jul 05 '19 at 08:54
  • If you have a HDD alongside the SSD you could put swap on the HDD but i would not be worried about the reducing of lifespan on an ssd. You are more likely to buy a new system before the end of the life of the ssd is up ;-) – Rinzwind Jul 05 '19 at 09:02
  • 1
    @Rinzwind thank God... there's somebody else on the planet who thinks that "you do not want to use Linux without a swap" :-) Bravo! – heynnema Jul 05 '19 at 14:01
  • executing this command 'sudo systemctl start fstrim.timer' gives me 'Failed to start fstrim.timer: Unit fstrim.timer not found.' what do I do now? – Nehal Choudhury Jul 07 '19 at 09:51
  • What version of Ubuntu (is it one that uses systemd?) also check that the ssd is in ext format. next check if the ssd is supported for fstrim (if any of these test fails the service is likely not installed ;) ) – Rinzwind Jul 07 '19 at 10:04
  • Its ubuntu 16.04. The ssd is in ext4 format and yes my ssd has trim support – Nehal Choudhury Jul 07 '19 at 11:08