ORACLEAUTOMATICSTORAGEMANAGEMENT翻译-第二章ASMinstance(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)

(0)
上一篇 2022年3月22日
下一篇 2022年3月22日

相关推荐