Is TRIM overrated?

Zer0Cool

Limp Gawd
Joined
Apr 4, 2008
Messages
375
I am running out of space on my C300 128GB SSD, and since my b-day is just around the corner I was thinking about getting another C300 128GB and putting them in RAID-0. Im aware that TRIM doesnt support raid, and I guess my question is will I be seeing more performance with the raid 0 or will the absence of TRIM degrade my system?

I seen somewhere that C300 does have a native garbage collection system which cleans the disk without the help of TRIM. How can I access the garbage collection, and what are the cons/pros of using it in comparison to TRIM? Will the garbage collection do just as good of a job as TRIM would?

I know that best solution prob would be to get one M4 256GB, but I just dont have an extra $200 to spend.

Any links regarding the RAID-0 maintenance or anything relevant would be greatly appreciated.

Thanks
 
Last edited:
As long as you give the SSD enough idle time for GC to run, you won't notice a difference between it and TRIM. The big difference between the two is that TRIM is done instantaneously as you delete files while GC waits for downtime.

As for accessing GC, it's controlled by the SSD's controller and is done without user intervention.
 
I thought trim worked with raid now

TRIM does not work with raid.

Also I doubt that GC can work with raid as well since the drive itself will not understand a filesystem that is spread out over multiple SSDs. And here I am talking about the drives that have firmware that understand the NTFS filesystem and use this in the background to find the blocks that are not in use and garbage collect that.
 
There is a lot of confusion about TRIM and garbage collection (GC) in SSDs. In a nutshell, the most common type of GC is a kind of internal defragmentation where unused (aka invalid) pages of flash memory are collected into larger chunks (at least erase block size) by shuffling data around, and then the collected blocks are pre-erased, ready for writing. Since erasing a block takes a relatively long time, having a supply of pre-erased blocks will speed up future writes. There will always be some unused pages for GC to work with, since the SSD reports less sectors available than it actually has flash memory.

All TRIM does is mark unused (aka invalid) those pages of flash that the filesystem is no longer using, assuming the filesystem is TRIM-capable. Having certain pages of flash marked unused provides GC with more pages to work with, thus making things more efficient (less wear-and-tear on the flash, more pre-erased blocks). But the unused pages do still need to be GCed, and that does not necessarily happen at the instant the TRIM command is sent to the SSD (that behavior depends on the specific firmware of the SSD).
 
Anyone know how good is GC on the Crucial C300? Someone on the other forum posted that its pretty bad and after a few months of use the performance is probably going to degrade a lot in RAID-0 !!!

This scares me...

Assuming I will do a full OS reinstall once a year or so, will the performance come back?
 
well, if you do secure erase for your ssds, you will get 90% of the performance back.


first make a image of your system drive

then, breakup the raid configuration

and then, secure erase the drives.

finally setup raid and restore the image to your raid drive...
 
Someone on the other forum posted that its pretty bad and after a few months of use the performance is probably going to degrade a lot in RAID-0 !!!
Some of us seem to be having a problem with the 4K write speeds dropping dramatically but it's not limited to RAID0 users like me.

The Crucial thread is here.

Secure Erase didn't help any but some of my performance was restored when I flashed to firmware 0007.

The GC on these drives work fine in RAID0.
 
Zer0cool, I don't use hibernate, so I deleted the hiberfil .sys file by disabling hibernate. Google search it's easy to disable from command prompt. Propably get you around 14Gb back on your 120Gb SSD.
 
If you do go RAID0, which should be perfectly fine, give up 40GB or so of that 240GB for over-provisioning. In other words, leave 40GB unformatted. This empty, unallocated space greatly enhances the SSD's headroom and ability to work it's GC efficiently.
 
There is a lot of confusion about TRIM and garbage collection (GC) in SSDs. In a nutshell, the most common type of GC is a kind of internal defragmentation where unused (aka invalid) pages of flash memory are collected into larger chunks (at least erase block size) by shuffling data around, and then the collected blocks are pre-erased, ready for writing. Since erasing a block takes a relatively long time, having a supply of pre-erased blocks will speed up future writes. There will always be some unused pages for GC to work with, since the SSD reports less sectors available than it actually has flash memory.

