AMD Processors
Decrease font size
Increase font size
Topic Title: Guide to RAID 0
Topic Summary:
Created On: 03/14/2004 11:39 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 03/14/2004 11:39 AM
User is offline View Users Profile Print this message

Author Icon
blackstar
Console Jockey

Posts: 439
Joined: 12/03/2003

If you know a bit about RAID 0, please comment. If you want to know a bit more about the below points, this may be useful.
I hope this may answer some questions.

Tips:
QUOTE
*Setting up RAID will wipe your drives. there is no way around this - you'll need to back up*

*When upgrading/ changing motherboards, you may need to set up the RAID array again. Not all controllers are compatible - so backup again before swapping motherboards, in fact back up whenever making changing anything to do with drives*

*Changing stripe size after windows is installed or there is data on the drives will cause it to be lost - changing back to the original stripe size may cause corruption. Backup before trying it*

*Be aware that splitting data across multiple drives increases the chance of data loss if a drive fails. If you need a "mission critical" machine, consider adding another drive as a backup device, and either scheduling backups or setting up RAID 0 +1 or similar.
Of course, we should all keep our data regularly backed up so its a non - issue, but be aware of it anyway*

*Real world benefits of RAID 0, as long as you are aware of the increased risk of drive failure, mean it is a worthwhile way of increasing the data rate beyond what a single drive of the same type can match - or even beyond what a single faster drive can match. I choose RAID as I want a large capacity drive which is cheaper then a single large drive and faster, and partionable as I choose. But not everyone will need this and for the cost, it may be worth upgrading other components instead.
I would definately recommend for normal users to upgrade to 1GB of RAM first which will decrease load times for many apps in itself by reducing virtual memory usage and disk thrashing*

*Proper Backup procedure - copying data from one independant media device to another, regularly - the regularity of backing up depends on the importance of the data, and how often it is changed. Always backup when important data is added. Always backup before making big changes either to the data, the storage medium, the controller for the medium, cables, or the software (drivers/ OS) running it.
Copying data from drive or RAID array X to another partition on drive or RAID X isnt failsafe - it wont prevent data loss if a drive fails, or the RAID array or FAT becomes corrupt. although it is useful to prevent accidental deletion.

Keep your data on multiple independant drives/ other backup devices and keep it up - to - date*

Quick setup guide for hardware RAID on WinXP

So, what is RAID 0?

RAID levels

How does RAID 0 work?

What is “stripe size”, and how can it affect the speed of my RAID 0 array?

How do I find out what to set the “stripe size” value to? *useful application* stripeSizeCalculator.exe' ">http://www.blackstarweb.pwp.bl...ripeSizeCalculator.exe

How can I experiment with stripe sizes, without reinstalling my O/ S?

References, and useful links

Thanks

-----

Quick setup guide for hardware RAID on WinXP:
1) Backup any data you need. Check your motherboard manual for an install guide - if there is one, use that one first.

2) If you are going to keep your existing data, or reinstall the same apps onto your RAID setup, check what stripe size is optimal. 64KB is a good start point.
You can also use my application' ">http://www.blackstarweb.pwp.bl...ripeSizeCalculator.exe to give a rough idea.
Just make a note of this for later.

3) Check if your controller needs RAID drivers. If so, put them on a floppy disk or slipstream them into winXP' ">http://greenmachine.msfnhosting.com/READING/addraid.htm. (I havent checked this myself)

4) Enter the BIOS. Enable the RAID controller and set the boot order so that the active RAID controller is above any other hard drives in there. (If you have multiple RAID controllers, obviously set the active one. If RAID doesnt show, make sure the controller is enabled. If it still doesnt show, see if SCSI is an option).

6) Save changes and exit BIOS.

7) On reboot, there should be a seperate RAID controller screen showing after the BIOS screen. Enter it using the keypress shown.

8) Make sure both drives show up.

9) Set the stripe size and create array.

10) Exit.

11) Install Windows. Press "F6" (unless you slipstreamed the drivers, or you dont need drivers) when prompted and insert the floppy disk containing the RAID drivers. Select the drivers for your controller and continue.

12) Install as normal. When finished, check the speed of the array using your chosen Application.


So, what is RAID 0?
There are many levels of RAID available. The one we’re interested in is RAID 0.
RAID 0 is a method of improving the rate at which we can read/ write data from hard disks.

Firstly - creating RAID will erase any data on the drives, so backup first!

RAID can be setup in Windows (software RAID) or, using a RAID controller (hardware RAID).

Hardware RAID - requires a RAID controller, either onboard or on a RAID card.

Software RAID does not require a RAID controller – howto: http://www6.tomshardware.com/h...1090...06/raid-02.html' ">http://www6.tomshardware.com/h.../20010906/raid-02.html

Both kinds of RAID require more then one Hard drive, ideally identical size + type.

