Formatting a SSD and need advice for RAID 0 SSD

May 25, 2003
100
0
0
I plan on getting my a 2nd Crucial 256GB SSD in addition to the one I already have and plan to run a RAID 0 configuration for maximum performance and 512 GB of space, but I have several questions:

1. What is the best way to clean out my current drive so I can get maximum performance? I know that SSD performance degrades as data is written to it and I want to know the best to clean it out so both SSD installations start out fresh.

2. I have read that TRIM is disabled in RAID 0. Is this true and how would I re-enable it?

3. Any other tweaks to concern myself with?
 

FishAk

Senior member
Jun 13, 2010
987
0
0
As of yet, no one on the planet has figured out how to enable TRIM with RAID. You can make a lot of money if you figure out the secret to passing TRIM instructions to disks in an array.

If you are using Windows 7 or Vista, make your partitions with Windows (the install disk or Disk Management) so the disk will be aligned.
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
i don't think there is a secret to it, its just a certain amount of programming work to write new firmware that allows raid controllers to do it. Perfectly doable, but it takes time and effort. And will likely require you to buy a new controller (or mobo if you are using a mobo controller)
 

Emulex

Diamond Member
Jan 28, 2001
9,759
1
71
tweaks - yes stripe size will impact performance. a good raid controller can online migrate stripe size - if you can not do that then you will have to raid format, benchmark, repeat until you find the best for YOUR application.
 

sub.mesa

Senior member
Feb 16, 2010
611
0
0
As of yet, no one on the planet has figured out how to enable TRIM with RAID.
As far as i understand, only the Windows people do not get TRIM under RAID. New versions of both Linux and FreeBSD already allow SSDs to be RAIDed and still have TRIM capability, and that's not that hard or complicated at all.

Same reason booting a software RAID5 is possible, just not under Windows.

TS about your questions:
1. perform a secure erase on the existing device
2. you don't/can't. But you can over-provision your RAID array to regain the speed and not need TRIM.
3. Disable defrag, create proper partition, stripesize not lower than 128K and make sure the RAID controller is an extension of AHCI (correct for Intel).

To over-provision your array:
1. secure erase existing SSDs
2. create the RAID0 array in RAID BIOS
3. Launch Windows 7 setup dvd; create a partition, leaving a portion unused (10-20%) and unallocated. This will be used as extra spare space by the SSD.
4. Install Windows 7 to the partition and never touch the unpartitioned space!

This should give you good performance over time, but you will have less storage space (10-20%). That's the cost of keeping your SSDs fast and increase their lifespan by a factor of 5; caused by lower write amplification.

If you ever write to the unpartitioned space, or used an existing SSD with data allocated previously on that location, then this trick will not work and you will just waste space. You may never write to the unpartitioned space, since the last secure erase cycle.
 

Voo

Golden Member
Feb 27, 2009
1,684
0
76
As far as i understand, only the Windows people do not get TRIM under RAID. New versions of both Linux and FreeBSD already allow SSDs to be RAIDed and still have TRIM capability, and that's not that hard or complicated at all.
Sure? Sounds strange, since for the OS itself nothing changes at all, only the raid driver has to be more intelligent and handle the stuff correctly, for the OS it's still just "delete file X and send the according TRIM command" only the driver has to figure out where the parts of the file are exactly.
 
May 25, 2003
100
0
0
As far as i understand, only the Windows people do not get TRIM under RAID. New versions of both Linux and FreeBSD already allow SSDs to be RAIDed and still have TRIM capability, and that's not that hard or complicated at all.

Same reason booting a software RAID5 is possible, just not under Windows.

TS about your questions:
1. perform a secure erase on the existing device
2. you don't/can't. But you can over-provision your RAID array to regain the speed and not need TRIM.
3. Disable defrag, create proper partition, stripesize not lower than 128K and make sure the RAID controller is an extension of AHCI (correct for Intel).

To over-provision your array:
1. secure erase existing SSDs
2. create the RAID0 array in RAID BIOS
3. Launch Windows 7 setup dvd; create a partition, leaving a portion unused (10-20%) and unallocated. This will be used as extra spare space by the SSD.
4. Install Windows 7 to the partition and never touch the unpartitioned space!

This should give you good performance over time, but you will have less storage space (10-20%). That's the cost of keeping your SSDs fast and increase their lifespan by a factor of 5; caused by lower write amplification.

If you ever write to the unpartitioned space, or used an existing SSD with data allocated previously on that location, then this trick will not work and you will just waste space. You may never write to the unpartitioned space, since the last secure erase cycle.