All TRIM does is mark unused (aka invalid) those pages of flash that the filesystem is no longer using, assuming the filesystem is TRIM-capable. Having certain pages of flash marked unused provides GC with more pages to work with, thus making things more efficient (less wear-and-tear on the flash, more pre-erased blocks). But the unused pages do still need to be GCed, and that does not necessarily happen at the instant the TRIM command is sent to the SSD (that behavior depends on the specific firmware of the SSD).

Good to see I'm not the only one to understand this. I think a lot of the confusion comes from OCZ who tries to make us believe GC is magical. I had made a thread about this on their forum in 2009 and got so much shit thrown at me I just stopped going there.

If you do go RAID0, which should be perfectly fine, give up 40GB or so of that 240GB for over-provisioning. In other words, leave 40GB unformatted. This empty, unallocated space greatly enhances the SSD's headroom and ability to work it's GC efficiently.

Do you mean unformatted, or out of the RAID array ? Not the same thing.

Anyway, this will help wear leveling, and I always let some unformatted (no RAID for me) space on SSDs, but I doubt it will help GC specifically, as the "invisible" chunk of sectors is a fixed amount you can't change, aside from a custom firmware.
 
Do you mean unformatted, or out of the RAID array ? Not the same thing.

You have to leave the 40GB unformatted. In or out of the array depends on the if the raid can handle individual partition raid. If there was ever data on the SSD before the conversion make sure you secure erase first so that the SSD knows the 40GB is unused.
 
Do you mean unformatted, or out of the RAID array ? Not the same thing.

Either is fine - as long as those blocks have never been written to. As mentioned, always secure erase each SSD before building an array/installing OS.

This way, the controllers will have a good amount of area to play with vs. just the 11GB of built in OP, per SSD.
 
Do you mean unformatted, or out of the RAID array ? Not the same thing.
An unformatted partition that will be read as "RAW" by the Windows file system is what he means.

I used to use it all the time with smaller pre-TRIM drives (80GB or less) to reserve a "work area" for the drive's GC.
 
but I doubt it will help GC specifically, as the "invisible" chunk of sectors is a fixed amount you can't change, aside from a custom firmware.

Actually, leaving some space unpartitioned (aka unformatted, unused) is helpful for GC in the same way that TRIM is helpful for GC : having more unused pages to work with makes GC more efficient.
 
Some of us seem to be having a problem with the 4K write speeds dropping dramatically but it's not limited to RAID0 users like me.

Have you tried turning off processor C-states in the motherboard BIOS? (Intel CPU power-saving feature that allows cores to be put to sleep -- NOT the same as Speedstep)

Also, have you tried the Windows registry tweak to disable SATA LPM (link power management)?

Both of those have eliminated the problem for some people.
 
Anand's continued blog on Crucial C300 mentioned that the SSD loses quite a bit of performance without TRIM. Of course, he used older firmwares but AFAIK, firmware 0002 is considered best performing for C300 on Crucial forums.

On a separate note, I'm disappointed that Crucial didn't come out with some sort of utility to force TRIM on its SSDs, like Intel Toolbox. I've been running an Intel G2 for a while and it seems even the W7 TRIM does not work properly - after a few months SSD lost a large chunk of performance so I was forced to run the toolbox to restore it. I wonder if I've screwed up something and TRIM doesn't work on my W7 box or there's something else afoot:confused: In any case, the point is: it's useful to have this sort of utility so that you can run it once in a while to restore performance.
 
Anand's continued blog on Crucial C300 mentioned that the SSD loses quite a bit of performance without TRIM. Of course, he used older firmwares but AFAIK, firmware 0002 is considered best performing for C300 on Crucial forums.

Anand's criterion for determining garbage-collection (GC) effectiveness is unrealistic. He uses HD Tach which does large sequential writes over the full span of the SSD in a very short period of time, and looks to see how much the write speed drops during those sequential writes. Almost no one actually uses an SSD like that. What he should do is run some typical (but heavy) write load to the SSD, like an IOMeter run that does a mix of sequential and random writes, and observe how the write speed holds up under that load.

In realistic usage, I've seen posts from a number of people with C300's in RAID (therefore no TRIM, only GC) and I have not seen any serious complaints from them about the effectiveness of the GC in the C300.

