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

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Raw Partitions

Re: Oracle Raw Partitions

From: Mario <msimic_at_alf.tel.hr>
Date: Mon, 31 Aug 1998 11:26:30 +0200
Message-ID: <6sdqhs$15s@as041.tel.hr>

Phil Miesle wrote in message <01bdd27d$9b77b320$073c2f8f_at_sammy>...
>
>
>A. Gordon <aog_at_capgroup.com> wrote in article <35e46366.14946541_at_news>...
>> Has anyone had experience with Oracle raw partitions? If so, I'd
>> appreciate any reactions to them. In particular, I'd like to know:
>>
>> 1. Do they provide any performance gain over file systems?
>
>You'll get a 50-50 mix of responses on this: I think it is too close to
>call. In some cases, raw will be faster, in other cases a filesystem will
>be.

Can you give us some examples with explanation ?

I think that under almost no circumstances file system should be faster. I'll try to explain why:

case 1: Reading block from database

            Here we have two possibilities:
        1.1 : Data block is already cached in buffers part of SGA. In that
case
            response will be the same.
        1.2 : Data block is not in SGA and is requested by read() system
call.
            If you are reading file system, then file system buffers are
inspected
            first. If data block is already there ( very unlikely to happen
because
            file system cache is much smaller than buffer cache in SGA )
then
            you are right: reading from file system in that case should be
faster.
            If data block is not in file system cache, then the disks are
read and
            data block is fetched to file system cache. But it means that
some
            place must be freed for that data, so some "dirty" buffers are
written
            to disk. Meanwhile, some other processes could also request data
            to be written to file system cache i.e. its likely that you
should have
            disk buffer contention. The thing could become very
complicated -
            you can consult some literature dealing with UNIX internals if
interested.
            If you use raw device, than data block is simply read from disk
and
            moved to SGA.

case 2: Writing block to database:
            We have to estimate only what is going on when write() system
call
            is issued, because ORACLE kernel doesnt know whether it  uses
            raw device or file system. When file system is in use, then the
data
            are first written to cache and then to disk. In that case, all
contentions,
            buffer locking, waiting for some buffers to be freed etc are
very likely
            to happen. In write intensive application, your file system
cache could
            become a real bottleneck. Performance degradation could be even
            50% based on my experience.
            Of course, if datafile is on raw device, write() system call
simply writes
            data to disk.


>The literature is quite mixed. Parallel Server will require that you
>use raw devices.

I wonder why ?

>
>> 2. Are they really harder to manage?
>
>Depends on what you're trying to manage:
> Backups can be made easier through Oracle's backup utility (introduced
>in 7.3), but if you're trying to do them using scripts, you'll hate
>yourself. Best to use some sort of backup management software which can
>handle raw devices.
> If you're trying to manage I/O, you'll have a much better idea as to
>where your data resides on the disks if you use raw.

That's another point ! When using filesystem than its very possible that your
large data files would be very fragmented. All unix filesystems are designed to manage many small data files not small number of large data files. Raw devices always occupy continous disk peaces.

> You can sort of do
>this with filesystems, but it is much more difficult (and you end up having
>just as many filesystems as you would with raw devices).
> If you're trying to manage the administrator's time, go with
>filesystems.

What's the difference ? If any extra time is needed then it's the case when you use file systems. First you have to make filesystem, then you have to tune it, sometimes the file system check is needed, you must ensure that nobody can corrupt your data files by randomly overwriting them ( you must protect your data files from yourself too ! ) etc ... When you decide to use raw devices - you simply create them and forget all this messy things.

>
>> I've read some literature already; however,
>> personal experiences would be greatly appreciated!
>>

Well, this is my experience, but everybody has his own opinion ...

Mario Simic BSCS
IN2 d.o.o. (Ltd)
Zagreb, Croatia
http://www.in2.hr Received on Mon Aug 31 1998 - 04:26:30 CDT

Original text of this message

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