Thanks for these tips guys. They are much appreciated. I would NEVER have guess about the partition creation, but Ill do that. It kinda sucks to lose the space, but Im buying an SSD for performance more than space.

Whats the best way to perform a secure erase on my current drive for when Im ready to make the RAID set? I just want to make sure I get max performance when I finally put the array together.
 

Old Hippie

Diamond Member
Oct 8, 2005
6,361
1
0
Whats the best way to perform a secure erase on my current drive for when Im ready to make the RAID set?

The Intel G1 SSDs need HDDErase 3.3 for a secure erase and that's what I'm still using for the G2 drives.

A bootable ISO of 3.3 can be downloaded from here.

There's newer versions of HDDErase but IDK the difference.

If you do use 3.3 your drives must be in regular IDE mode (not enhanced IDE mode) for it to work.
 
May 25, 2003
100
0
0
The Intel G1 SSDs need HDDErase 3.3 for a secure erase and that's what I'm still using for the G2 drives.

A bootable ISO of 3.3 can be downloaded from here.

There's newer versions of HDDErase but IDK the difference.

If you do use 3.3 your drives must be in regular IDE mode (not enhanced IDE mode) for it to work.

Not to sound like a broken record, but a secure erase is the best way to get my SSD performance back right? These SSDs are costing me a LOT of money and I want to make sure Im maximizing my performance.
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
Not to sound like a broken record, but a secure erase is the best way to get my SSD performance back right? These SSDs are costing me a LOT of money and I want to make sure Im maximizing my performance.

the best way is to have trim enabled. That will maintain them at max performance throughout.
 

Old Hippie

Diamond Member
Oct 8, 2005
6,361
1
0
the best way is to have trim enabled
There may be a little problem with his RAID0 array and TRIM.


These SSDs are costing me a LOT of money and I want to make sure Im maximizing my performance.
All of us have invested money in this newer desktop tech for exactly the same reason.

Just follow the guidelines in this thread to get reliable long term performance from your drives.

You can play with the other tweaks (disable this or that) but the basics outlined here should be a constant.
 
May 25, 2003
100
0
0
So the short version is:

If I want to run a RAID 0 with two SSDs (who doesnt?!) what I should do is:

Set the array but keep about 15% unallocated and that should negelect the lack of TRIM support?

Then just do the usual Windows 7 tweaks?

Am I "getting it"

Thanks to everyone who contributed to this. Its much appreciated.
 

Old Hippie

Diamond Member
Oct 8, 2005
6,361
1
0
Set the array but keep about 15% unallocated and that should negelect the lack of TRIM support?
I do 20% but only because I don't really use more than 70GB out of 160GB on My Intel G2 RAID0 set-up.

I do use some of those tweaks but they are the same ones that I've been using for mechanical drives.

I'm using two Intel G2 80GB drives in RAID0 with W7 64bit and it just screams.

I've always been the first in-line to buy the newest/latest/greatest HDs because I feel they give me the most improvement/dollar.

Even thou this set-up is @ $400.00, it's been money well spent and will transfer to future upgrades.


Am I "getting it"
Yep, and you couldn't have had better "advisors". :)
 

sub.mesa

Senior member
Feb 16, 2010
611
0
0
TRIM is not as useful to the SSD as dedicated free space. TRIM can cause all kind of small snippets of data to become available to the SSD; but that's not of any use. The thing the SSD wants most are free erase blocks, and those are 128K in size. Short story: TRIM on a reasonably full filesystem won't help you any bit. It could be that it yields 1GB of free space to the SSD, but zero fully empty erase blocks.

So i don't consider TRIM to be the end of all; if that were true SSDs did not need dedicated internal spare space. Sandforce even goes as far as reserving 28% for internal usage; Intel stays at 6.8%. Due to that being very low, you need to increase this percentage to allow the SSD to stay fast over time. The default 6.8% + anything you get with TRIM may not be enough to regain your speeds throughout its use.

If you do not have TRIM then dedicated reserved space is even more important:
1. secure erase both SSDs; unless they are BRAND new and NEVER connected to a pc
2. create raid0 array
3. boot windows 7 dvd and create partition of 75%-80% capacity, leaving the rest unused.
4. continue installation and use per normal

The reserved space will be totally dedicated to the SSD. That means: it's not snippets of data but a large block fully dedicated to the SSD. That means all erase blocks in that area are available to the SSD. As you can tell, this is much more 'quality space' to the SSD then space claimed with TRIM.

In some cases, you may need 10GB of TRIM'ed space to get the same number of usable erase blocks as 4GB of dedicated free space. So TRIM is just an easy way to give the SSD free space, but not the best. The best is to dedicate space to your SSD.

