Solved

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

Posted on 2000-03-15
10
2,173 Views
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
Gerald
0
Comment
Question by:Gerald02
10 Comments
 
LVL 3

Expert Comment

by:mgokman
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.
0
 
LVL 6

Expert Comment

by:mshaikh
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.
0
 
LVL 2

Expert Comment

by:cadabra
ID: 2621501
The only reason for raw device is probably parallel server. Is this your case ?
0
 

Author Comment

by:Gerald02
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/
pci@1f,4000/scsi@3/sd@2,0:a,raw

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.




0
 

Author Comment

by:Gerald02
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
Gerald
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 6

Expert Comment

by:mshaikh
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.
0
 
LVL 6

Accepted Solution

by:
mshaikh earned 100 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.  
0
 

Author Comment

by:Gerald02
ID: 2623527
Hello mshaikh,

I think you will get the 100 Points...


e-mail. groehrbein@bigfoot.com

best regards
Gerald
0
 

Author Comment

by:Gerald02
ID: 2640424
Hello,

the answer was not right for Solaris 7. $ ls -l c0t2d0s1
lrwxrwxrwx   1 root     root          45 Mär  8 19:11 c0t2d0s1 -> ../../devices/
pci@1f,4000/scsi@3/sd@2,0:b,raw

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
Gerald


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).
0
 

Author Comment

by:Gerald02
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!

Hurrahhhhhhhhhhhhhhhh!

The results:

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

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


select count(*) into dummy from perftest, (select * from perftest where rownum <
 50);
         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
Gerald



0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
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 Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now