Anand's HD Tach "test" is particularly unhelpful on Sandforce drives, since HD Tach is writing highly compressible data (essentially a stream of zeros) and the Sandforce drives compress that to almost nothing and write very little to flash memory. To the naive, this makes it look like Sandforce has very good GC, when in fact it tells you almost nothing about how the GC in a Sandforce drive will stand up to a realistic heavy workload.
 
Anand's criterion for determining garbage-collection (GC) effectiveness is unrealistic. He uses HD Tach which does large sequential writes over the full span of the SSD in a very short period of time, and looks to see how much the write speed drops during those sequential writes. Almost no one actually uses an SSD like that. What he should do is run some typical (but heavy) write load to the SSD, like an IOMeter run that does a mix of sequential and random writes, and observe how the write speed holds up under that load.

In realistic usage, I've seen posts from a number of people with C300's in RAID (therefore no TRIM, only GC) and I have not seen any serious complaints from them about the effectiveness of the GC in the C300.

Anand's HD Tach "test" is particularly unhelpful on Sandforce drives, since HD Tach is writing highly compressible data (essentially a stream of zeros) and the Sandforce drives compress that to almost nothing and write very little to flash memory. To the naive, this makes it look like Sandforce has very good GC, when in fact it tells you almost nothing about how the GC in a Sandforce drive will stand up to a realistic heavy workload.
maybe that's why he does have other tests in the mix:p In any case, c300 without trim loses performance and people you refer to do not bench. I also didn't notice the slowdown on my g2 but when I ran the bench, I saw that write speed dropped like a rock...
 
and people you refer to do not bench.

I didn't mention anyone by name, but most of the people I am thinking of post on Xtremesystems forums, and saying they do not run benchmarks is like saying tigers do not hunt for their food.
 
An unformatted partition that will be read as "RAW" by the Windows file system is what he means.

I used to use it all the time with smaller pre-TRIM drives (80GB or less) to reserve a "work area" for the drive's GC.

This would imply that the drive's firmware can read and understand partition tables. Can anyone confirm that this is what happens? If so, would this still work with GPT-partitioned drives?

If true, that might explain some weird behavior I once saw on a pre-TRIM Intel Gen1 drive.
 
This would imply that the drive's firmware can read and understand partition tables.

Some can however the point of this is you leave X amount of GB of SSD space that you never use. The SSD keeps track of what blocks (128 Kb?) are used and how often each block is used. So by leaving unused space on the drive the SSD can wear level better.
 
Last edited:
No. The point of this is you leave X amount of GB of SSD space that you never use. The SSD keeps track of what blocks (128 Kb?) are used and how often each block is used. So by leaving unused space on the drive the SSD can wear level better.

Ahh, okay that makes sense, which is why secure-erasing a previously-used drive is also important (which was already mentioned in an earlier post).
 
Thanks a lot everyone for all the input! You have all been more then helpful!

I have order the 2nd C300 last night, should get in tomorrow. So just so summarize;

1st. Secure erase the current C300 hdd. Any specific links on how to do it properly?
2nd. When making a partition in my RAID-0 leave 40GB unformatted. With the 40gb unformatted, does this mean I can fill it up all the way with games and stuff and still be ok?
 
1st. Secure erase the current C300 hdd. Any specific links on how to do it properly?

I don't think there's any one foolproof method that works for everybody. Not all controller/BIOS combinations support secure erase.

What works for me is:
1) Connect drive to a Silicon Image 3132 or 3124-based controller card which has been flashed with their non-RAID firmware

2) Download and burn your favorite Linux rescue or boot CD, as long has it has the 'hdparm' utility on it. I use the gparted LiveCD, found here:
http://gparted.sourceforge.net/livecd.php

3) Follow the secure erase procedure documented in the ATA Wiki here:
http://ata.wiki.kernel.org/index.php/ATA_Secure_Erase
 
2nd. When making a partition in my RAID-0 leave 40GB unformatted. With the 40gb unformatted, does this mean I can fill it up all the way with games and stuff and still be ok?

What type of RAID did you decide to use? Do you know how to RAID partitions instead of the whole drive?
 

I just spend about 2h on this! and no luck.... I had to take out 4GB of ram for the program to even start, when i FINALLY got to all the propper menues, my C300 wasnt even there... all the other 3hdd were but not the one i needed.

