SSD raid and Trim question

csflame4

Distinguished
Jul 23, 2008
121
0
18,680
I have 2 intel X-25M's running in raid 0. Do intel drives have garbage collect? I know that the newer OCZ when running raid you can let the computer idle on the bios screen for about an hour and garbage collect will do everything it needs to do. Does that work with intel drives also? or am I pretty much screwed until they release a firmware that enables trim with raid setups.
 

sub mesa

Distinguished
Garbage collection and TRIM are not the same thing.

Since you don't have TRIM support when running in RAID, you should leave space free on the end of its capacity. So with 2x 80GB = 160GB, create a 145GB partition leaving 15GB unused. If you previously used the drives you have to zero-write/secure erase before doing this.

Also you need to run either Windows 7 or Vista - no XP.

If you do this, you should be fine without TRIM.
 
The issue with TRIM and RAID isn't the drives themselves or the drive firmware, it's the RAID controller or software. Windows 7 will recognize a RAID array as containing SSDs and use TRIM if the array reports that the spin rate of the virtual RAID volume is "0 RPM".

The big questions are:

(a) whether any RAID solutions will actually check to see if their constituent drives are SSDs and then report that back to the host via the "0 RPM" indication, and

(b) even if they do, will they pass the TRIM command through to the SSDs correctly?
 

sub mesa

Distinguished
The RAID driver would have to support TRIM command passthrough; i would assume. Until they do, the OS can issue TRIM commands; but the RAID driver will not pass these to the physical drives. It would be a rather simple feature to build into current Windows RAID drivers, though.
 

csflame4

Distinguished
Jul 23, 2008
121
0
18,680
would a secure erase be the same thing as running windows repair and then running diskpart through the CMD? I usually select each disk and then type in clean, and then clean all. When I type in clean all, that usually takes like 15 mins to complete for each disk.

Also, I plan on reformatting within the next few days because I forgot to partition the raid array into a windows partition and a data partition. Normally when I make the raid partition, I make it through diskpart so I can align it properly. Now to partition it will I have to specify the amount of gigs and align each partition?

EDIT:

What will the extra 15 gig partition accomplish? and will it be fine to have three partitions on the raid array?
 

sub mesa

Distinguished
No it wouldn't, the only equivalent to a secure erase would be a full zero-write; and a zero-write would take longer than 15 minutes.

While XP does not zero-write when formatting, Windows 7 does. So a long format in Windows 7 (while installing from the DVD) would reset the performance of the SSD to factory condition.

Yes you have to align each partition. By default, Windows 7 appears to do this right. Remember, i suggest limiting the number of partitions on your SSD as you're cramped by space already. Also, leave some space unused so the SSD can use it for internal usage, especially important if you lack TRIM support due to using the RAID drivers.
 

csflame4

Distinguished
Jul 23, 2008
121
0
18,680
Ok so since I use Win 7 I dont need to use disk part? I can just create the partitions from windows setup just like I would on a normal drive?

I also have a backup win 7 installation on my storage drive, I could just boot onto that and then go to disk management and do a full format there to erase everything properly? I would do it in the win 7 setup but that does a fast format.

EDIT:

I have 2 80 gig SSD's and when formatted its 149 gigs total. Ill probably do 35 or 40 gigs for windows and then the rest will be data, but I will minus 15 gigs for the other partition you told me about. Will it be fine to create a 10 gig partition? or does it have to be 15 gigs? and will Win 7 align it to whatever I set it at when I created the raid through the bios? I can set the strip size there but im worried win 7 will not set it to what I have it set to from the bios

sorry for all the questions, im just new to raid and I want to make sure everything is properly aligned and partitioned.
 

sub mesa

Distinguished
Yes the normal install procedure of Windows 7 should give you aligned partitions. I didn't check this first hand, though. If i understand correctly, both Vista and Win7 use a 1024KiB offset or 1 megabyte. While XP uses a weird and terribly unaligned 31.5KiB - exactly 63 sectors. This would give you misalignment on SSDs, RAID arrays and HDDs with 4KiB sectors like the new WD EARS drives.

So both Windows 7 and Vista should do this right. Be sure to remove all partitions and do a quick/long format.

About partitions, in this case it might be best to just create one big one; so with 149GiB capacity, create a 130GiB C:-drive. This would make sure your free space is not fragmented between different partitions.

If you still want to keep windows on a separate partition, make it rather small and install everything else on the other partition. I would recommend against more than 2 partitions.

Howmuch space you reserve to be used by the SSD internally can vary. 20GB would be best, i wouldn't go lower than 10GB. Anything in between will do. The more you have, the more resilient your SSD will be against performance degradation over time.
 

csflame4

Distinguished
Jul 23, 2008
121
0
18,680
Yea that is what I was worried about, I want the strip size to be at 128k. Currently I dont have my SSD partitioned at all. I want to have windows in a separate partition because I noticed after installing a bunch of games and a few programs that I would normally install on a separate partition was actually slowing my startup times.
 

sub mesa

Distinguished
An 1024KiB offset works just fine with a 128KiB stripesize - so default Windows 7 would be aligned, with any stripesize that is a power of 2, up until 1024KiB. The only thing that wouldn't be aligned is 640KiB stripes for example when you're doing RAID5 with an even number of disks.

I want to have windows in a separate partition because I noticed after installing a bunch of games and a few programs that I would normally install on a separate partition was actually slowing my startup times.
On an SSD? A HDD would have to seek when data becomes fragmented, the SSD has no problem with filesystem fragmentation. Thus, one big partition would be prefered. Creating multiple partitions for performance reasons is false; it doesn't work that way - not for SSDs.

