1 2 Previous Next 19 Replies Latest reply: Nov 29, 2010 9:04 PM by Stubi RSS

RAID 0 - Strip And Cluster Size

Stubi Community Member
Currently Being Moderated

I have an Intel(R) ICH8R/ICH9R/ICH10R/DO/5 Series/3400 Series SATA RAID Controller. I have 2 RAID 0 disks with a strip size of 64 KB. I use a cluster size of 128 KB. But is this perfect? Can please anyone shed some light on the relationship between strip size and cluster size? Please no guesses - the internet is full of such. Some say the cluster should be smaller than the strip, others say it should be the same, others have the formula that the cluster size should be 2 times the strip size.

 

Perhaps someone from Intel could explain to us what is the best size for clusters (not strip size - this depends on the files - I know). This would be the first information on the internet without guesses. But perhaps there is something out there already - could not find it in days. Would be very helpful if Intel provides such information when it describes how to set up RAID. But in this documentation no word about clusters.

  • 1. Re: RAID 0 - Strip And Cluster Size
    Stubi Community Member
    Currently Being Moderated

    Intel please help and explain it to me.

     

    It will help the rest of the world too since there seems to be no other reliable information about this topic. Since Microsoft says (KB929491) partitions have to be aligned for RAID perhaps the strip / clusters have a connection too? In respect of partition alignment - I did what Microsoft recommends but I could not find any improvement at my RAID setup.

     

    In respect of RAID 0. I can recommend it to everybody. More than one year almost non-stop running without any problems on almost full 4 TB. This despite many hard crashes and power failures.

     

    But I am not sure if TRIM works for SSDs in RAID in the meantime. Before there was a lot of confusion because of a wrong Intel documentation. As far as I know it works only for SSDs that are not in a RAID area if the controller is switched to RAID. So RAID 0 perhaps better not with SSDs if it is still like this.

  • 2. Re: RAID 0 - Strip And Cluster Size
    PeterUK Community Member
    Currently Being Moderated

    But I am not sure if TRIM works for SSDs in RAID in the meantime. Before there was a lot of confusion because of a wrong Intel documentation. As far as I know it works only for SSDs that are not in a RAID area if the controller is switched to RAID. So RAID 0 perhaps better not with SSDs if it is still like this.

    TRIM will not work for SSD in a RAID array only when it is a single SSD can TRIM work at this time.

     

    But for single SSD with other RAID arrays on the same controller TRIM is supported with RST 9.6.

  • 3. Re: RAID 0 - Strip And Cluster Size
    edwardzh Community Member
    Currently Being Moderated

    I don't see any reason to use large cluster size. It's just a waste of your disk space.

     

    Below is quoted from Configuring Intel® RAID Controllers for optimal performance, although that document is for hardware RAID controllers:

     

    Matching the strip size to the file system cluster size does not usually provide any benefit.
    Data block or file sizes used by the application are usually more important. However, setting the
    strip size smaller than the cluster size is not recommended.
  • 4. Re: RAID 0 - Strip And Cluster Size
    Stubi Community Member
    Currently Being Moderated

    Thank you so much for this information - great!!! In the meantime I played around with different cluster sizes (all same or smaller size than strip) but I could not find much difference. This seems to confirm what stands in this PDF document.

     

    In respect of the space waste and the cluster size. Since the strip is 64 and the cluster is 64 there should not be a waste of space if I understand this correctly. The logical Windows disk cannot be bigger than the real RAID disk. On the other hand a smaller cluster size cannot make a difference since the HD always stores the strip with 64. Smaller clusters only will lead to more fragmentation in the logical file system in Windows - not on the HD because this is controlled by the RAID controller and Windows has no impact. So I would see it the best to keep cluster and stripe the same. But I have learned that it is completely wrong to make clusters twice the strip size what some recommend in forums. If I am wrong with my thinking please correct me.

     

    In addition I aligned my partitions because of this

     

    http://support.microsoft.com/kb/929491

     

    But honestly I could not find much difference.

  • 5. Re: RAID 0 - Strip And Cluster Size
    edwardzh Community Member
    Currently Being Moderated

    In respect of the space waste and the cluster size. Since the strip is 64 and the cluster is 64 there should not be a waste of space if I understand this correctly. The logical Windows disk cannot be bigger than the real RAID disk. On the other hand a smaller cluster size cannot make a difference since the HD always stores the strip with 64. Smaller clusters only will lead to more fragmentation in the logical file system in Windows - not on the HD because this is controlled by the RAID controller and Windows has no impact.

     

    This is not entirely correct. Strip is different than cluster - it's not the size of a read/write operation on the disk. Instead, it's just how data being distributed on multiple hard drives. you can actually have more than one files/clusters in one strip.

     

    I found an article below explaining strip size very clearly:

     

    http://www.anandtech.com/show/788/5

     

    Hope this helps.

  • 6. Re: RAID 0 - Strip And Cluster Size
    Stubi Community Member
    Currently Being Moderated

    Edward thank you for your response. I know this article. I understand that clusters and strips are different. But please let me make an example.

     

    Lets take as cluster size 32 and as strip size 64. Windows sends a file with 32 KB to the RAID controller. It will put it in a strip of 64 KB on disk 1. Then Windows sends a new file with 96 KB to the RAID controller. The controller will put the first 64 KB in the 64 KB strip on disk 1 and the next 32 in the 64 KB strip on disk 2. Is it not like this? So the smallest storage size on the disk would be 64 KB even if the files has only 1 KB because of the strip size 64 KB. Then a cluster size of 64 KB would not make much difference. But it would reduce the size of the MFT in Windows to half of the size that you have with 32 KB clusters and it would reduce the fragmentation of this index because you have less entries.

     

    Is it not like this?

     

    Or perhaps I see this wrong that a 1 KB file would use 64 KB on the disk because of the strip size 64. If it uses only 1 KB on the HD then I really wasted space with my 64 KB clusters. Then the cluster thinking is not correct in respect of the strip size because the strip is not the smallest storage unit on the HD. But what is it then? 4 K ?

  • 7. Re: RAID 0 - Strip And Cluster Size
    edwardzh Community Member
    Currently Being Moderated

    Again please remember that you can write multiple data blocks into one strip. Strip is not the smallest storage unit size on the disk.

     

    Let's take your example. we have a 32KB file and a 96KB file. On the file system they're stored in a total of 4 clusters, if you have a 32KB cluster. Let's say you have a 64KB strip size on RAID controller, and let's assume it's a sequential write. The first file will be written on the first 32KB of the strip on the first disk. Then the first 32KB of the 2nd file will be written to the rest 32KB of the strip on the first disk. The remaining 64KB goes to the strip on the second disk.

     

    Now let's change the example a little bit, with multiple (let's say eight) 8KB files, 32KB cluster size and 64KB strip size. because of the 32KB cluster size, each 8KB file will use 32KB on your file system. Each 64KB strip can still take two 32KB clusters, so you're using four strips in total, two on each drive. But you're wasting 24KB * 8 = 192KB drive space here.

     

    What if your cluster size is 4KB? Each 8KB file will take two clusters, and all 8 files can be stored in one 64KB strip.

     

    What about a 1KB file? If you have a 4KB cluster size and 64KB strip size, you still have 60KB on the strip left for other files, wasting 3KB here, which is inevitable. But if you have a 32KB cluster size, you'll have only 32KB on the strip left for other files, wasting 31KB.

     

    Is this clear?

  • 8. Re: RAID 0 - Strip And Cluster Size
    Stubi Community Member
    Currently Being Moderated

    Edward thank you very much. This with the 1 KB file made it clear to me. I was thinking the strip is the smallest storage size on the RAID disk. But now I understand that it is just there to split the files and nothing more. So I waste some disk space with the 64 cluster.

     

    I was reading about this the whole day on the Internet. But I could not find one clear statement like yours. Many think the strip is the smallest storage unit and talk about space waste with big strip sizes. But now I understand that this is just garbage.

     

    If Intel could improve the documentation for their RAID controllers life would be so easy :-)) Perhaps you can achieve something in this direction. RAID is really great and I never want to go back to normal disks anymore. But if you search on the Internet you will see that there is a lot of confusion. Even this anandtech link does not give a clear picture.

     

    But NOW Edward I have got it - thank you very much again!!!

  • 9. Re: RAID 0 - Strip And Cluster Size
    PeterUK Community Member
    Currently Being Moderated

    I too find this useful and would make for a nice PDF.

     

    Really having a aligned partition is more important then anything for the format and MS default cluster size for NTFS upto a volume of 16TB is 4K this being a trade off for space then fragmentation as bigger cluster size would use more space but have less fragmentation or a smaller cluster size giving more space but more fragmentation.

    http://support.microsoft.com/kb/140365

    However, setting the

    strip size smaller than the cluster size is not recommended.


    So this not being recommended what happens if the partition is not aligned and the clusters don't fit evenly in the strip size? Will the array allow a cluster to split across two strips sizes or will it only allow a number of clusters that can fit in the strip size wasting space because of the offset to not fit the clusters in evenly?

  • 10. Re: RAID 0 - Strip And Cluster Size
    edwardzh Community Member
    Currently Being Moderated

    Good question... Yes if the clusters don't fit evenly in the strip size a cluster will be written across multiple strips, and cause performance impact.

     

    Refer to http://msdn.microsoft.com/en-us/library/dd758814(SQL.100).aspx. It says:

     

    The result is that single clusters of user data are written across multiple stripe units of the RAID. Every nth operation is affected (n depends on file allocation unit (cluster) size and stripe unit size). Fundamental physical boundaries in disk controllers and other hardware are also violated.

     

    Across a striped array, a single I/O coming into the array controller turns into multiple I/Os if the request crosses one or more stripe unit boundaries. The cumulative effect can contribute to substantial performance degradation.

     

    Also at the end of the document there are several images explaining how clusters are stored on strips very clearly.

  • 11. Re: RAID 0 - Strip And Cluster Size
    Stubi Community Member
    Currently Being Moderated

    Edward, great documentation. Thank you!!! Now I even understand the alignment problem correctly.

     

    If it goes on like this I will be a RAID expert one (remote) day ;-) And this article gives me a little bit of hope since it writes that the combination of 64 clusters and 64 strips is the best for performance - not for space as I already know from you. At my disks I got to the same conclusion with tests when I set my RAID 0 up. So I have to think if I will change my cluster size. I checked yesterday - at 2000 GB (pretty full) I loose about 15 GB because I do not have 4 KB clusters. Good thing is I have many big video files from my own camera on the disks.  So the 64 clusters do not hurt me too much (yet). But of course for people with a different data structure the situation might be very different.

  • 12. Re: RAID 0 - Strip And Cluster Size
    edwardzh Community Member
    Currently Being Moderated

    As per Microsoft, 64KB cluster size is preferred for SQL server. The default 4 KB NTFS cluster size is appropriate for a file server.

     

    On the other hand, for big files, large strip size (512KB or 1MB) can be optimal - less I/O requests and higher throughput.

     

    Glad to be able to help - this is actually good learning for myself too, because I was not 100% certain at first and checked with some RAID experts around, and learnt a lot from your questions.

  • 13. Re: RAID 0 - Strip And Cluster Size
    Stubi Community Member
    Currently Being Moderated

    Edward you created a great RAID documentation here.

     

    An other interesting story is RAID and fragmentation on the RAID disk. But since we cannot influence it anyway we just have to live with it. As far as I am aware there is no way to defragment the RAID disks. Only in Windows but this is pretty useless. But perhaps the controller does such a good job that this is not really a problem.

     

    I hope Intel gets the TRIM one day for disks in a RAID area. Would like to use SSDs. If if we could have (one day) S.M.A.R.T. data it would be great too.

  • 14. Re: RAID 0 - Strip And Cluster Size
    PeterUK Community Member
    Currently Being Moderated

    If  we could have (one day) S.M.A.R.T. data it would be great too.

    Well the good news on that is Intel have done it mainly because SSD users needed support for SMART to be seen when in RAID on Intel's ICH or PCH RAID controller and as a result we now get to see SMART on both SSD and HDD in a RAID array thanks to toolbox.

    http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=18455

     

     

    As far as I am aware there is no way to defragment the RAID disks.

    Thats not true you can you can use Disk Defragmenter on RAID but only with the 4K Cluster size.

1 2 Previous Next

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points