Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ssd & trim
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Belliash
Advocate
Advocate


Joined: 24 Nov 2004
Posts: 2503
Location: Wroclaw, Poland

PostPosted: Sat Apr 19, 2014 5:56 pm    Post subject: Ssd & trim Reply with quote

Hello,


I have bought SSD disk and looks like it has some problems while TRIM is enabled. If i mount / with 'discard' option, then when recompiling any package it takes a lot of time for it to regenerate ld.so.cache.

Any ideas?
_________________
Asio Software Technologies
Belliash IT Weblog
Back to top
View user's profile Send private message
pa1983
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2004
Posts: 101

PostPosted: Sun Apr 20, 2014 5:20 pm    Post subject: Reply with quote

What model is the SSD?
_________________
NAS: i3 4360 3.7Ghz, 20Gb ram, 256Gb SSD, 65Tb HDD, NIC: Intel 2x1Gbit, Realtek 2.5Gbit
ROUTER: J1900 2Ghz, 8Gb ram, 128Gb SSD, NIC: 2x1Gbit, WIFI: Atheros AR9462 and AR5005G
Back to top
View user's profile Send private message
disperato
Tux's lil' helper
Tux's lil' helper


Joined: 27 Apr 2004
Posts: 120

PostPosted: Thu Apr 24, 2014 1:54 pm    Post subject: Reply with quote

actually the discard option worsen things. The right options that are no longer causing those long delays (understood to be some sort of internal sorting of data by the ssd chipset where the fs is too polluted with non-zeroed cells previously occupied by cancelled, erased, discarded objects) are as follow. This is the relevant part of an fstab example finely working:

Code:
# NOTE: If your  disk is an SSD, do not add option "discard"
/dev/sda1      /boot      ext2      noauto        1 1
/dev/sda2      /             xfs      relatime      0 2
/dev/sda5      /home      xfs      relatime      0 0
/dev/sda6      /data      xfs      relatime,rw   0 0
/dev/sda7      none      swap   sw         0 0
/dev/sdb1      /mnt/msw/boot        ntfs-3g   noauto,noatime,rw,users   0 0
/dev/sdb2      /mnt/msw/windows ntfs-3g   noauto,noatime,rw,users   0 0
/dev/sdb5      /workdir           xfs      relatime,rw    0 0
/dev/sdb6      /vmware      xfs      relatime,rw    0 0


Also doing occasionally (and, of course, after every long emerge, every move of very large files or conversely every move of millions of small files) an
Code:
 fstrim -a


is the key not to have garbage on your partitions, when on ssd, so to keep away the non-responsive laptop beahviour, that in the worst scenario stolen me hours.

I'm thinking of putting it into crontab, differentiate for partitions (hence no -a). The right way to deal with should be making a script that understands user or ssd inactivity and gives that command then (it lasts less than 30s to complete, I'm on 2x250GB SSD). It would be something like the windows background indexing, for anyone who knows. Doing such a script is, anyway, far beyond my knowledge.
_________________
The free men's path is always obstructed by mediocrity.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8936

PostPosted: Thu Apr 24, 2014 9:13 pm    Post subject: Reply with quote

Or buy an SSD that makes no trouble with trim. Seriously, this shouldn't be a problem anymore (and enough SSDs have gone through my hands that I should be able to tell). Anyway, as long as SSDs are still young, lots of bugs are fixed with firmware updates - check if one is available for your model.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum