Author Topic: TRIM not functional on SSD after adding "discard" to FSTAB?  (Read 1824 times)

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11054
  • MLUs Forever!
Re: TRIM not functional on SSD after adding "discard" to FSTAB?
« Reply #15 on: October 25, 2012, 09:12:36 AM »
Resurrecting this thread deliberately ....

I have a new build with an SSD for the OS and had been very pleased with the results ....  it was booting to LXDE desktop in less than 10 secs (usually about 8 secs I believe).

This machine has been used only for general browsing and email with Firefox, by a family member.

Today I checked it for updates etc and rebooted to be sure all was ok before leaving it .....  only to discover that it is now taking about 40 secs to get to a usable desktop!

I tried the same things as are listed in previous posts, and after issuing multiple 'sync' commands, the residue of the testfile is still reported ....  not as expected all zeros.

Details of the build and a video showing the boot are here
http://www.pclinuxos.com/forum/index.php/topic,109221.msg939996.html#msg939996

So, in the last week it has gone slow ....  and I think it happened suddenly ...  if so then it might be some hardware problem.


I am considering a complete reinstall to eliminate everything in the OS that just might have become corrupted.

If anyone has any suggestions I would be grateful.

Thanks.
MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline ferry_th

  • Full Member
  • ***
  • Posts: 242
Re: TRIM not functional on SSD after adding "discard" to FSTAB?
« Reply #16 on: October 25, 2012, 11:03:20 AM »
some reading I've found to optimize SSD perfomance in Linux. Hope it helps.

Quote
Performance and disk wear of the solid state drive (SSD) can be optimized as follows.

 -  Use the latest Linux kernel. (>3.2)
 - Reduce disk writes for read disk accesses.
        -Set "noatime" or "relatime" mount option in /etc/fstab.
- Enable the TRIM command.
       - Set "discard" mount option in /etc/fstab for the ext4 filesystem, swap partition, Btrfs, etc.
       - Set "discard" option in /etc/lvm/lvm.conf for LVM
 - Make system flush data to the disk every 10 minutes for laptop PCs.
        Set "commit=600" mount option in /etc/fstab. See mount(8).
 

More is here.
To troll or not to troll, that is the question.

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11054
  • MLUs Forever!
Re: TRIM not functional on SSD after adding "discard" to FSTAB?
« Reply #17 on: October 25, 2012, 12:49:39 PM »
some reading I've found to optimize SSD perfomance in Linux. Hope it helps.

Quote
Performance and disk wear of the solid state drive (SSD) can be optimized as follows.

 -  Use the latest Linux kernel. (>3.2)
 - Reduce disk writes for read disk accesses.
        -Set "noatime" or "relatime" mount option in /etc/fstab.
- Enable the TRIM command.
       - Set "discard" mount option in /etc/fstab for the ext4 filesystem, swap partition, Btrfs, etc.
       - Set "discard" option in /etc/lvm/lvm.conf for LVM
 - Make system flush data to the disk every 10 minutes for laptop PCs.
        Set "commit=600" mount option in /etc/fstab. See mount(8).
  

More is here.


Thanks for the suggestions ;)  In order they appear above ......

3.2.18 kernel in use
relatime in fstab (also tried noatime)
discard in fstab
not using LVM
not a laptop ... desktop PC

It seems the 'sync' command does not work as expected - from what I have read anyway.

Rather puzzled so far .....

MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11054
  • MLUs Forever!
Re: TRIM not functional on SSD after adding "discard" to FSTAB?
« Reply #18 on: October 26, 2012, 04:12:14 PM »
It seems the two events .......  the slowness and the apparent inaction of Trim .....  might not be related at all.

I am presently checking the SATA cable used ....  it might be problematic .....  need time to check .....

MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT