ORACLE AUTOMATIC STORAGE MANAGEMENT翻译-第二章 ASM instance(1)

第二章  ASM INSTANCE

ASM的类型,例如可以:

10g后ORACLE instance 类型增加了一个ASM种类。参数INSTANCE_TYPE=ASM进行设置。

ASM实例启动命令:
startup nomount启动实例和后台进程。但没有挂载磁盘组
mount以后。实例会启动參数文件里ASM_DISKGROUPS指定的磁盘组,假设參数为空就会触发ORA-15110报错信息。
ASM 11G以后为mount命令引入了restricted启动參数。以排他方式启动ASM_DISKGROUPS指定的磁盘组,
限制RDBMS訪问磁盘组。restricted命令在维护磁盘组或rebalance时特别实用。
注意:resticted能够以磁盘组级别挂载磁盘组。而不是实例级别。优点是提供了细粒度的限制。
如:
alter diskgroup data mount restricted;
select name,state from v$asm_diskgroup;
NAME                               STATE
----------------------            -------------------
DATA                                RESTRICTED


后台进程:
ASM后台进程都是以asm_开头的,就像rdbms是以ora_开头一样。
11g asm 后台进程介绍
ARBx These are the slave processes that do the rebalance activity (where x

is a number).

CKPTThe CKPTprocess manages cross-instance calls (in RAC).

DBWR This process manages the SGA buffer cache in the ASM instance.

DBW Rwrites out dirty buffers (changed metadata buffers) from the ASM

buffer cache to disk.

GMON This process is responsible for managing the disk-level activities

(drop/offline) and advancing diskgroup compatibility.

 KATE The Konductor or ASM Temporary Errands (KATE) process is used

to process disks online. This process runs in the ASM instance and is started

only when an offlined disk is onlined.

LGWRThe LGWRprocess maintains the ASM Active Change Directory

(ACD) buffers from the ASM instance and flushes ACD change records to

disk.

MARK The Mark Allocation Unit (AU) for Resync Koordinator (MARK)

process coordinates the updates to the Staleness Registry when the disks go

offline. This process runs in the RDBMS instance and is started only when

disks go offline in ASM redundancy diskgroups.

PINGThe PINGprocess measures network latency and has the same

functionality in RDBMS instances.

PMON This manages processes and process death in the ASM instance.

PSP0 This process spawner process is responsible for creating and

managing other Oracle processes.

PZ9x These processes are parallel slave processes (where xis a number),

used in fetching data on behalf of GV$queries.

RBAL This opens all device files as part of discovery and coordinates the

rebalance activity.

SMON This process is the system monitor and also acts as a liaison to the

Cluster Synchronization Services (CSS) process (in Oracle Clusterware) for

node monitoring.

VKTM This process is used to maintain the fast timer and has the same

functionality in the RDBMS instances.


ASM SGA和參数设置
ASM启动仅仅须要非常少的參数。參数文件能够是pfile也能够是spfile
*.instance_type=asm

*.asm_diskgroups=DATA,FLASH

*.processes=100

**** Note that asm_diskstring is site-specific and platform specific

*.asm_diskstring='/dev/rdsk/c3t19d*s4'             --注意假设手动加入asm 磁盘组别忘记更新这个參数不然重新启动后缺少的盘组无法自己主动带起来

*.remote_login_passwordfile='SHARED'

******

**For 11g use only the diagnostics directory.

*.diagnostic_dest='/opt/app/admin/+ASM/diag'            --11g的diagnostic_dest代替了10g的bdump,cdump,udump显然简单介绍多了

*******

**For 10g use the standard dump locations

*.background_dump_dest='/opt/app/admin/+ASM/bdump'

*.core_dump_dest='/opt/app/admin/+ASM/cdump'

*.user_dump_dest='/opt/app/admin/+ASM/udump'

*******

BACKGROUND_DUMP_DEST,CORE_DUMP_DEST, and USER_DUMP_DEST这三个參数在11g中已经弃用了。ASM实例中不要配置这三个參数了。

假设diagnostic_dest没有配置,默认位置为$ORACLE_BASE/diag

比如以下的文件夹结构会被创建:
$ORACLE_BASE/diag/<INSTANCE type>/<DB_UNIQUE_NAME>/<ORACLE_SID>
SQL> SELECT NAME, VALUE FROM V$DIAG_INFO

NAME VALUE

---------- ---------------

Diag Enabled TRUE

ADR Base /u01/app/oracle

ADR Home /u01/app/oracle /diag/asm/+asm/+ASM1

Diag Trace /u01/app/oracle/diag/asm/+asm/+ASM1/trace

Diag Alert /u01/app/oracle/diag/asm/+asm/+ASM1/alert

Diag Incident /u01/app/oracle /diag/asm/+asm/+ASM1/incident