Maximum performance would be possible if you reserve 50% of all data to the SSD. That basically means you'll never need trim to prevent performance degradation. But the differences get smaller the more space you reserve. 20% seems to be a sweet spot.
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
SSDs need TRIM and Spare Space. Increasing spare space beyond certain amounts has been shown to not improve performance. And besides, with trim ALL "free space" on the drive is considered spare space. Besides which, if spare space is the most important then TRIM is super important because of what TRIM actually does.

IIRC my intel 80GB SSD has 96GB, out of which 16GB is reserved as spare. I have it formatted as one big partition. out of which 41GB is free space. Thanks to trim this free space is available as extra spare space, making my current total spare space 41 + 16 = 57GB.
Without TRIM it would have to consider all 80GB as "in use", and be limited to 16GB spare space.
 
Last edited:

Old Hippie

Diamond Member
Oct 8, 2005
6,361
1
0
SSDs need TRIM and Spare Space. Increasing spare space beyond certain amounts has been shown to not improve performance. And besides, with trim ALL "free space" on the drive is considered spare space.
sub.mesa, the statement above is the grey area in your theory I mentioned and that's what I'd like to see substantiated with graphs and info.

I'm running RAID0 so it's a moot point to me but for those running in AHCI and considering your method of "free space" it would be important.
 

sub.mesa

Senior member
Feb 16, 2010
611
0
0
SSDs need TRIM and Spare Space.
No, if you give the SSD enough spare space, you do not need TRIM. At 50% provisioning, the spare space helps to keep write amplification near 1.0, which should be your target.

A study of IBM Zürich has written about the relation between spare space and write amplification, an effect where performance degradation goes hand-in-hand. Here's a visual graph and it shows that reserving additional spare space is very beneficial to reduce write amplification, even if just a few percent extra can help a great deal. The default 6.8% is definetely too low.

separatedataplacement.jpg


And besides, with trim ALL "free space" on the drive is considered spare space. Besides which, if spare space is the most important then TRIM is super important because of what TRIM actually does.
Yes, almost sounds too good to be true, doesn't it?

I'm afraid that it is. While TRIM can help alot, what ultimately matters for the SSD is free erase blocks, not free space. SSDs like Intel are still susceptible to Erase Block Fragmentation over time with too few spare space allocated. This will cause performance degradation, especially for the writes but also reads.

Question is why? Why if you keep free space on your filesystem and you have TRIM, it still can degrade? The answer is: fragmentation. Assume a 80GB SSD with a full partition which is 50% full; so 40GB of allocated data and 40GB free space. You would assume this 40GB is usable by the SSD due to trim, right? Well true, but that doesn't mean this space all consists of empty 128K erase blocks. It could just be that all erase blocks have been occupied for 50% and that even with 40GB free space there are 0 free erase blocks available, even with TRIM. This would be an example of extreme erase block fragmentation, but i was trying to make my point.

So again: it is not free space what counts, it is free erase blocks. TRIM surely does help, but in the end may be unable to yield any totally free 128KiB erase blocks due to them all being partly occupied. The small snippets of free space become useless then; and only the 6.8% spare space would be truely useful to the SSD; as this is 100% dedicated and cannot be used for host data.

That means that dedicated spare space, is more usable than TRIM-ed space. But if all you do is write sequentially to your SSD, then there won't be much fragmentation at all and you wouldn't have degradation and TRIM works well to give free erase blocks. But if you keep a modestly full filesystem and have a lot of small (random) writes and modifications, such as happen on a system disk when installing Windows updates etc, then i believe TRIM works much less well than many believe it will.

You wouldn't be the first with performance degradation on G2 Intels with TRIM enabled. Forum threads enough about it.

The clue is how to use your SSD while keeping it fast due to it never exhausting its available free erase blocks, and keeping dynamic data ratio to a minimum. The dynamic/static data may be harder to understand, but basically it has to do that the SSD can store data in different places than the host (windows) thinks it is stored. This write remapping can also amplify the fragmentation of erase blocks.

Intel's controller is almost flawless, it just lacks three things:
- a super-capacitor to allow safe write-back writes without dataloss on power failure
- higher sequential write speeds
- better firmware or more spare space to cope with erase block fragmentation

I am very interested in the upcoming G3 Intel controller, to see how they addressed this problem. TRIM alone is not the end of the degradation problem, that much is for certain. ;-)

IIRC my intel 80GB SSD has 96GB, out of which 16GB is reserved as spare.
Intel X25-M 80GB actually has 80GiB (binary gibibytes) of NAND. That is 85899345920 bytes or 85.9GB. Only 80GB (or 80 billion bytes) is visible, so 5.9GB is spare space, which is 6.8% of the total capacity.

