Martin Cracauer Homepage Forum Forum Index Martin Cracauer Homepage Forum
Don't get confused, this is just my homepage, not really a message board. I implemented it as a forum for reasons you can find here.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

RAID hints, misconceptions, FAQs

 
Post new topic   Reply to topic    Martin Cracauer Homepage Forum Forum Index -> General hardware notes
View previous topic :: View next topic  
Author Message
Martin Cracauer
Site Admin


Joined: 09 Feb 2005
Posts: 113
Location: Boston, MA, USA

PostPosted: Mon Mar 20, 2006 12:43 pm   Reply with quote

This thread will hold postings about RAID, individual points I make elsewhere and copy here.

Usually they will be small warnings or shedding some light on common misconceptions.
Back to top
View user's profile Send private message Visit poster's website Permanent URL to this post in this thread
Martin Cracauer
Site Admin


Joined: 09 Feb 2005
Posts: 113
Location: Boston, MA, USA

PostPosted: Mon Mar 20, 2006 12:51 pm   Reply with quote

If you use a hot spare in your RAID-5, it might not be as hot as you think.

I have seen the misconception that a hot spare (a spare drive already in the computer and associated to an array by the raid software) is much better than a shelf spare (a spare drive you physically connect after you have a drive fail in an array) because it doesn't need the long re-sync.

This is incorrect, a hot-spare in a raid-5 will need the same full re-sync that a shelf-spare will need. The hot spare cannot be ready all the time before a drive fails because the raid software cannot predict which drive will fail and therefore it cannot prepare the hot spare to act as an instant replacement.

The hot-spare is slightly better because it starts the re-sync earlier, while the shelf-spare starts it's re-sync after it is physically inserted.

In an environment where operators are standing by and can insert the shalf spare quickly it might actually be better to have spares on the shelf. Because the hot spare are running all the time and are subject to degration through heat and from vibrations as the active drives are, and they might be subject to damage through power fluctuations or assasinations by broken PSUs.

Since the re-sync usually takes an hour or more anyway, and since the insertion of a shelf-spare in a managed environment only takes 5-10 minutes if your people are fit (yeah I know, "if" smile) the shelf-spare might not be such a bad idea.

Also, several shelf-spares are more flexible in case you have so many failures that you need several spares in the same array. If you don't have shelf-spares you would have to rip a ht spare out of another active array which is a hassle and error-prone.
Back to top
View user's profile Send private message Visit poster's website Permanent URL to this post in this thread
Martin Cracauer
Site Admin


Joined: 09 Feb 2005
Posts: 113
Location: Boston, MA, USA

PostPosted: Mon Mar 20, 2006 1:00 pm   Reply with quote

RAID-0 might be slower than you think

The performance advantage of raid-0 is often overstated when people only read benchmarks that concentrate on contiguous throughput of a large file. Raid-0 is much better doing that, granted.

However, Raid-0 is not an advantage over a single disk in seeking as long as there is only one concurrent process demanding random sectors. The reason is that each sector only exists once and hence the raid software cannot do anything with regrds to optimizing. The situation is better with several concurrent processes, as you can see in my raid benchmarks.

But still, for most computer users they only want a speedup for one concurrent process demanding sectors when it comes to random access. Namely, it is usually rubbish to put your OS installation on raid-0. What happens in your OS installation that demands fast seeks is starting program and the programs need config files (readonly random access) and they need shared libraries/DLLs (also readonly random access). These kind of accesses, when you only start one program at a time, are not sped up by raid-0. They are, however, sped up by raid-1 (greatly), and by raid-5 (not as much as raid-1 but better than raid-0).

So for your OS install, if your goal is to load programs faster, it is faster to use raid-1 than to use raid-0. Of course you lose 50% of your space. Adding more drives to your raid-1 will further increase speed of random sequential lookup and add redundancy.

In any case, you should move $TEMP, /tmp or whatever directory your OS uses for temporary files off your OS drive or OS array. The temporary files have different performance characteristics than the rest of the use of the OS installation and you can't optimize for both. Also, you typically don't need redundancy for these temporary files.


Last edited by Martin Cracauer on Mon Mar 20, 2006 1:10 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website Permanent URL to this post in this thread
Martin Cracauer
Site Admin


