Improve company productivity with a Business Account.Sign Up


How to use a raw partition with Oracle 8i at Solaris 2.6

Posted on 2000-03-15
Medium Priority
Last Modified: 2013-12-05
I try to configure a Solaris System
with Oracle8i for use with a
raw partition. Who knows the right way?

best regards
Question by:Gerald02

Expert Comment

ID: 2620736
It should be described in the Installation manual or in the Unix DBA guide.
You need to know the size of your raw partition when creating the table space. When creating the tablespace on a raw partition, you must give the SIZE that is equal to the size of the raw partition minus one Oracle block (the file header), otherwise it will terminate with an error.
Honestly, I would not recommend you using raw partitions. It used to be that raw was faster than unix file systems. But this is practically no longer the case. Considering additional headaches in using raw, this difference is not worth it. Another reason for raw used to be that not all unix systems supported synch writes for file systems and because of this redo logs were always in jeopardy, that's why we used to put logs on raw partitions. Now, I believe all unix systems support synch writes and youy can run logs on unix files. Considering that modern disk storage systems like Veritas or EMC are completely different, the concept of raw vs unix files is practically irrelevant.
So if I were you I wouldn't even think about raw.

Expert Comment

ID: 2621168
You will need to create the raw devices as root, but the ownership
should be changed to the 'oracle' account afterwards. The group must
also be changed to the 'dba' group (usually called dba). Say you created two raw devices /dev/raw1 and /dev/raw2.

To use raw device you need to specify the full pathname in
single quotes, and use the REUSE parameter.  e.g. if the two raw
devices are each 30Mb in size, and the database has a 4K block size, the
relevant command would look like this:

create tablespace raw_tabspace datafile '/dev/raw1' size 30712K REUSE
datafile '/dev/raw2' size 30712K REUSE

Note that the raw partitions are under /dev directory the raw1 and raw2 are
unix  raw partitions.

Expert Comment

ID: 2621501
The only reason for raw device is probably parallel server. Is this your case ?
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!


Author Comment

ID: 2622760
I tried to use what mshaikh's
written but it doesn't work.

The raw solaris raw partition is at
/dev/rdsk/c0t2d0s0. I've tried to change the owner to my oracle instance but it doesn't work:

# su - root
# cd /dev/rdsk
# chown oracle:oinstall c0t2d0s0
# ls -al c0t2d0s0
lrwxrwxrwx   1 root     root          45 Mar  8 19:11 c0t2d0s0 -> ../../devices/

But it seems that everyone could use it so I've used the create tablespace with
the reuse option.

>create tablespace raw01 datafile '/dev/rdsk/c0t2d0s0' size 256M REUSE;

The result is:

ORA-19504: failed to create file "/dev/rdsk/c0t2d0s0"
ORA-27041: unable to open file
SVR4 Error: 5: I/O error
Additional information: 1

I do not know what's going wrong. This method I already tried before but without the REUSE option and it doesn't work, too.

Thank's a lot for help.


Author Comment

ID: 2622834
The reason for trying to use raw partitions with solaris is a very poor performance compared with a LINUX server.

Until now I've tuned the server to run 4 times faster but this is not fast enough. Since I know that raw partitions are possibly very usefull for mass updates and random searches I want's to try a raw partition for better performance.

Another problem is, that the results differ between a few (3) seconds and 60 seconds so the average is very bad.

best regards

Expert Comment

ID: 2623376
What hapening is most probably the raw partition is not setup correctly at the OS level. You have to define a charcter special device to make this work. Please post you email here and I will send you an article on setting up raw partitions.

Accepted Solution

mshaikh earned 300 total points
ID: 2623423
Another thing I noticed is that you are using slice 0. This will not work. Try format the disk so that at least the first cylinder is associated with slice 0  to hold the label and volume table of contents.  Format subsequent slices to start after cylinder 1 and use these for your raw devices.  For example use:  
    /dev/rdsk/c0t2d0s1  not   /dev/rdsk/c0t2d0s0.  
Change the owner and group of the raw special device files created by the format  command to oracle/dba so you will have permissions to write to the device. Gennerally avoid  using slice 2 as this normally  whole disk.  

Author Comment

ID: 2623527
Hello mshaikh,

I think you will get the 100 Points...


best regards

Author Comment

ID: 2640424

the answer was not right for Solaris 7. $ ls -l c0t2d0s1
lrwxrwxrwx   1 root     root          45 Mär  8 19:11 c0t2d0s1 -> ../../devices/

But with Slice 1 it works even the owner is root:root or not!

Since I've tested performance for a lot of hours and round about two dozens of test I will give a short statement to those who do not like to use RAW partitions:

The results of my test is, that RAW partition are not as fast as partitions in the filesystem for all operations. But in the moment they seem to be better because the difference between the max and min values of my testprocedure is very small compared to the results with using filesystem based tablespaces.

The procedure is:
insert 32768 records from table into table;
insert 2*32768 from table into table;
Do some selects on the table.
Delete the first 10.000 using rownum.

The result for a user not using raw partitions are (in seconds)

Min        Avg        Max
2           7.65         37
5          16.05         31
5           5.05          6
32         35.00         50

The results for a user using as default tabplespace a raw patition and as temporary a filesystem based tablespace  are:

Min        Avg         Max
3           3.8            5
8           8.35           9
4           4.55           5
10         12.00          18

This seemed to be better as the file system based results because the AVG is round about two times faster!

Best regards

P.S. I think I should try to optimize the filesystem (buffers etc.) for better results!??

Compared with the performance of the default Oracle installation the above presented results are factor four to six times better!

Now I will make a load test with hundreds of user and I hope I can make this test with a LINUX system too. I believe that the E-450 Solaris combination will be better with dozens of users as the LINUX System..... but it seem's that the LINUX system is with only one user a really fast system (with a cheaper hardware).

Author Comment

ID: 2641189
Now I have transformed the complete database including logfile system, rollback, user, temporary into a raw system and it runs faster as the LINUX system with one user!


The results:

      Min.       Avg.       Max.
---------- ---------- ----------
insert into perftest (select * from perftest where rownum <32769);
         0         .9          2

insert into perftest (select * from perftest where rownum <65537);
         1       1.75          2

select count(*) into dummy from perftest, (select * from perftest where rownum <
         4       4.55          5

This is really a great result compared to the default oracle installation.

I think I won't try to optimize the filesystem based database. I think this will waste a lot of time and I do not have any time to do such a job.

best regards


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

595 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question