LINUX LITE 7.4 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Trim on SSD
#1
I have followed the instructions in  the manual to see if trim was working on my ssd.
Instead of o,s i got a screen full of f,s.
Attached is my new fstab file.

[attachment deleted by admin, more than 25 days old]
Reply
#2
(11-01-2014, 10:17 PM)McDivot link Wrote: I have followed the instructions in  the manual to see if trim was working on my ssd.
Instead of o,s i got a screen full of f,s.
Attached is my new fstab file.

Hi,

First thing to do is check if your SSD actually support Trim?
Code:
sudo hdparm -I /dev/sda | grep "TRIM supported"

It should return something like this if it does
Code:
dave@asus-mini-1:~$ sudo hdparm -I /dev/sda | grep "TRIM supported"       *    Data Set Management TRIM supported (limit 8 blocks)
dave@asus-mini-1:~$

If it does not return anything, it does not support Trim,
If it does, try
Code:
sudo fstrim -v /
It should return something like:
Code:
/: 856668590 bytes were trimmed
It may take some time.

Here are some items on Trim, it appears there are differing opinions
on if should be done in "fstab" or doing it in "Daily" Chron job.

http://ivanblagojevic.com/2014/05/ubuntu...me-on-ssd/
http://www.webupd8.org/2013/01/enable-tr...rives.html

At present I just do it manually with the
Code:
sudo fstrim -v /

Dave
Upgrades WIP 2.6 to 2.8 - (6 X 2.6 to 2.8 completed on: 20/02/16 All O.K )
Linux Lite 3.0 Humming on a ASRock N3070 Mobo ~ btrfs RAID 10 Install on 4 Disks Smile

Computers Early days:
ZX Spectrum(1982) , HP-150 MS-DOS(1983) , Amstrad CPC464(1984) ,  BBC Micro B+64(1985) , My First PC HP-Vectra(1987)
Reply
#3
Nice one Dave Smile
Reply
#4
(11-02-2014, 05:18 AM)Valtam link Wrote: Nice one Dave Smile

I'm fortunate enough to have SSD's on my PC's so I needed to do some research to make the most of them.
There are some things to optimise usage, but that can be another "Tips" post possibly.
Dave
Upgrades WIP 2.6 to 2.8 - (6 X 2.6 to 2.8 completed on: 20/02/16 All O.K )
Linux Lite 3.0 Humming on a ASRock N3070 Mobo ~ btrfs RAID 10 Install on 4 Disks Smile

Computers Early days:
ZX Spectrum(1982) , HP-150 MS-DOS(1983) , Amstrad CPC464(1984) ,  BBC Micro B+64(1985) , My First PC HP-Vectra(1987)
Reply
#5
This is what I used to setup a cron job trim on my workstation and laptop.
http://www.webupd8.org/2013/01/enable-tr...rives.html
Reply
#6
Thanks Dave,
I followed your tips and this is what i see.
Any idea what the (16 block) limit would mean.
My drive is a OCZ-Vertex4 120GB
I run different version of Linux on my main pc and was with the understanding that trim was handled my the kernel without any necessary input from the user.
Maybe i am wrong on this.
Thanks again for your help.
Bill

divot@asus-VM40B:~$ sudo hdparm -I /dev/sda | grep "TRIM supported"
[sudo] password for divot:
  * Data Set Management TRIM supported (limit 16 blocks)
divot@asus-VM40B:~$ sudo fstrim -v /
/: 198092423168 bytes were trimmed
divot@asus-VM40B:~$
Reply
#7
(11-03-2014, 02:06 PM)McDivot link Wrote: Thanks Dave,
I followed your tips and this is what i see.
Any idea what the (16 block) limit would mean.
My drive is a OCZ-Vertex4 120GB
I run different version of Linux on my main pc and was with the understanding that trim was handled my the kernel without any necessary input from the user.
Maybe i am wrong on this.
Thanks again for your help.
Bill

divot@asus-VM40B:~$ sudo hdparm -I /dev/sda | grep "TRIM supported"
[sudo] password for divot:
  * Data Set Management TRIM supported (limit 16 blocks)
divot@asus-VM40B:~$ sudo fstrim -v /
/: 198092423168 bytes were trimmed
divot@asus-VM40B:~$

Hi Bill,

Not sure what the blocks mean, I have seen outputs with 4, 8 and now yours 16.
Maybe it's related to how many blocks it can Trim at a time.?

The outputs all look O.K, So Trim appears to be supported and working with your SSD
Really not sure why the test didn't work.??

If you look at the links I sent, they give details on how to set-up Trim with a daily Cron Job
That seems to be the preferred/most recommended way to Trim.
From what I have read, it appears that if you add it in fstab it can add an overhead,
because it Trims every time you delete something.

Dave

Upgrades WIP 2.6 to 2.8 - (6 X 2.6 to 2.8 completed on: 20/02/16 All O.K )
Linux Lite 3.0 Humming on a ASRock N3070 Mobo ~ btrfs RAID 10 Install on 4 Disks Smile

Computers Early days:
ZX Spectrum(1982) , HP-150 MS-DOS(1983) , Amstrad CPC464(1984) ,  BBC Micro B+64(1985) , My First PC HP-Vectra(1987)
Reply
#8
Dave. Thanks again for your help i'll set up a daily cron job.
Bill
Reply
#9
I must said I have a SSD and installed on my laptop. I did an absolutely fresh introduce of windows 8.1. Furthermore, I'm new with this trimming point, thank you for the links..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)