General
cancel
Showing results for 
Search instead for 
Did you mean: 

Why oracle recommand using file system to store data?

SOLVED
Go to solution
Eric LO
Occasional Contributor

Why oracle recommand using file system to store data?

Hi all expert,
I'm a junior dba at oracle. Do anyone answer me following questions?
1, Why oracle recommand using file system to store data? According as I know, most of oracle database store data in file system rather raw device.
2, Why oracle using raw device to store data in OPS environment? Can I implement OPS using file system?

We know raw device provide better i/o performance, informix, sybase using raw device to store data, but oracle doesn't recommand.

thanks ....
10 REPLIES
twang
Honored Contributor

Re: Why oracle recommand using file system to store data?

1. File System Characteristics
When choosing a file system, performance is not the most important point. A fast file system is not usable, if there is a risk that data is corrupted, lost or compromised. Oracle database does not support files on file system that do not have a write-through-cache capability. The file system must acknowledge the write operations.
For example Standard NFS uses the UDP protocol, which does not include an acknowledgment. One vendor that supplies a supported network file system is Network Appliance using a modified NFS protocol. There are security requirements as well. Oracle Server and the database files require special file permissions, which are not available on certain file system (such as VFAT). If these file permission are not set correctly, the Oracle server does not function properly. Data files should be accessible only for the database owner. The database server should control all other file and data access. Journaling is a popular characteristic. The major benefit is that the changes to the file system are recorded in a journal file. If the server crashes or shuts down without synchronizing the disk, the journal file can be applied to the file system. Restore such file system integrity is very fast. This effect can be seen on boot up. The fsck command checks journaled file system more quickly than nonjournaled file system.
2.
Some implementations of Oracle Parallel Server require that all Data files and control files are placed onto raw devices so that the different nodes of the parallel environment are all able to see and access the files.
Khalid A. Al-Tayaran
Valued Contributor

Re: Why oracle recommand using file system to store data?

Michael Steele_2
Honored Contributor
Solution

Re: Why oracle recommand using file system to store data?

1A- I/O performance improves with raw file systems but conversely, tuning and administrating the Oracle database becomes more difficult. For this reason file systems are recommend for the smaller customers with small databases while raw is for the large databases.

1B- File systems and Oracle aren't going away. A few months ago Oracle announced the OCFS, or LCFS, which is recommended with 9i RAC on LINUX. That's Oracle/LINUX Cluster File System. Oracle is recommending it for tuning and database management on LINUX servers.

2A - Given 1A large databases need raw file systems.

In my opinion Oracle is jumping into and supporting LINUX in a big way in the small database market. I personally know Oracle is recommending LINUX as their UNIX O/S of choice for I've met with HP clients that visit Oracle in Redwood City who are told this explicitly. These current HP clients are being told to save money and buy LINUX 'disposable' servers because of their low cost.

I think this all underscores the changes that the enterprise server market is going through and in particular Oracle's push for more control of this market. Its even conceivable that Oracle will attempt to combine their database with the O/S at some point in the future. This has been tried by other databases before, i.e., the PICK database.

The distinction between database and O/S is control of physical devices and by creating their own LCFS Oracle breeches into control of physical devices.

2B) Given this, as HP is attempting to cut into the Windows and Solaris markets I'm concluding that Oracle is attempting to cut into HP's market.

Because they're all worried about future sales which are determined by controlling the marketplace.
Support Fatherhood - Stop Family Law
Bill Hassell
Honored Contributor

Re: Why oracle recommand using file system to store data?

Several customers have benchmarked raw versus filesystem Oracle installations and the differences were not significant. This of course assumes a current version of HP-UX, reasonably well-patched (11.0 minimum). So performance is not the primary criteria. IMHO, raw database designs are a sysadmin nightmare to manage. Because there are no indicators that a raw partition is in use by some application, the space is not marked as used and many a new sysadmin has run newfs on top of a working database, thereby destroying it.

You can add comments to /etc/fstab in hopes that a sysadmin will read it but tools like SAM and newfs as well as the LVM commands have no safety checks except for HFS and VxFS filesystem identifiers. Informix and Sybase have historically used raw devices and have optimized their code for that design. Oracle can do a very good job in managing filesystem performance as long as the SGA is large enough to take advantage of RAM-based transactions such as full row insertions and temp sort areas in memory. This assumes that the sysadmin separates the installation directories, the database mountpoints and the index, rollback and archive logs onto physically separate disk devices and I/O channels.


Bill Hassell, sysadmin
Yogeeraj_1
Honored Contributor

Re: Why oracle recommand using file system to store data?

hi,

To add to the above great replies,

From what i have read, on a UNIX OS, the benefit of raw over cooked are very minimal and mostly in special cases. If you are not comfortable with raw, you can consider staying with a cooked file system. Many OS's/volume managers have options to mount their cooked file systems without buffering.

You should also have a look at the the excellent writeup by one the best Oracle technologists.
[file is attached]

best regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: Why oracle recommand using file system to store data?

oops! attachment..
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Steven E. Protter
Exalted Contributor

Re: Why oracle recommand using file system to store data?

You should be aware that Oracle Database Server 9.0.2 aka 9i Release 2 only supports raw devices instead of filesystems.

Its going to make my transition from 8 to 9 a large pain in the you know what.

I am used to raw disk because I'm a dba with Software AG Adabas. I was actually shocked when we went to Oracle and they used filesystems, but got used to it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Vermeulen Peter
Frequent Advisor

Re: Why oracle recommand using file system to store data?

SEP, I'm not following you since we have a 9i release 2 database without raw devices. So in my opinion what you said is not true.
twang
Honored Contributor

Re: Why oracle recommand using file system to store data?

Raw devices are required with Oracle OPS mainly because of the disk sharing that has to happen at the OS level. However, that doesn't mean you can use shared filesystems with OPS, you still need raw devices.
Perhaps others can offer their advice on your other questions.

Outside of OPS, the only benefit to using raw devices is when the database is clearly I/O-bound. If I/O is not a bottleneck, then using raw devices will not improve performance.
Therefore in my option, the ONLY reason to use raw devices in non-OPS environments is the small benefit of bypassing the JFS cache on reads. Again, I/O contention is seldom the bottleneck for a database, and hence, most database see no benefit from using raw devices.

Hope this helps . . .

Andy Beal
Frequent Advisor

Re: Why oracle recommand using file system to store data?

9.2.0.1 - The shipping release called 9iR2 will use filesystems. If you purchase online JFS from HP you have options to disable the Unix buffer cache on certain filesystems. As far as reasons not to go with RAW devices, the biggie has been stated, inevitably someone will not understand it in the future and possibly ruin your db. If your trying to run 24x7, you'll never really be able to do anything with the dbf files anyway, except maybe look at em.