Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Possible Duplicate:
What are the different widely used RAID levels and when should I consider them?

I wonder how RAID 0 offers better i/o.

If i am not wrong in RAID 0 data gets split and stored in different HDD.

in that case for every read request doesnt the whole array need to be scanned for fetching files.

Can any one please clarify this?

share|improve this question

marked as duplicate by Zoredache, Jay, dyasny, Michael Hampton, voretaq7 Dec 15 '12 at 21:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers 2

up vote 6 down vote accepted

To add to the answer and to answer the comment (which is a bit too long to answer in a comment)

You can try thinking from the very big picture. Will reading from 2 disks be faster than 1? And the obvious answer is yes. If one disk is only capable of reading 100MBps, two disks naturally can read at 200MBps. And that's why the theoretical read speed of raid 0 is n, where n is the number of disks in the array. The same goes for raid 1 with reads. There are n number of disks and you can read from all of them at the same time for greater speed.

However, raid 0 is faster than raid 1 because there's not only reads but also writes. Raid 0 is striped, so only half the data is in one disk and the other half on the other disk. Raid 1 is cloned, so the data is on both sides. This means that when you write, you need to write to both disks of all the data in raid 1. So, the write speed in raid 0 is again n, here n is the number of disks in the array versus raid 1, where the write speed is always 1; same as writing to non-raid disk.

Also touching on the original question's misconception. You don't scan the disk to find the file's data, ever. Files have pointers which point to a block in the drive of where that file is stored in. Once you have the file in question, you fetch the data from that position and retrieve the relevant information from that block.

I suggest you read more about it in wikipedia about RAID.

Also, you can try playing around with raid calculator to see theoretical read/write speeds in wolfram alpha.

share|improve this answer

The key thing to remember is that data is distributed in chunks, not per bit or per byte. The chunk size (aka stripe size) varies based on implementation, and is often configurable. The chunk size is typically somewhere between 32KB - 2M.

So for a single read request of a file smaller then a single chunk, only a single member of the array will need to be used. For a read larger then the chunk size, the array will have to retrieve all the chunks from each member drive. So it basically would ask for chunk 1 from the one disk, chunk 2 from the next disk, chunk 3 from the next disk, and so on.

Or as wikipedia puts it.

One method of striping is done by interleaving sequential segments on storage devices in a round-robin fashion from the beginning of the data sequence.

So depending on the chunk size used in an array, and the size of your data, and how your data is accessed all factor in to how your reads are distributed between the member devices. But the distribution of your data is what changes the I/O. Some applications may not see much improvement at all on a RAID0, and some may see huge improvements.

share|improve this answer
    
so what difference will it make if accessed on a non raided disk.In that also isnt data saved as blocks of fixed size.Also how can we say that it is faster than raid 1,since whole data is located in the same HDD on raid1. –  Kevin Parker Dec 15 '12 at 10:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.