Diag Cdump /u01/app/oracle/diag/asm/+asm/+ASM1/cdump

Health Monitor /u01/app/oracle/diag/asm/+asm/+ASM1/hm

Default Trace File 
11g中全部的诊断信息都能够使用adrci来管理。

最佳实践ASM參数


11g中ASM能够使用AMM特性在init.ora中配置MEMORY_TARGET和MEMORY_MAX_TARGET,与rdbms一样这两个參数能够实现内存自己主动管理。

然而,因为asm内存使用率很平稳。ORACLE最佳实践是不设置这两个參数,默认使用256M,这个配置符合大多数的环境。

译者注:在生产环境中ASM使用默认參数可能会引发ASM实例级别的4031错误,依据MOS文档建议内存至少分配1G,这与最佳实践又是矛盾的,

可见ORACLE的最佳实践不一定靠谱。但可作为參考了。

假设有须要手工调整内存,仅仅须要改动MEMORY_TARGET就能够了
alter system set memeory_target=300M;

当然假设你要禁用AMM能够把MEMROY_target设置为0。可是shared_pool,large_pool,db_cache_size这三个參数就须要配置。
DB_CACHE_SIZE This value determines the size of the buffer cache, which

is used to cache ASM metadata blocks. The DB_CACHE_SIZEis based on

a metadata block size of 4K. This block size is the buffer page size of the

cached metadata and has no bearing or impact on the database block size.

db_cache_size用于缓存metadata block,它是基于metadata block size 及4K。

不受db block size的影响。

SHARED_POOL This is used for standard memory usage (control structures

and so on) to manage the instance. The value is also used to store open file

extent maps.

shared_pool用于存储管理实例用的数据结构。假设控制结构等。同一时候也存储

extent maps等。

LARGE_POOLThe LARGE_POOLvalue is used for large page allocations.

PROCESSES This ASM init.ora parameter limits the number of processes

that can start in ASM instance. You may need to modify this parameter from

its default setting for Oracle Database 10gASM instances. The following

recommendation pertains to Oracle Database 10.1.0.3 through 10.2.xand

will work for RAC and non-RAC systems:

Processes = 25 + (10 + [max number of concurrent database file

creations, and file extend operations possible
])*n

PROCESSES配置能够基于如上公式计算。

公式说明:

where n is the number of RDBMS instance (ASM clients) connecting to ASM

The source of concurrent file creations can be any of the following:

Several concurrent CREATE TABLESPACEcommands

Creation of a partitioned table with several tablespace creations

RMAN backup channels

Concurrent archive log file creations

max number of concurrent database file creations:
能够是create tablespace并发数。创建分区表涉及的表空间数,rman备份分配的通道数,并发创建归档数


10g中,ASM没有AMM特性,一般配置例如以下:
SHARED_POOL_SIZE: 128MB

LARGE_POOL: 12MB

DB_CACHE_SIZE: 64MB

我们能够像管理数据库一样使用SQLPLUS管理ASM
如:
SQL>SHOW SGA
可是要注意大多数rdbms的參数不适用与ASM实例。如controlfile_files
当你尝试设置这个參数时就会收到报错
ORA-15021: parameter "control_files" is not valid in asm instance

注意參数文件參数:
SQL> SHOW PARAMETER CONTROL

NAME TYPE VALUE

------------------------------ ----------- ------------------------------control_files string /opt/oracle/app/product/10gr2/

dbs/cntrl+ASM.dbf

可是到操作系统中你却找不到这个參数,这个參数时内部默认值对于
ASM是没有实际意义的

两个存储在$ORACLE_HOME/dbs下的文件:
ab_<ASM SID>.dat 这个文件在asm实力启动时生成。同一时候数据库实例连接ASM实例
时获取环境信息,假设这个文件被删除了RDBMS就无法和ASM实例通讯了。

hc_<SID>.dat EM使用这个文件进行实例的监控检查监控。

假设这个文件被移除,健康

检查结果就会是错误的。

ASM .dat 文件不会对ASM造成性能方面的影响,文件里存放的仅仅是连接信息,须要的时候
与ASM实例通信。
注意,有时可能须要设置隐含參数。来协助问题诊断,如:
诊断參数_disable_instance_parms_check(这个參数不须要再11g)


-----------------------------------------------------------------------------------------------------------------

本站注明原创和翻译的均为原创文章。文章同意转载。但必须以链接方式注明源地址,

否则追究法律责任!文章中难免有疏漏欢迎网友批评指正。

QQ:       173386747



Email:    hailong.sun1982@gmail.com



Blog:     http://blog.csdn.net/card_2005




上一篇:Js 跨域CORS报错 Response for preflight has invalid HTTP status code 405


下一篇:Centos7 防火墙关闭和启用iptables防火墙