SSD Trim... Just to be sure.

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

SSD Trim... Just to be sure.

Postby fpdragon on Thu Jun 28, 2012 9:36 am

Hi,

I switched to Linux Mint Maya Cinnamon on my Laptop with a Super Talent SSD.

I just want to be sure:
When I install this on default, are TRIM commands used to handle wear leveling and cleanup SSD? I don't want to reduce the lifetime of my SSD ...

thx...
fpdragon
Level 1
Level 1
 
Posts: 8
Joined: Mon Jun 25, 2012 5:48 am

Linux Mint is funded by ads and donations.
 

Re: SSD Trim... Just to be sure.

Postby oobetimer on Thu Jun 28, 2012 1:26 pm

User avatar
oobetimer
Level 7
Level 7
 
Posts: 1890
Joined: Tue Jun 01, 2010 12:53 pm
Location: Finland / above the Arctic Circle

Re: SSD Trim... Just to be sure.

Postby fpdragon on Thu Jun 28, 2012 1:51 pm

oobetimer wrote:This is good to read: http://translate.google.fi/translate?sl ... %C3%A4riin


Thanks for the reply but it seems that this article has nothing to do with the trim command...
fpdragon
Level 1
Level 1
 
Posts: 8
Joined: Mon Jun 25, 2012 5:48 am

Re: SSD Trim... Just to be sure.

Postby DrHu on Thu Jun 28, 2012 1:59 pm

The link given mentions trim and there is a linked entry in the text for TRIM, which gets you to various web sites discussing trim on various OS, windows and Linux
--however a direct Internet search gets this data
https://en.wikipedia.org/wiki/TRIM_(SSD_command)#Operating_system_support
    Enabling unsupported operating systems
    Where TRIM is not automatically supported by the filesystem, there are utilities which can send TRIM commands manually. Usually they determine which blocks are free and then pass this list as a series of TRIM commands to the drive. These utilities are available from various manufacturers (Intel,[34] G.Skill[41]) or as general utilities (hdparm since v9.17[42][43]).

And more specific trim commands available within Linux OS..
http://techgage.com/article/enabling_an ... nder_linux
User avatar
DrHu
Level 15
Level 15
 
Posts: 5902
Joined: Wed Jun 17, 2009 8:20 pm

Re: SSD Trim... Just to be sure.

Postby eanfrid on Thu Jun 28, 2012 2:02 pm

To enable automatic TRIM commands, your partition must be mounted/formatted either in ext4fs or in btrfs and have a "discard" option entry on its mount options line in /etc/fstab.

Edit ahem DrHu posted while I was writing my post :mrgreen:
Image
Never attribute to malice that which is adequately explained by stupidity.
User avatar
eanfrid
Level 5
Level 5
 
Posts: 513
Joined: Mon Apr 30, 2012 2:49 am
Location: France

Re: SSD Trim... Just to be sure.

Postby fpdragon on Thu Jun 28, 2012 2:27 pm

eanfrid wrote:To enable automatic TRIM commands, your partition must be mounted/formatted either in ext4fs or in btrfs and have a "discard" option entry on its mount options line in /etc/fstab.

Edit ahem DrHu posted while I was writing my post :mrgreen:



Interresting...

Thanks to all.
fpdragon
Level 1
Level 1
 
Posts: 8
Joined: Mon Jun 25, 2012 5:48 am

Re: SSD Trim... Just to be sure.

Postby jazz.h on Thu Jun 28, 2012 2:55 pm

These are the options in fstab I'm using with my Patriot ssd:

Code: Select all
ext4    errors=remount-ro,noatime,discard


But as you say, I don't know how can one be sure...? But then, you're not sure even in windows, there's no way you can confirm if trim is really being utilized...

Besides the fact that ssd Mint is incredibly fast :wink:
jazz.h
Level 3
Level 3
 
Posts: 182
Joined: Sat Jun 18, 2011 7:13 am

Re: SSD Trim... Just to be sure.

Postby mintybits on Thu Jun 28, 2012 3:41 pm

I use the same fstab mount options as jazz.h
Code: Select all
UUID=91327070-918a-4416-ac41-a95d9496c65e     /     ext4    noatime,discard,errors=remount-ro     0     1

Another performance thing is to make sure your partitions start on "erase block" boundaries. SSDs typically use 512KiB erase blocks so your partitions should start on multiples of 1024, 512 byte sectors. Note that Disk Utility starts the first disk partition at sector 63.
For example:
Code: Select all
Disk /dev/sde: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x32f3bda0

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1            1024   234433535   117216256   83  Linux
/dev/sde2       234433536   234440703        3584   82  Linux swap / Solaris
mintybits
Level 5
Level 5
 
Posts: 568
Joined: Fri Jan 27, 2012 5:09 pm

Re: SSD Trim... Just to be sure.

Postby eanfrid on Thu Jun 28, 2012 5:23 pm

And here for my Sandisk Extreme (/boot is a dedicated 512MB ext2 partition) :
Code: Select all
LABEL=system      /         ext4   discard,noatime,barrier=0,data=writeback,commit=60,errors=remount-ro   0   1
LABEL=boot      /boot         ext2   defaults,noatime   0   2
tmpfs         /run         tmpfs   nosuid,noexec,nodev,size=200M,mode=755   0   0
tmpfs         /tmp         tmpfs   noexec,noatime,nosuid,nodev,size=6G,mode=1777   0   0
tmpfs         /run/shm      tmpfs   noexec,noatime,nosuid,nodev,size=2G,mode=1777   0   0
Image
Never attribute to malice that which is adequately explained by stupidity.
User avatar
eanfrid
Level 5
Level 5
 
Posts: 513
Joined: Mon Apr 30, 2012 2:49 am
Location: France

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: Geoff_P and 27 guests