According to: http://www.iishacks.com/2009/06/30/how-to-secure-erase-reset-an-intel-solid-state-drive-ssd/

"You must also disable AHCI (SATA Mode) if enabled in your BIOS before you boot into DOS for the utility to run and work properly. Most BIOS will have an option to emulate IDE mode for SATA ports. Be sure to switch it back to AHCI once you are done."

I changed from AHCI to IDE I tried "Enhanced" version and "Compatible" version of it, I did not have the word emulate anywhere in the BIOS, anyways only one of them allowed me to even get access to the needed boot menu via cd-rom and even then it still had a sign telling me that the drive wasn't running in the emulate mode...


I don't think there's any one foolproof method that works for everybody. Not all controller/BIOS combinations support secure erase.

What works for me is:
1) Connect drive to a Silicon Image 3132 or 3124-based controller card which has been flashed with their non-RAID firmware

2) Download and burn your favorite Linux rescue or boot CD, as long has it has the 'hdparm' utility on it. I use the gparted LiveCD, found here:
http://gparted.sourceforge.net/livecd.php

3) Follow the secure erase procedure documented in the ATA Wiki here:
http://ata.wiki.kernel.org/index.php/ATA_Secure_Erase

I will try and give this a go. I am however confused about the 1st step, where da hell do i need to connect it too? what Silicon Image.... I looked at wiki and it seems like a lot of work... damm

What type of RAID did you decide to use? Do you know how to RAID partitions instead of the whole drive?

My idea was always to go with the raid-0 since this was the main reason i was getting another C300 because I was running out of space. From my previous experience I believe I would need to create the raid array 1st and then partition it, leaving 40Gb unlocated.
 
Last edited:
I will try and give this a go. I am however confused about the 1st step, where da hell do i need to connect it too? what Silicon Image....

The wiki explains it better, but not every motherboard SATA controller will allow you to put the drive into an "unfrozen" state which is what allows the drive to actually obey the security erase command. Whether the drive firmware comes up in a frozen or unfrozen state depends on how the SATA controller's firmware is written. Some motherboard controllers don't allow you to unfreeze the drive, so you can never do a security erase.

The Silicon Image controller I mentioned is a PCIe addon card that I happened to have laying around. As luck would have it, its BIOS does not freeze the drive, so I always keep one handy when I want to secure erase a drive, since I know it will always work. You should just try your motherboard controller first, and then follow the wiki instructions. The first step in the process is to determine if your drive is frozen or not. If it is not frozen, you can continue. If it's frozen, you have to take steps, like switching the controller from AHCI to IDE mode, or else trying a different controller.
 
The wiki explains it better, but not every motherboard SATA controller will allow you to put the drive into an "unfrozen" state which is what allows the drive to actually obey the security erase command. Whether the drive firmware comes up in a frozen or unfrozen state depends on how the SATA controller's firmware is written. Some motherboard controllers don't allow you to unfreeze the drive, so you can never do a security erase.

The Silicon Image controller I mentioned is a PCIe addon card that I happened to have laying around. As luck would have it, its BIOS does not freeze the drive, so I always keep one handy when I want to secure erase a drive, since I know it will always work. You should just try your motherboard controller first, and then follow the wiki instructions. The first step in the process is to determine if your drive is frozen or not. If it is not frozen, you can continue. If it's frozen, you have to take steps, like switching the controller from AHCI to IDE mode, or else trying a different controller.

Thank you this was helpful.

So I downloaded and burned the "GParted Live" but having problems getting access to "hdparm". Its seems like a big program with lots of options in it. I managed to find a comand prompt in it (but it looked different, insted of the usual C:\...etc it had like someone name in there, not myne) maybe im doing something wrong... I tried entering the "hdparm -I /dev/c" but it told me its an invalid command or something.
 
In linux your drives will most likely be /dev/sdX

where X is a letter.

To figure out what you have type

Code:
fdisk -l /dev/sd?

That will show you the partitions that are on all disks (assuming that you have a recent linux os and no raid cards).

John
 
I've never used DBAN, but I have doubts whether it can issue the ATA secure erase command. My impression was that it actually writes data to the drive, which is NOT what you want for clearing an SSD.

