Introduction
The concept of the Preferred Read is not a new idea, but is now implemented in Oracle’s ASM volume
management in Oracle 11g.The concept is to read from the storage that can present the needed data at a lower
latency. Initially, this was designed for WAN or site-specific storage in order to avoid higher-latency site
connections. By restricting data reads to the local storage, the application would be able to service requests at
nominal read speeds while writes were the only communication needed to traverse the long haul site link. This is
a feature that is available to most Operating Systems with their included volume manager and as a feature to
Symantec/Veritas through the title Preferred Plex. This paper will discuss the merits of using PRG technology with Oracle ASM
eg:
SELECT name, failgroup FROM v$asm_disk;
NAME FAILGROUP
------------------------------ ------------------------------
DATA_0000 DATA_0000
DATA_0001 DATA_0001
DATA_0002 DATA_0002
3 rows selected.
SQL> ALTER SYSTEM SET ASM_PREFERRED_READ_FAILURE_GROUPS = 'data.data_0000', 'data.data_0001', 'data.data_0002';
The concept of the Preferred Read is not a new idea, but is now implemented in Oracle’s ASM volume
management in Oracle 11g.The concept is to read from the storage that can present the needed data at a lower
latency. Initially, this was designed for WAN or site-specific storage in order to avoid higher-latency site
connections. By restricting data reads to the local storage, the application would be able to service requests at
nominal read speeds while writes were the only communication needed to traverse the long haul site link. This is
a feature that is available to most Operating Systems with their included volume manager and as a feature to
Symantec/Veritas through the title Preferred Plex. This paper will discuss the merits of using PRG technology with Oracle ASM
eg:
SELECT name, failgroup FROM v$asm_disk;
NAME FAILGROUP
------------------------------ ------------------------------
DATA_0000 DATA_0000
DATA_0001 DATA_0001
DATA_0002 DATA_0002
3 rows selected.
SQL> ALTER SYSTEM SET ASM_PREFERRED_READ_FAILURE_GROUPS = 'data.data_0000', 'data.data_0001', 'data.data_0002';
Allocating ASM Extent Sets
With ASM redundancy, the first file extent allocated is chosen as primary extent, and
the mirrored extent is called the secondary extent. In the case of high redundancy,
there will two secondary extents. This logical grouping of primary and secondary
extents is called an extent set. When a block is read from disk, it is always read from
the primary extent, unless the primary extent cannot be read. In Oracle Database
11g, the preferred read feature allows the database to read the secondary extent first
instead of reading the primary extent. This is especially important for RAC Extended
Cluster implementations.
As stated earlier, ASM in
Oracle Database 10g always reads the primary copy of a mirrored extent
set. Thus, a read for a specific block may require a read of the primary
extent at the remote site across the interconnect. Accessing a remote
disk through a metropolitan area or wide area storage network is
substantially slower than accessing a local disk. This can tax the
interconnect as well as result in high I/ O and network latency. To
assuage this, Oracle Database 11g provides a feature called preferred
reads. This feature enables ASM administrators to specify a failure
group for local reads–– that is, provide preferred reads. In a normal or
high-redundancy diskgroup, when a secondary extent is on a preferred
disk and the primary extent is remote, the secondary extent is read
rather than the primary one on that node. This feature is especially
beneficial for extended cluster configurations.
To configure preferred read failure groups the disk group
compatibility attributes must be set to 11.1 or higher. Once the
compatibility options are correct, the
ASM_PREFERRED_READ_FAILURE_GROUPS=DATA.SITEB On second instance
ASM_PREFERRED_READ_FAILURE_GROUPS
parameter is set to the preferred failure groups for each node.SQL> select compatibility, database_compatibility 2 from v$asm_diskgroup 3 where name = 'DG1' 4 /
(ASM_PREFERRED_READ_FAILURE_GROUPS=DATA.SITEA On first instance
ASM_PREFERRED_READ_FAILURE_GROUPS=DATA.SITEB On second instance
)
No comments:
Post a Comment