When a hardware RAID 0 “array” is constructed, your operating system will view both hard drives (or more) as one, large drive – which will be faster at reading/ writing files between certain sizes (find out why some file sizes run faster then others later).
This is good for speed. But, as there is always a chance that any hard drive can fail, by joining two together, you are marginally increasing the risk of losing data.
However, even though the risk is low, it’s a good idea to get hold of a copy of Norton Ghost or another good drive imaging program – to take a “snapshot” of your drives contents, to restore later in case of any problems. And, there's another advantage to using a drive imaging program - see the final section
Most RAID controllers are accessible in DOS - there’s been a few Q's about this. Dos treats the drive as normal - you can FDISK, FORMAT whatever, just like a normal drive.

To install Win2000/ XP on hardware RAID, you will often need a copy of the RAID driver on floppy disk.
Check with your motherboard or RAID card manufacturer, or other users of the same type.


RAID Levels
QUOTE
1 DEFINITION Disk mirroring
COMMENTS One drive is an exact copy of the other.

RAID 1 is useful for building a fault-tolerant system or data volume, providing excellent availability without sacrificing performance. all write operations are made to both disks simultaneously.

3 DEFINITION Disk striping with parity
COMMENTS One physical drive is dedicated with parity to parity data (i.e., information the disk controller calculates to determine missing data on other disks); data is striped in blocks across multiple drives as in RAID 0.

RAID 3 offers the performance of RAID 0 with the fault tolerance of RAID 5, but with cautions. As with RAID 0, RAID 3 uses single-threaded I/O but with a standard 256KB data transfer block. Streaming data applications such as video-editing systems benefit simultaneously from disk parallelism, fault tolerance, and the large-block transfers. But database applications or others with many small transactions issued simultaneously might have problems.

RAID 2 is similar in concept to RAID 3 but writes in single bits to the drives in the stripe set.

4 DEFINITION Disk striping with parity
COMMENTS One physical drive is dedicated with parity to parity data. The striping algorithm differs from RAID 3 in that a data word is written to one drive, the next word to the next drive, and so on.
RAID 4 is similar to RAID 3 but uses a round-robin algorithm for writing data to the stripe set. Because RAID 4 has to generate parity data on one drive, write operations are single-threaded, but reads are multithreaded (i.e., are performed via multiple simultaneous I/O requests) because not all drives are involved in every transaction. RAID 4 is better for an environment requiring more discrete transactions per second. Both RAID 3 and 4 use the minimum number of drives to achieve fault tolerance.

5 DEFINITION Disk striping with parity
COMMENTS Parity data is distributed across with parity all drives in the volume. Normal data and parity data are written to drives in the stripe set in a round-robin algorithm, similar to RAID 4.
RAID 5 is multithreaded for both reads and writes because both normal data and parity data are distributed round-robin. This is one reason why RAID 5 offers better overall performance in server applications than either RAID 3 or 4. Random I/O benefits more from RAID 5 than does sequential I/O, and writes take a performance hit because of the parity calculations. RAID 5 is ideal for database applications.

6 DEFINITION Disk striping with parity
COMMENTS The parity information has with parity it's own parity data.
RAID 6 is essentially RAID 5 enhanced, such that two drives in the stripe set can fail because the distributed parity information has its own parity and is thus redundant.

10 DEFINITION Mirrored stripe sets
COMMENTS Also known as RAID 0+1 or RAID 6 stripe sets by some manufacturers.
You can build RAID 10 either directly through the RAID controller (depending on the controller) or by combining software mirroring and controller striping, or vice versa (called RAID 01). "

http://www.winnetmag.com/Artic...x.cf...m?ArticleID=218' ">http://www.winnetmag.com/Artic...ndex.cfm?ArticleID=218 2002.


How does RAID 0 work?
When you use a RAID controller, you can access more then one hard drives at once (lets say 2, for example - but it depends on the controller)
By splitting your data across two or more disks, which can be read to and written to simultaneously, the data rate can be increased – it doesn’t double for two disks, but there is a noticeable improvement if you set it up correctly.
Read performance gets the most gain; write does too, but not to such a large degree.
The gain you get is because the drives are accessed differently to normal.
In RAID 0, the disks are formatted into many stripes of a fixed size – stripe 1 on disk 1, stripe 2 on disk 2, stripe 3 on disk 1, and so on.
The bigger the file you are reading/ writing, the more stripes it covers across both disks. And, this increases speed – while one drive is reading from a stripe, the other is getting in position to read its stripe and so on. “Prefetch” is a good word for this.

http://images.anandtech.com/re...orag.../RAID/RAID0.gif' ">http://images.anandtech.com/re...storage/RAID/RAID0.gif
[linked to ANANDTECH, original picture from PROMISE TECHNOLOGY]