I think the easiest method to secure erase an SSD is with parted magic:

http://partedmagic.com/doku.php?id=downloads

It has a menu option to erase a hard drive, and you can choose to do a secure erase. Depending on your motherboard, you may need to pull the power plug to your SSD, wait a few seconds, and then plug the power back in (after you have already booted into parted magic). It should tell you if you need to do that.
 
Looks like I found a winner. DBAN is very easy to use and it recognized all my HDD right away.

When I think of it, you do not want to use DBAN for its secure erase on an SSD. This will only hurt performance. You need to use the drives builtin secure erase not an external programs secure erase software.
 
My idea was always to go with the raid-0 since this was the main reason i was getting another C300 because I was running out of space. From my previous experience I believe I would need to create the raid array 1st and then partition it, leaving 40Gb unlocated.

I was not asking what RAID level you planned to use, I was asking what RAID platform (hardware/software, what flavor).

And if you do it the way you just described, you need to be careful. The best way to do it is to secure erase each SSD, then create a partition smaller than the available size (say, 40GB smaller) on each SSD. Then RAID those two partitions together. But not all RAID platforms will allow you to RAID partitions, which is why I asked you what type of RAID you will use.

If you secure erase the two SSDs, then create a RAID 0 out of them, and then create a partition on the RAID volume, starting at the beginning, that is 80GB less than the total available space, I think that will accomplish the same thing as partitioning each drive separately, 40GB less on each. However, I cannot be certain -- it depends on how your RAID platform works. All of the RAID platforms I am familiar with do not write to all of the drive sectors in RAID 0. Which is what you would want. But I cannot say that none of them do. With RAID 5 or 6, the technique of partitioning after RAID volume creation would definitely NOT work, since when a RAID 5 or 6 volume is created, the RAID volume is initialized by writing parity data across all the drives in the RAID, thus negating the secure erase you did on your SSD.
 
With hardware or fake raid the raid array will generally be whole drive raid members and at the point of partitioning the array will show up as a single disk. At that point he can just leave 40GB (or whatever size was determined to work well) unpartitioned at the end of the raid 0 array and that should leave 1/2 that unused on each of the 2 SSD.
 
I've never used DBAN, but I have doubts whether it can issue the ATA secure erase command. My impression was that it actually writes data to the drive, which is NOT what you want for clearing an SSD.

I think the easiest method to secure erase an SSD is with parted magic:

http://partedmagic.com/doku.php?id=downloads

It has a menu option to erase a hard drive, and you can choose to do a secure erase. Depending on your motherboard, you may need to pull the power plug to your SSD, wait a few seconds, and then plug the power back in (after you have already booted into parted magic). It should tell you if you need to do that.

Downloading it now, its a big program what from I can see. 10 min left on download. Can anyone else confirm that parted magic is a good tool to use?

Thanks John

I was not asking what RAID level you planned to use, I was asking what RAID platform (hardware/software, what flavor).

And if you do it the way you just described, you need to be careful. The best way to do it is to secure erase each SSD, then create a partition smaller than the available size (say, 40GB smaller) on each SSD. Then RAID those two partitions together. But not all RAID platforms will allow you to RAID partitions, which is why I asked you what type of RAID you will use.

If you secure erase the two SSDs, then create a RAID 0 out of them, and then create a partition on the RAID volume, starting at the beginning, that is 80GB less than the total available space, I think that will accomplish the same thing as partitioning each drive separately, 40GB less on each. However, I cannot be certain -- it depends on how your RAID platform works. All of the RAID platforms I am familiar with do not write to all of the drive sectors in RAID 0. Which is what you would want. But I cannot say that none of them do. With RAID 5 or 6, the technique of partitioning after RAID volume creation would definitely NOT work, since when a RAID 5 or 6 volume is created, the RAID volume is initialized by writing parity data across all the drives in the RAID, thus negating the secure erase you did on your SSD.

Thanks for that info.

So what you saying you are not sure if partitioning each hdd separetly at 40gb is any better if doing it all at once 80gb after raid is setup...

Also 80GB is a huge space to waist! I feel like crying :) jk. Isnt there any other way... Spend $240 on a 128gb hdd, and it feel like il be getting 50gb for that price
 
Back
Top