Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: raw devices

Re: raw devices

From: Don Granaman <granaman_at_home.com>
Date: Tue, 21 Aug 2001 01:06:06 -0700
Message-ID: <F001.00371DB9.20010821003523@fatcity.com>

Raw versus filesystem is almost a religious issue. There are very good arguments both ways. The main advantages of filesystems are ease of use and flexibility. I tend to favor raw devices for critical production systems - for write-intensive OLTP at least. For development and functional test servers, at least, filesystems are simpler, more flexible and usually more appropriate. (Incidentally, one CAN clone a raw database to filesystem without any special magic.)

For a more thorough discussion of some of the performance issues, see Jonathan Lewis' site at http://www.jlcomp.demon.co.uk , specifically see http://www.jlcomp.demon.co.uk/raworfs_i.html Also see Steve Adams' site at http://www.ixora.com.au , specifically see http://www.ixora.com.au/tips/creation/raw_datafiles.htm . Search on "raw device" to find more there.
(Sorry if this is some sort of infraction by posting direct links to the topic pages!) There are a number of other such references - on both sides of the argument. (I'm looking forward to Gaja's well-reasoned arguments against raws!)

The following is not at all comprehensive, but contains a few considerations not often mentioned.

Filesystem
-advantages

    Flexibility - easy to add, delete, and resize files. Autoextend, etc.     File system read buffering MAY actually be an advantage for some Oracle systems.

    Easy to back up with anything - including cp or copy     Everybody "understands" files (but often less well than they think - see next)
-disadvantages

    Files and filesystems can get extremely fragmented! (Think about it - resize, autoextend,...)

    Write performance penalty
    OS-level datafile locking issues
    May not support async I/O or may not support it well     (UFS) fsck of large filesystems can take FOREVER after a crash!

Raw device
-advantages

    Significant write performance advantage     File system buffering MAY be a disadvantage     Guaranteed sequential datafile space - if the raws are built that way     Much more difficult to accidentally munge (e.g. "$ rm *" OOPS!!!)     Async I/O support [on any (?) platform] -disadvantages

    Requires much more preparation work for layout (This is a disadvantage? ;-)

    More administrative overhead - at least initially     Backups must be done with something that handles raw devices     Not as easy to move things about and perhaps to resize or autoextend them

Note that there is no particular distinction made above between UFS and journaled filesystems (e.g VxFS). Due to space and time constraints, I am arbitrarily declaring that "out of scope" for my part of this discussion! The URLs above do consider that distinction in some detail.

In general, filesystems are easier, but are, at least in my opinion and experience, less secure and perform worse - at least for write-intensive systems. Some of the traditional arguments against raws are largely moot today. For example:

Backups - most modern backup utilities can handle raws transparently.

Administration - modern volume managers make setting up raws actually a bit easier than setting up filesystems. However, you will still have a lot more of them since you need a raw device for every datafile, redo log, or control file you place on raw.

Raws do still introduce some constraints. Chief among them is up front planning for the layout and its prerequisite analysis.

My personal regimen for making raw devices usable includes:

Subjectively, I've had far fewer problems with raws over the last decade+ than with any type of filesystem - far fewer corruptions, mysterious disappearances, bugs, etc.

A very thorough discussion of all aspects of this would be huge - perhaps a book (but undoubtedly a very poor seller)!

-Don Granaman
[certifiable Orasaurus]

> Don & Oracle Gurus,
>
> Going by your answers, I have  a question for you?  What you have
explained
> is excatly the same environment we had back in our previous work place. But
> here we have everything what you have MINUS the raw devices. The question I
> have for Don and the forum folks is, What is the benefits of having flat > files over raw? I have been working with RDBMS for over 10 years and I have
> always worked with RAw and I have raw as recommended by MS,SYBASE and
> INformix.
>
> The reason for this question is because we are moving to RMAN/Veritas and
> EMC Timefinder, I suggested things would be better if we move to raw.  But
I
> could not prove for the fact that Raw is better of Flat FS.
>
> Please Suggest from your past experiences.
>
> Thanx
>
> Srikanth


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Don Granaman
  INET: granaman_at_home.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Aug 21 2001 - 03:06:06 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US