当前位置: 首页 > 图文教程 > 数据库 > Oracle > Raw Devices and Oracle - 20 Common Questions and Answers

Oracle
Oracle数据库处理时间的技巧
Oracle数据库重复数据删除的三种情况
Oracle和SQL Server分析挖掘函数
Oracle数据库备份与恢复(6):LogMiner
Oracle数据库备份与恢复(5):Flashback
Oracle数据库备份与恢复(4):RMAN(备份与恢复管理器)
Oracle数据库备份与恢复(3):OS备份和用户管理
Oracle数据库备份与恢复(2):SQL*Loader
Oracle数据库备份与恢复(1):exp和imp
Oracle数据库文件恢复与备份思路
Oracle中利用EXP/IMP工具实现数据迁移
Oracle中Exp/Imp大量数据处理
ORACLE的外连接
sqlserver与oracle的区别
SQLite数据库最适合做网站内容管理系统(CMS)
网站主机教程(7):网站主机的数据库技术
Oracle10G认证考试自2008年12月1日变化
什么是Oracle?oracle认证种类介绍
MSSQL数据库镜像在Oracle中是如何实现的
Oracle数据库维护中的前瞻性

Raw Devices and Oracle - 20 Common Questions and Answers


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-31   浏览: 42 ::
收藏到网摘: n/a

1. What is a raw device?

   A raw device, also known as a raw partition, is a disk partition that is

   not mounted and written to via the UNIX filesystem, but is accessed via

   a character-special device driver. It is up to the application how the

   data is written since there is no filesystem to do this on the

   applications behalf.

2. How can a raw device be recognised?

   In the /dev directory, there are essentially two type of files: block

   special and character special. Block special files are used when data is

   transferred to or from a device in fixed size amounts (blocks), whereas 

   character special files are used when data is transferred in varying 

   size amounts. Raw devices use character special files; a long listing

   of the /dev directory shows them with a c at the leftmost position of

   the permissions field, e.g.

   crw-rw-rw-   1 root     system    15,  0 Mar 12 09:45 rfd0

   In addition, character special files usually have names beginning with 

   an r, as shown in the above example. Some devices, principally disks,

   have both a block special device and a character special device

   associated with them; for the floppy diskette shown above, there is also

   a device

   brw-rw-rw-   1 root     system    15,  0 Apr 16 15:42 /dev/fd0

   So the presence of a c in a device does NOT necessarily mean this is a

   raw device suitable for use by Oracle (or another application).

   Generally, a raw device needs to be created and set aside for Oracle (or

   whatever application is going to use it) when the UNIX system is set

   up - therefore, this needs to be done with close cooperation between

   the DBA and UNIX system administrator.

   Once a raw device is in use by Oracle, it must be owned by the oracle

   account, and may be identified in this way.

3. What are the benefits of raw devices?

   There can be a performance benefit from using raw devices, since a write

   to a raw device bypasses the UNIX buffer cache, the data is transferred

   directly from the Oracle buffer cache to the disk. This is not guaranteed,

   though. If there is no I/O bottleneck, raw devices will not help. The

   performance benefit if there is a bottleneck can vary between a few

   percent to something like 40%. Note that the overall amount of I/O is

   not reduced; it is just done more efficiently.

   Another lesser benefit of raw devices is that no filesystem overhead

   is incurred in terms of inode allocation and maintenance or free block

   allocation and maintenance. 

4. How can I tell if I will benefit from using raw devices?

   There are two distinct parts to this: first, the Oracle database and

   application should be examined and tuned as necessary, using one or both

   of the following:

   -UTLBstat and UTLestat utilities (in $ORACLE_HOME/rdbms/admin)

   There are several strategies for improving performance with an existing