What is “stripe size”, and how can it affect the speed of my RAID 0 array?
The drives are “striped” – “stripes” of a certain size are created on both disks, and the size of each stripe is measured in kilobytes – “stripe size”. The speed our RAID array will access files will be different depending on the stripe size, and the size of the file being accessed.

If you have 32KB stripes, and you are writing a 64KB file, the file is split over the two drives - 32KB each. As one drive is accessing its 32KB stripe, the other is seeking the start of its stripe, so it’s ready to read as soon as the first drive has finished. You can read and write the file faster.

However, it depends on how big the files on your hard drive are on average - if the stripe size is bigger then your file, like below:

E.g. say it’s a 32KB stripe, and a 16KB file

The file is small enough to only be written to one stripe, on one drive. This means it can only be accessed at the speed of one drive, not two or more.
Another problem with stripes in general is that each stripe holds at maximum one file – and any extra space in the stripe that isn’t full, gets wasted.
(112KB for every 16KB written to a 128KB stripe, 128-16=112)
(Wastage gets worse if you have huge stripes, and lots of small files)

If the stripe size is smaller then the file, you do gain speed – like the first example “If you have 32KB stripes, and you are writing a 64KB file”…

But if the stripe size is too small, you lose speed due to excessive drive seeking, and CPU overhead rises.

Not very straightforward, is it? But, never mind – the differences in speed aren’t huge. And, it’s pretty easy to find a good stripe size to start with, and experiment with it.
And, the final section details how to experiment with stripe size, without reinstalling your operating system – if you have a good drive-imaging program like Norton Ghost.


How do I find out what to set the “stripe size” value to?
Depends on how big the files you move around most are, and your hardware (in particular, seek time of your hard drive and CPU power)

You may want to accelerate video editing - in this case, go for the largest stripe available, e.g. 128KB.

To accelerate very small file access, use a small stripe size, e.g. 16KB.

To accelerate your operating system and for general use, I suggest 64K or 32KB.

Otherwise, you want stripes 1/2 the size of the most common files I suppose, theoretically anyway…
A way to find the average file size is to use disk defragmenter’s analyse function, and half the “average file size”.
Stripe size starts at 1KB(! and goes up in doubles, (1, 2, 4, 8, 16, 32, 64, 128, 256 options) for most controllers.
Go for the next size down for stripe size.

This app will calculate the stripe size exactly as mentioned
http://www.blackstarweb.pwp.bl....co....eCalculator.exe' ">http://www.blackstarweb.pwp.bl...ripeSizeCalculator.exe

Going for the next size down, not up, helps make sure as much data as possible is striped (and not just written to one drive) – see “What is “stripe size”

My analysis in disk defrag gives an average file size of 228 - half of 228 = 124, so I chose the next size down – 64K as a start point.
However, this method is not 100% accurate to give you an answer – but, it does give you a good start point (if your average file size is 256K, there’s no point in using 16K for a major boost) - it only takes a few big files to "skew" the results. I think use the average file size as a guide, and try the two or three stripe sizes AROUND THE MOST LIKELY. I tried 32, then 64, and maybe later 128, experimentation guided by the average file size
Experimenting is best - it also depends on your hard drives (seek times in particular), and the controller used.
So, either experiment, or look for test results from someone with as close a system to yours as possible - drive controller/ drive.
As a rough guide, 1/2 the average file size.


How can I experiment with stripe sizes, without reinstalling my O/ S?
Install windows onto your RAID drive, and then use Norton Ghost or a known good drive imaging program to make an image file, or "snapshot" of your drive's contents.
Copy this image file to a drive or disk that is not part of the array (blank DVD, multiple CD's, second HDD *not a part of this RAID array*).
Make sure you can access the backup in Ghost or your image program.
Then change the stripe size - Ghost should be able to restore the image back to your drives, whatever the stripe size is set to (after all, the image isn’t dependant on stripe size).
Recommended - latest version of Ghost.

If you don’t know what size to use, use the default one and use Ghost as above to experiment with different sizes.

Note - I found a bug in Ghost, after selecting "backup" in Windows, it reboots into DOS mode to make the backup and freezes on my system.

When/ if it freezes
, reset and boot into DOS with a startup disk, and run "autoexec" from the DOS prompt. This loads Ghost, and backs up [bigsmile]


References, and useful links:
http://www.anandtech.com/stora...oc.h...html?i=1491&p=2' ">http://www.anandtech.com/stora...howdoc.html?i=1491&p=2

http://www.storagereview.com/g.../ref.../genArrays.html' ">http://www.storagereview.com/g...oncepts/genArrays.html

http://data-recovery.lsoft.net/concept_raid.html
Statistics
112018 users are registered to the AMD Processors forum.
There are currently 0 users logged in.

FuseTalk Hosting Executive Plan v3.2 - © 1999-2014 FuseTalk Inc. All rights reserved.



Contact AMD Terms and Conditions ©2007 Advanced Micro Devices, Inc. Privacy Trademark information