• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Diagnosing TRIM

chrcoluk

[H]ard|Gawd
Joined
Jul 7, 2008
Messages
1,274
It seems many accept that if the drive officially supports trim, windows 7 is used, intel controller used, right drivers used then TRIM must be working.

Currently all those things apply true to my SSD but from what I see TRIM is not working.

If I copy a large file to my SSD and delete it, I see no activity led corresponding to that delete. I waited quite a while.

In addition if I use samsungs magician app to manual TRIM I do see the activity.

If I filter explorer.exe and the samsung app in resource monitor. Using the samsung app to manual trim I see $Bitmap (NTFS Free Space MAP) this apparently indicates TRIM ise been sent. I do not see this when manually deleting.

Is there other ways to test without doing the lame fill up entire drive and benchmark process? I am amazed with all the technology we have there isnt an app that can do a simple check.
 
It's because it's not simple since you would need to physically read the drive without its abstraction. And I don't see why you should see the activity led flashing, when the file is deleted the trim command is sent instantly. Then the SSD will do its work when it wants, but that won't make the led flash because it's internal.
 
I have been having the same issue, I know trim isn't working, and can't seem to locate a way to *force* enable it for a disk. Not sure exactly how win7 determins if a drive is an ssd, and enables trim, but trim doesn't seem to be always on.
 
How doy you know it isn't working? It happens internally to the drive, as Aesma said, so there isn't any system indication that it is working or not. Are you seeing low speeds after heavy use or something that would indicate it isn't working? The drive might also need to sit idle more than you are lettting it so it can execute the TRIM functions - if you are constantly writing to the disk (like torrenting) then it might be preventing the drive from TRIMing.

You can check end-to-end TRIM with the following command:

Command prompt > fsutil behavior query disabledeletenotify

DisableDeleteNotify = 1 (Windows TRIM commands are disabled)
DisableDeleteNotify = 0 (Windows TRIM commands are enabled)
 
obviously i then could say how do you know it is working ;)

I read in win8 technical docs microsoft have added a check to see if trim works, so clearly they have recognised its an issue, I really hope they bring that feature to windows 7 as well in the next service pack.

When I force trim off using the fsutil switch there is no behavioural differences.

Luckily its not a big deal tho it seems as my ssd is now running my OS and its lightning fast. :)
 
I reconize the issue easily, using win7 on any kind of thin formatted disk, when using trim, it would free up that virtual disk space, but if it doesn't use trim, that disk space is forever used.

Turning on the discard option for linux, and the diskspace is freed just fine, but since there is no way to force trim on, for the virtual disk, I can't get win7 to free up that diskspace also.
 
Only host activity shows up on the activity LED. The drive's background operations aren't host activity and therefore do not light the LED when they occur.

Your SSD is always doing something in the background. It's never just sitting there doing nothing as it were.
 
I reconize the issue easily, using win7 on any kind of thin formatted disk, when using trim, it would free up that virtual disk space, but if it doesn't use trim, that disk space is forever used.

Turning on the discard option for linux, and the diskspace is freed just fine, but since there is no way to force trim on, for the virtual disk, I can't get win7 to free up that diskspace also.

I'm not sure what you are trying to say, but TRIM has nothing to do with freeing up disk space. All it does is pre-erase empty blocks so the drive can write to them later without a penalty. Not having TRIM will not cause disk space to be used forever, it just makes operations on a well-used drive slower than they could be.
 
Forceman, I guess you have never used trim on anything OTHER than ssd's.

TRIM (or what it really is, the scsi unmap command), tells the disk that the data in that space is not needed anymore. On an ssd, it then unallocates that space and uses it for it's wearleveling and other things, that equate to speed increases.

But on a virtual disk, you can use it to physically unallocate that diskspace, therefor freeing up diskspace for other tasks, and keeping thin files, thin again, instead of slowly growing.
 
Hmm, looks like this sums up that part pretty good.

http://www.osronline.com/showthread.cfm?link=204046

Seems windows 7 is only going support ATA Trim, and you will get no SCSI UNMAP. So if you ssd is not ata, but uses scsi (raid/sas/...), it's not going work.

I guess I need to read that thread about trim working with raid0, and see what that is about. Maybe MS patched it so it would work now?
 
I'm not sure what you are trying to say, but TRIM has nothing to do with freeing up disk space. All it does is pre-erase empty blocks so the drive can write to them later without a penalty. Not having TRIM will not cause disk space to be used forever, it just makes operations on a well-used drive slower than they could be.

You're mixing up trim and garbage collection. Trim is just a command saying "that LBA is free". Then the SSD does its thing, including pre-erasing blocks, shuffling stuff around, etc. Not having trim will indeed cause the drive to become "full" at some point, and then the only blocks the drive will be able to pre-erase are the reserved ones.
 
Forceman, I guess you have never used trim on anything OTHER than ssd's.

TRIM (or what it really is, the scsi unmap command), tells the disk that the data in that space is not needed anymore. On an ssd, it then unallocates that space and uses it for it's wearleveling and other things, that equate to speed increases.

But on a virtual disk, you can use it to physically unallocate that diskspace, therefor freeing up diskspace for other tasks, and keeping thin files, thin again, instead of slowly growing.

No, you're right, I haven't. Most people (and specifically the OP) talk about TRIM in relation to SSDs, so that's what I based my response on. I didn't know it acted that way for virtual drives.

You're mixing up trim and garbage collection. Trim is just a command saying "that LBA is free". Then the SSD does its thing, including pre-erasing blocks, shuffling stuff around, etc. Not having trim will indeed cause the drive to become "full" at some point, and then the only blocks the drive will be able to pre-erase are the reserved ones.

I guess that depend on how you interpret "full". I guess you can call that a kind of full, but normally people think of full as "no more space available for files". Failing to TRIM a drive won't cause it to show up as full to the OS or the user, it'll just mean it is slow when written to because it has to erase the block before it can write to it.
 
Last edited:
You can test as shown on hardforum back in May. No need to use a huge file really, ~8kB should be ample. Some SSD's return all zero's, some all 'FF's, what you should not see is the same data but who knows how some manufacturers may have implemented their firmware.

After deleting the file, W7 may take up to ~30 seconds before actually sending the TRIM command for it so give it at least that time before checking.

Native TRIM sends a range or ranges of LBA's to be freed so you should not expect to see much in the way of disk LED activity.

IIRC a drive is recognized by the OS as an SSD when it reports a rotational speed of zero, similarly the drive returns capabilities data which report if TRIM is supported. From memory only NTFS is supported for trim in W7 unless that has changed since.
 
Last edited:
Back
Top