Oracle Disk Manager (ODM)
Oracle Disk Manager (ODM) is a
disk management interface defined by Oracle to enhance file
management and disk I/O performance. Implementation of an ODM
interface in a file system or a logical volume manager (LVM)
provides many benefits including simplified file administration,
improved file integrity, and reduced system overhead. It is
completely transparent from an application/DBA perspective. It is an
improvement over standard UNIX I/O.
ODM eliminates file descriptors,
which simplifies the operating system kernel configuration and saves
operating system resources. Other ODM capabilities include special
locking modes that prevent errors and the ability to pass usage
hints, such as Oracle file type information and I/O priorities for
third party application integration. It manages all I/O type files
on both system files and raw partitions with one system call, which
is not possible with native operating system calls.
Some of the visible advantages
* Files being
created/initialized are not visible until they are committed.
* Files must be identified or
opened with a common key and cannot be removed if they are in use.
* Works with regular files and
Oracle Database 10g
automatically takes advantage of the ODM interface when the
underlying file system or logical volume manager becomes ODM
enabled. A file is considered an ODM file if it is in a file system
that supports the ODM interface. ODM is also compatible with the new
Oracle Real Application Clusters.
Many of the file system/volume
manager vendors have incorporated the ODM interface. Well known
examples include, Veritas Database Edition (Advanced Cluster for
Oracle Database 10g RAC) and Polyserve Matrix Server for Oracle 10g
RAC. Several ODM semantics have been included in the DAFS v1.0
Protocol Specifications offered by Network Appliances.
Oracle Disk Manager (ODM) was Oracle 9i's innovative I/O and file management infrastructure. Oracle
Disk Manager is a very significant development in the way Oracle
manages and interfaces with I/O activity. The ODM interface is a set
of API calls that Oracle co-developed with Veritas for incorporating
underlying volume managers and file systems. Implementation of the
ODM interface in a file system or a logical volume manager provides
many benefits, including simplified file administration, improved
file integrity, and reduced system overhead.
ODM is completely transparent
from an application/DBA perspective. It is an improvement over
standard Unix I/O. The ODM interface allows the Oracle kernel to
allocate/release disk space, manage tablespaces, and read/write disk
blocks directly. Oracle encourages customers to use file system or
volume managers that are ODM compliant.
Oracle automatically takes
advantage of the ODM interface when the underlying file system or
logical volume manager becomes ODM-enabled. A file is considered an
ODM file if it is in a file system that supports an ODM interface.
ODM is also compatible with Oracle9i and 10g. Many of the leading
file system and volume manager providers have incorporated the ODM
interface into their products. Well known examples include Veritas
Database Edition (Advanced Cluster for Oracle) and Polyserve Matrix
Server. Several ODM semantics have been included in the DAFS v1.0
protocol specifications offered by Network Appliance Filers.
The following is an examination
of some of the ODM features:
* Without ODM, Oracle must
resort to many different sets of calls to manage the wide variety of
I/O types. For example, Oracle uses calls such as pwrite(), pread(),
async_write(), readv(), read(), write(), lio_listio(), and kaio().
With ODM, Oracle needs only the single call odm_io(). odm_io()
supports all Oracle file I/O types on ALL files (Raw or VxFS).
* Normally, asynchronous DBWR
page flushing requires two calls, one to issue the I/O and another
to poll for completed I/O. With ODM, gathered writes (DBWR) and LGWR
asynchronous writes occur with a single call to odm_io() without
regard for file type (VxFS or RAW) or number of target files.
Checking for completed I/O requests is conducted while issuing new
* ODM includes features that
enable more effective Oracle file creation. Without ODM, failed
attempts to add files to a database can result in an unused file
that must be cleaned up from outside Oracle. With ODM, files are no
longer created with traditional open() or create() calls.
* Files are created with
odm_create() and then initialized or filled. If the file creation is
a success, it then calls odm_commit(). If there is failure, Oracle
calls odm_abort(). The file will be completely cleaned up from
* With ODM, Oracle no longer
uses file descriptors. Instead, ODM identifiers are used. ODM
identifiers are shareable from process to process within the node.
Oracle caches ODM identifiers in the SGA at instance startup. ODM
identifier usage reduces kernel overhead.
Veritas and Oracle studies
indicate that the ODM files perform equal or better than the raw
partitions. ODM yields roughly 8% reduction in kernel mode CPU
utilization on certain platforms under certain workloads.
ASM (Automated Storage Management) and ODM
ASM divides files into 1 MB extents and
spreads the extents for each file evenly across all of the disks
in a disk group. ASM does not use a mathematical function to track
the placement of each extent; it uses pointers to record extent
location. This allows ASM to move individual extents of a file
when the disk group configuration changes without having to move
all extents to adhere to a formula based on the number of disks.
As said above, for normal datafiles, ASM uses
1 megabyte extents. For log files, that require low latency, ASM
provides fine-grained (128k) striping to allow larger I/Os to be
split and processed in parallel by multiple disks. The DBA decides
at creation time whether or not to use fine-grained striping.
File-type specific templates in the disk group determine the
Configuration of Automated
One of the most significant new
features in Oracle 10g release is the introduction of Automated
Storage Management (ASM). In order to use the ASM in a shared mode
for the use of RAC database, an ASM instance needs to be created for
each node of the RAC database involving the same disk devices as
input. Each ASM instance has either an SPFILE or PFILE type
parameter file. To use ASM in the RAC environment, select ASM
as the storage option when creating the database with the Database
Configuration Assistant (DBCA).