Jump to content
Sign in to follow this  
Swed

[SSD Users] Activating TRIM

Recommended Posts

"In computing, a TRIM command allows an operating system to inform a solid-state drive (SSD) which blocks of data are no longer considered in use and can be wiped internally. Although TRIM is frequently spelled in capital letters, it is a command name, not an acronym"

"Without the command, your operating system knows when data is deleted, but has no way to tell the SSD's controller. In turn, the SSD keeps moving that information around via garbage collection, unnecessarily programming and erasing the flash memory cells with stale data. This means that, at some point, the SSD will fill up with data, leaving the controller only with over-provisioned flash with which to work. That's seven to 12% of most desktop SSDs, and includes the space for firmware features like bad block replacement."

Pretty much it increases the lifespan and durability of your SSD

How to Activate:

 

1. Open a command prompt

 

2. Type: " fsutil behavior query DisableDeleteNotify"

3a. If you get 0 as a response, TRIM is on and you have nothing to do after this

 

3b. If you get 1 as a response, TRIM isn't activated

 

4. To activate TRIM, input: "fsutil behavior set DisableDeleteNotify 0"

 

5. Repeat Step 2

 

trim.jpg

Edited by Swedish House Mafia

Share this post


Link to post
Share on other sites

From what I know of SSDs that they have given number of writes it can do before media wear occurs to the point of data loss. Wouldn't this command just force a 'blank' write onto the SSD which would only further the wear on the device? I know the SSD controller should be spreading/allocating space out randomly to reduce media wear. I know if your using a SSD on a windows XP for example you should turn off disk defrag for them and because it gives zero performance boost.

Edited by BLiNDBoi

Share this post


Link to post
Share on other sites

what if you use a good operating system?

Then just follow these instructions:

 

1. Open a command prompt

 

2. Type: " fsutil behavior query DisableDeleteNotify"

3a. If you get 0 as a response, TRIM is on and you have nothing to do after this

 

3b. If you get 1 as a response, TRIM isn't activated

 

4. To activate TRIM, input: "fsutil behavior set DisableDeleteNotify 0"

 

5. Repeat Step 2

Share this post


Link to post
Share on other sites

In good operating systems you have ways depending on your setup

 

using lvm

enable issue_discards in your lvm conf

 

for dm_crypt

add a discard option in crypttab

 

for your filesystems, dont discard in fstab, it causes a performance decrease, you should use a scheduler (like crontab) to periodically run fstrim (fstrim wont run if you dont do the above stuff when required)

 

that being said in linux this only works on filesystems that implement ioctl FITRIM which are btrfs ext3 ext4 gfs2 jfs ocfs2 xfs... amusing, as some of you saw my post on oracle, the new version of oracle no longer uses ocfs2, and ACFS doesnt support trim... 

Edited by driz

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...