Skip to Main Content

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, Nick.

Asked: March 22, 2001 - 12:54 pm UTC

Last updated: April 05, 2010 - 1:23 pm UTC

Version: 8.1.7

Viewed 1000+ times

You Asked

My company is in the process of upgrading our Oracle environment with new Sun Solaris dedicated database servers under 8.1.7. We will be using RAID.

All the Oracle documentation I have seen refers to RAID 0+1 or RAID 5. However some web sites are now talking about RAID 10 as the best solution for database applications.

Can you tell me if RAID 10 is appropriate for Oracle?

Also, can you give me any info on choosing an appropriate striping size? Is it related to db_blocksize or OS block size?

Thanks for any information you can provide.

and Tom said...

Raid 10:
</code> http://www.acnc.com/04_01_10.html

is just striped arrays whose segments are raid 1 arrays.

since raid 0 is stripes -- and 0+1 is striped mirrors, raid 10 is actually 0+1

See
http://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:359617936136 <code>
...



Here is a support note on stripe size settings:

Article-ID: <Note:106991.1>
Folder: server.DBA.Storage
Topic: Draft Articles
Title: Understanding striping mechanism
Document-Type: BULLETIN
Impact: LOW
Skill-Level: NOVICE
Server-Version: 08.01.0X
Updated-Date: 28-APR-2000 19:44:38
References:
Shared-Refs:
Attachments: NONE
Content-Type: TEXT/PLAIN
Keywords: SIZE; STRIPE; STRIPING;
Products: 5;
Platforms: UNIX;

*************************************************************
This article is being delivered in Draft form and may contain
errors. Please use the MetaLink "Feedback" button to advise
Oracle of any issues related to this article.
*************************************************************

PURPOSE
-------

With this note you can learn some news about Striping Disks
mechanism by Operating System Software.


SCOPE & APPLICATION
-------------------

To get better performances in great systems and in multi-user
environments.


Understanding striping mechanism
---------------------------------

Striping divides a large table's data into small portions and stores
these portions in separate datafiles on separate disks. This permits
multiple processes to access different portions of the table
concurrently without disk contention.
Striping can either be performed manually, through careful data file
allocation to tablespaces, or through operating system striping
utilities.

In this note, we treat some news about Striping Disks mechanism by
Operating System Software.
This approach usually performs better than manual striping, specially
in not small systems and in multi-user environments.

With striping software, the concern is choosing the right stripe
size (it's often needed using a large stripe size of at least 64KB
with OS striping when possible).
This depends on the Oracle block size and disk access method.
In particular, the outstanding Oracle parameter is constituted by the
I/O size, which is given by
DB_BLOCK_SIZE * DB_FILE_MULTIBLOCK_READ_COUNT.
The values of these two parameters are fixed in init.ora file:
DB_BLOCK_SIZE specifies the size in bytes of Oracle database blocks
and its default value is operating-system dependent;
DB_FILE_MULTIBLOCK_READ_COUNT specifies the maximum number of blocks
read in one I/O operation during a sequential scan and its default
value is 8.
The maximum I/O size is platform-specific (for example, in a range of
64KB to 1MB).

Stripe size must be at least as large as the I/O size.
Having a large value of stripe size it allows the system to perform
more sequential operations on each disk, since it decreases the
number of seeks on disk, but it reduces the I/O parallelism so fewer
disks are simultaneously active.

However, if you have problems, it's preferible increasing the I/O size
of scan operations (going, for example, from 64KB to 128KB), instead of
changing the stripe size.
A good trade-off is to make stripe size larger than I/O size by a
factor of 2 or 4.

Striping supports multiple users running sequentially as well as single
users running in parallel, but it's particularly useful in optimizing
random access to tables with many rows.
In fact, for operations such as full table scan, it permits to reach
the maximum I/O throughput for your platform, because it increases
the number of disk seeks, but in the same time it consents to have a
large I/O size.
Also, for operations such as a nested loop join or parallel index
range scan, operating system striping enables you to avoid hot spots:
I/O is more evenly distributed across the disks.



Rating

  (4 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

file_mapping

A reader, August 15, 2004 - 10:13 pm UTC

Do you have any experience using the file_mapping parameter in 9iR2? It seems to use some vendor-supplied mapping libraries to populate some v$ views that contain a mapping between datbase objects and the exact physical device they reside on.

I have my database on 20 physical disks in a RAID 10 configuration. "SAME" as you call it.

It gets pretty difficult to see where the hot spots are, if my stripe size is adequate, are my disks able to keep up with the IO activity thrown at them, etc, when everything appears to Oracle (and the OS) as one large honking disk!

This file_mapping and related views look interesting.

Thanks

Tom Kyte
August 16, 2004 - 8:22 am UTC

i have not used it no. sorry -- no experience with it.

RAID10 vs RAID0+1

Dim Pan, April 02, 2010 - 6:31 pm UTC

I thought that:

RAID10 is "striped mirrors", e.g. (1=2)+(3=4).

and that

RAID0+1 is "mirrored stripes", e.g. (1+2)=(3+4).

(Note: numbers represent HDisks, + is striping, = is mirroring)

If I am right, then raid10 and raid0+1 are two different "things" albeit, very similar.

Based on the above and -again- IF I am correct, raid10 is a little "safer" that raid01 but have no proof for it.

Any ideas on this?

Thank you!
Tom Kyte
April 05, 2010 - 1:23 pm UTC

yes, you are correct, they are similar but different. 10 is a more available configuration - survives larger sets of disk failures - than 01

C., April 08, 2010 - 11:08 am UTC

@Dim Pan: To check which kind of version of RAID looks more reliable, simply try the following SQL-Statement (tested on 10g2)

WITH t AS (SELECT 'ok' status
             FROM dual
            UNION
           SELECT 'x'
             FROM dual)
SELECT t1.status st_disk1
     , t2.status st_disk2
     , t3.status st_disk3
     , t4.status st_disk4
     , CASE WHEN (t1.status = 'ok' 
              AND t2.status = 'ok')
              OR (t3.status = 'ok'
              AND t4.status = 'ok')
            THEN
              'working'
            ELSE
              'broken'
            END st_raid01  
     , CASE WHEN (t1.status = 'ok' 
               OR t2.status = 'ok')
             AND (t3.status = 'ok'
               OR t4.status = 'ok')
            THEN
              'working'
            ELSE
              'broken'
            END st_raid10  
  FROM t t1
     , t t2
     , t t3
     , t t4
;           

For Reading...

A reader, April 27, 2010 - 10:45 pm UTC



Just wanted to share the following TRUE story, I am sure a lot of us have already read it. Wanted to put it up earlier but slipped my mind. Interesting piece though...

http://thedailywtf.com/Articles/The-Certified-DBA.aspx

Goes to show: There are DBAs, Then there are GOOD DBAs and "ARROGANT" DBAs.

Being a DBA myself I was rather sad but then ..... <big sigh>

It just implies that we need to upgrade ourselves as we make progress, learn to "ASK" & ask to "LEARN". Things change, they improve.

We should be open to suggestions and should not take things for granted.

I guess that applies to us all irrespective of who we are!!

Cheers!