Joined: 09 Feb 2005
Posts: 113
Location: Boston, MA, USA

PostPosted: Mon Mar 20, 2006 1:09 pm   Reply with quote

Raid-0 and large files

Raid-0 is, as mentioned, a huge advantage when it comes to sequential writing or reading of large files, such as video files and disk images.

But don't be fooled, this doesn't always apply.

Namely:

  • If you copy files and source and destination are on the same array you lose big because you trash the disks. Same problem as using a single disk for both source and destination - raid-0 doesn't speed up trashing. It would be much faster to use the different disks you have to keep source and destination on different disks than to much all disks into one raid-0 and then trash it.
  • If you offer disk images or large videos for download, then you first need to see whether your network connection is fast enough to saturate plain disks. Even if your network is faster than plain disk, then you still have the concurrency problem: while things speed up greatly with a single client, multiple clients accessing more total data than you have RAM will trash the disks in RAID-0. It might be better to put files that are often downloaded simultaneously on seperate single disks than everything in one raid-0.
  • If you use a lot of large video files, but you compress or decompress all the time because accessing the disks then you don't need fast disks or fast arrays anyway, because your CPU is the bottleneck.


However, if you want to scan large data files with relatively few CPU load on each sector then raid-0 is a huge advantage. But if you do that linear reading because you do a linear search, you might want to think about using some real search algorithms instead.

If you copy large files and you have different disks for source and destination then raid-0 (for source and destination separately) is a huge advantage.
Back to top
View user's profile Send private message Visit poster's website Permanent URL to this post in this thread
Martin Cracauer
Site Admin


Joined: 09 Feb 2005
Posts: 113
Location: Boston, MA, USA

PostPosted: Mon Mar 20, 2006 1:19 pm   Reply with quote

Misestimation of raid-0 risk

I think people often miscalculate the risk of raid-0.

Let's say you have 3 disks and you can either have them as three single disks or one raid-0.

Granted, in the case of raid-0 you always lose all data if any one disk fails.

But let's be honest here, the situation with single disks is not much of an improvement:

  • Murphy's law dictates that the file you need will be on the single disk anyway.
  • While the risk to lose any given file in the system is bigger in the raid-0 situation (probability multiplication by three), the risk for any given file is still equal to the probability to lose a harddrive. So you don't get around backup either way.


The one thing that single disks over raid-0 give you is less time to restore. If you have full backups then restoring one disk will take on 1/3rd of the time of a full restore.
Back to top
View user's profile Send private message Visit poster's website Permanent URL to this post in this thread
Martin Cracauer
Site Admin


Joined: 09 Feb 2005
Posts: 113
Location: Boston, MA, USA

PostPosted: Mon Mar 20, 2006 1:28 pm   Reply with quote

Non-disk risk misestimated

People often miscalculate the risk to lose disks from errors that are not simple disk failures.

Namely:

  • Bad power supply killing all disks in a system
  • Application software or OS error corrupting files
  • Bad memory (RAM) corrupting files
  • Users fatfingering something, nuking files


The first item in particular becomes more and more of a problem. If you browse Internet forums you see an increasing number of cases where a bad PSU kills all devices attached, or at least many. Very obviously, this will not be pleasent for raid-5 users are two disks killed mean loss of the array.

To be safe against a PSU failure of that kind you need to have redundant disks on different PSUs. In RAID-5 that would mean one PSU per disks which is ugly but you can do RAID-50 and put the second array on the second PSU. Small amounts of very important data re probably best kept on raid-1 with one disk in an externl case with its own PSU.

Of course using more different PSUs increases the risk of PSU faillure smile

Just a word of warning. I personally lost parts of a raid-5 when I used Maxtor Diamondmax 9 disks which are apparently very sensitive to power fluctuations (and generally bad disks, I found a number of people with the same problems, not to mention Maxtor warranty service sucks). I had a bad UPS (ironically) mortally wounding two disks and while the one-disk degraded array kept functioning long enough to get off the important data the second wounded disk was dead before I reconstructed the array.
Back to top
View user's profile Send private message Visit poster's website Permanent URL to this post in this thread
Display posts from previous:   
Post new topic   Reply to topic    Martin Cracauer Homepage Forum Forum Index -> General hardware notes All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group