SSDs like Sandforce have a much higher spare space by default, the better ones are sold with 28% spare space. Firmware can be used to relclaim this space, but performance over time will suffer; even with TRIM.

I have it formatted as one big partition. out of which 41GB is free space.
Could you show me a screenshot of how AS SSD and CrystalDiskMark perform on your SSD? Please download new versions as the old versions have missing features.
 
May 25, 2003
100
0
0
Man, you guys are confusing me, but as of right now my plan is to use a secure erase on my current single SSD and once my 2nd Crucial M225 256 arrives, Ill set them up in a RAID 0 configuration but only make about 400GB avail for data.

Ill see if I can get this setup working on my 6Gbps Marvell controller. I wasn't able to get my single SSD working on it, but was able to install and boot windows 7 on two hard drives in RAID 0.
 

sub.mesa

Senior member
Feb 16, 2010
611
0
0
Sounds like a good plan MerricAggie97; that should keep it fast even without TRIM.

But, i will add that an Intel 3Gbps ICHxR controller does RAID better than the 6Gbps Marvell controller, meaning you will get higher performance by connecting them to 3Gbps Intel controller instead; and using the Intel RAID drivers. Those also have the highest chance of getting TRIM capability soon. And when that happens you can opt to claim more space by expanding your current partition/filesystem from 400GB to 450 instead, for example. I still recommend not to use the full capacity even with TRIM.
 

Old Hippie

Diamond Member
Oct 8, 2005
6,361
1
0
Man, you guys are confusing me
Don't be confused.

That discussion is about the way the free space is created.

Keep your current plan and you will have a great basic platform for W7 or any other OS.

PS. I'd be using the Intel RAID controller instead of Marvell. :)
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
I'm afraid that it is. While TRIM can help alot, what ultimately matters for the SSD is free erase blocks, not free space. SSDs like Intel are still susceptible to Erase Block Fragmentation over time with too few spare space allocated. This will cause performance degradation, especially for the writes but also reads.
Underpartition will not, in any way shape or form, improve it. It is not, in any way shape or form, better than TRIM.

And many review sites such as anandtech has shown trim to completely eliminate performance degredation in SSDs...

that being said, performance degredation is a misleading term, it makes it sound like performance will continually degrade forever. Actually its more of a one time drop, followed by random fluctuations up and down as it hovers around a specific value (Said value is based on usage scenario, controller quality, and spare space).

@OP: basically what it means is that don't worry about it. Without TRIM the drives are individually slower (about 70% of their full speed), but:
1. You will still get overall better performance with two in RAID0 then with 1 + trim
2. it will not continue to degrade further; it will just drop to that speed and stay there.
 
Last edited:

sub.mesa

Senior member
Feb 16, 2010
611
0
0
And many review sites such as anandtech has shown trim to completely eliminate performance degredation in SSDs...
Yes, that's because they do not and cannot test that properly. By doing random writes, and TRIMing it again you never really fragment your SSD. Keep using your SSD for half a year without additional spare space and with 80%+ full filesystem and install/remove alot of stuff and updates over time, and you'll surely see degradation.

Many people on forums like these also report their Intel SSD to have reduced performance after some time. Some of those actually lacked TRIM for awhile and got their performance back by manually performing TRIM, but others TRIM works and they just have a fragmented SSD.

If you do not believe in under-provisioning; fine. Just know that Intel is one of the few modern SSDs with only 6.8% spare space (the X25-E has more spare space, though). If you don't see any degradation on your SSD then that's great, but by no means proof of anything.

For the record, the Intel X25-M 80GB G2 is capable of:
sequential: 250MB/s read + 80MB/s write
random 4K: 20MB/s read + 60MB/s write
random 4K QD32/64: 200MB/s read + 80MB/s write (same as sequential write)

An SSD that has not degraded, would show two things:
- random 4K QD32/64 score almost 10 times higher than QD1 score; due to it being able to use all 10 parallel channels that the Intel controller has. In reality it's not divided evenly and it gets about 160-180MB/s of 4K-64 read performance.
- random 4K write is a strong sign of degradation; anything under 60MB/s means degradation. Now look at the random 4K write with 32/64 queue; it should be the same as the sequential write speed.

I recommend both CrystalDiskMark and AS SSD to test.
 

erdemali

Member
May 23, 2010
102
0
0
Mesa,

What is the difference and effects of Secure erase and the Enhanced.
In other words, a block being marked with 0 and factory format pattern?
What is factory format pattern?