If you don't demand your Windows to be on a separate partition for backup reasons, i would stick with one partition. Note that Windows7 creates a 100MB system partition automatically, that is normal.
 

csflame4

Distinguished
Jul 23, 2008
121
0
18,680
Yea I know not to defrag it, I have a few programs that I use to keep the SSD running good. I use the latest diskeeper that recognizes the SSD and optimizes it instead of defraging the drive, I also use CCleaner and free space cleaner with FF enabled. I never set my offset before, all I did was set the strip size to 128k. If i set the strip to 128k in the raid creation screen just after the bios, is that what windows uses? Im not sure what the difference between offset and strip, I just know that you have to align the strip size correctly
 

sub mesa

Distinguished
Im not sure what the difference between offset and strip
Stripesize you know; thats for the RAID-array. With offset i mean the partition offset. XP creates partitions with 31.5KiB offset, Windows 7 with 1024KiB offset. So offset and stripesize are separate; but getting them to correspond is what the alignment is all about.

They don't need to be the same number though. With 1024KiB offset (windows 7), exactly 8 stripe blocks of 128KiB fit there. So when the filesystem begins, it begins at exactly the start of a stripe block (raid) and also a flash cell (ssd). So both are aligned.

So aside from the RAID-array, your SSD also has a kind of 'stripesize'. Intel X25-M uses 128KiB flash blocks - a 128KiB stripesize plays nice with that.

With 128KiB stripe blocks and Windows XP, it gets different. With a 31.5KiB offset, if the OS writes 128KiB of data it affects two stripe blocks, but not completely only parts of it. Not only the RAID array would lose its performance this way, the SSD would have a hard time too. So RAID+SSD+XP is a terrible combination; its "double bad".

 

csflame4

Distinguished
Jul 23, 2008
121
0
18,680
Ok good to know, so lets make sure I got all of this right so its setup correctly.

Perform a full format on the SSD's, then setup the raid array through the bios at 128k strip, then go straight to windows setup and make a 20 gig partition for the SSD itself, then create another partition, which is the rest of the space for windows and everything else.

A 20 gig partition would be the best correct? im not to worried about the space so im fine with 20 gigs if thats the best.
 
I can't speak for other folks, but IMHO the best setup is just one big partition that fills up the whole drive. (Actually, you'll probably end up with two since Windows 7 will create a 100MB "recovery partition" in addition to the OS partition).

I say this for a few reasons:

1) Unlike a hard drive where the first partition uses the outermost tracks which have a higher transfer rate, on an SSD there is no performance difference between partitions - so there's performance advantage to partitioning the disk.

2) Although leaving some space free on an SSD is a good strategy, you don't really need unpartitioned space to do that. You just need to leave some free space available (on your "C:" drive, for example). And if you use a full-disk-sized partition then you'll have the space available for the odd occasion when it might be useful for necessary.

3) Dividing your disk up with partitions is like building walls in an office, whereas if you just organize things in folders in the same partition it's like using cubicles. Walls are more difficult to more around than cubicles if you find that the initial guess on your space requirements was off.

The only good argument I can think of for partitioning is that it might make it easier to do an image backup of the entire OS partition without involving the other stuff on your disc. The way I address that issue is to put the "other stuff" on separate hard drives.
 

csflame4

Distinguished
Jul 23, 2008
121
0
18,680
ok so I set it all up. One last thing

For the maintenance on this raid setup I use CCleaner, free space cleaner, and diskeeper, now remember diskeeper knows that its an SSD so it optimizes it instead of defrag. How often should I run these programs? I used to run them every few days

I also set up the 20 gig partition like you said, im gonna try it out and see if it works. Is thyere anything I need to do to that partition? or does the SSD use it automatically?

Also do intel SSD's have garbage collect? if I just let it ide on the bios screen will that work?
 

sub mesa

Distinguished
I wouldn't experiment with "optimizing" programs at all; they likely make things worse. Be sure to disable defragment and you shouldn't need any program at all.

Intel drives do internal Garbage Collection yes; whether you are on BIOS or idling in Windows that does not matter; your SSD does not care.
 

hartmut555

Distinguished
May 24, 2010
1
0
18,510
The reason for the 10 to 20GB unused partition is to prevent the filesystem from ever writing to those sectors in the case where TRIM is not available. When TRIM is not available, if the entire drive is set up as a single partition, the SSD will eventually consider every sector (aside from the portion it already reserves as spare area, which is very small for most "mainstream" SSDs) as containing important user data, even though that data is marked as "deleted" by the filesystem. This information chasm between the drive and the filesystem is the whole reason why degradation happens and the TRIM command was created.

By leaving 10 to 20GB of space in an unused partition, the filesystem is prevented from ever writing to those sectors. The SSD controller can then use those sectors in all the swapping/remapping/rewriting that it does behind the scenes. This is one of the main differences between the X25-E and the X25-M aside from the actual flash used - the X25-E 64GB has I believe 16GiB of spare area, while the X25-M has very little.
 

This is very true. However in the case where the OS marks deleted sectors as no longer in use via TRIM, there's really no advantage that I can think of to leaving unpartitioned space on the drive, unless it's just as a means to force you to leave some space unused.
 

TheZander

Distinguished
Feb 22, 2009
115
0
18,680


But remember, this thread is about a setup in RAID0 where TRIM will not be functioning. Sub Mesa and Hartmut are correct.
 

eye_2_eye

Distinguished
Mar 10, 2011
4
0
18,510



We are building a server and planning on putting in 8 SSD drives in raid 10. Is there TRIM available on Windows Server 2008? Do you recommend RAID in a server environment...Thanks for the help!