ITPUX技术网

交流 . 资讯 . 分享
Make progress together!
Oracle数据库DBA高级工程师培训视频
Oracle数据库培训-备份恢复-性能优化-集群容灾
mysql数据库视频教程

Oracle数据库_hp-ux平台Ioctl ASYNC_CONFIG error, errno =11报错分析

内容发布:风哥| 发布时间:2013-12-24 13:55:37
最近一用户的数据库出现以下报错:
Ioctl ASYNC_CONFIG error, errno = 11

环境如下:
HP-UX 11.31,ORACLE 10.2.0.5.7
经查询metalink,针对这个问题的说明如下:
Applies to:

Oracle Server - Enterprise Edition - Version: 9.2.0.1 and later   [Release: 9.2 and later ]
HP-UX PA-RISC (64-bit)
HP-UX PA-RISC (32-bit)
HP-UX Itanium
HP-UX Itanium (32-bit)
Symptoms

On HP Platforms with Asynchronous IO configured you are receiving the following error message:
Ioctl ASYNC_CONFIG error, errno = %s
NOTE:
%s is replaced with the actual error number
Cause

The general cause is an inapproriate configuration of system requirements, e.g. settings, resources, privileges.
Solution

The following sections refer to the actual error number in the message
Ioctl ASYNC_CONFIG error, errno = %s
errno = 1
Make sure the oracle software group owner, usually "dba", is granted MLOCK, RTSCHED and RTPRIO permissions:
(1) # /usr/sbin/setprivgrp dba MLOCK

(2) # vi /etc/privgroup
-- This should contain dba MLOCK RTSCHED RTPRIO

(3) # cat /etc/privgroup
dba MLOCK RTSCHED RTPRIO
NOTE:
On 8.1.7 and prior releases, please make sure to install patch PHKL_22126 or newer
Refer to
Note 133007.1 ALERT:HP-UX: 8.1.7 RDBMS will not start if the async disk driver is configured
errno = 7
The message may also appear in the format:
Ioctl ASYNC_ADDSEG error, errno = 7

Taking a Unix level tusc/truss/strace output shows the following:
pstat(PSTAT_PROC_VM, 0x9fffffffffff56b0, 104, 0, 129) ................................................................................. = 1
ioctl(8, ASYNC_ADDSEG, 0x9fffffffffff5690) ............................................................................................ ERR#7 E2BIG
open("/u01/app/diag/rdbms/orcl/ORCL/trace/ORCL_ora_1005.trc", O_WRONLY|O_APPEND|O_CREAT|0x800, 0664) ............ = 9

The SHMMAX kernel parameter is set too low, so the database requires a lots of shared memory segments (rather than just a few). The large number of shared memory segments exceeds an internal limit and causes the E2BIG (Unix error 7) to occur.

Solution is to increase SHMMAX kernel parameter and restart the database.
errno = 11
Error #11 (EAGAIN) can occur due to the fact that no more real memory is available for ioctl to lock. This typically occurs when there are many concurrent sessions

Solution is to increase the amount of physical memory (RAM)
NOTE:
Increasing virtual memory by using more Swap won't help
Disabling Asynchronous IO
For Oracle version 10.1 and prior, we will check if '/dev/async' is present and will try to use it for memory locking which is needed for async I/O for SGA memory pages via ioctl. Oracle makes use of '/dev/async' only if the HP async device driver is properly configured for read and write. This is irrespective of whether the DISK_ASYNCH_IO parameter is set to TRUE.

So Oracle will use async I/O regardless of the value of init.ora settings
disk_asynch_io
filesystemio_options


Prior to 10.2, to inactivate ASYNCH_IO with Oracle, the workaround is to:
chown bin:bin /dev/async
chmod 660 /dev/async


As of 10.2, asynchronous I/O can be disabled using the designated parameters
disk_asynch_io=FALSE
--AND/OR--
filesystemio_options=none


上一篇:关于Oracle数据库:Warning The SCN headroom for this database is only N days
下一篇:在Oracle DataGuard环境中使用Broker-自动Fast Start Failove
189070296,150201289

专业提供Oracle数据库服务、主机、存储、备份、中间件等相关技术支持服务,QQ号:176140749
关注ITPUX技术网微信公众号itpux_com  ,了解本站最新技术资料的分享.

欢迎加QQ群,提供超多高质量Oracle/Unix/Linux技术文档与视频教程的下载。

Oracle/MySQL/Linux群4-5:189070296  150201289  
Oracle/MySQL/Linux群6-8:244609803   522261684   522651731
备注:请勿重复加群,另请注明 from itpux

加群分享视频教程部分如下:

1、公开课视频:Oracle/MySQL数据库工程师职业发展前景讲解(免费)
http://edu.51cto.com/course/7015.html

2、51CTO学院Oracle数据库高级工程师培训(高薪就业.课程介绍)
http://edu.51cto.com/px/train/131?xiaotu

3、Oracle DBA数据库高级工程师培训视频课程1.1(系列78套+七大阶段+上千案例)
套餐视频地址: http://edu.51cto.com/topic/1121.html

4、MySQL数据库(终身门徒)套餐:http://edu.51cto.com/sd/1e1a6

回复

使用道具 举报

内容发布:风哥| 发布时间:2015-10-9 09:40:38

如果报错为:

Ioctl ASYNC_CONFIG error, errno = 1

其实这个问题是由于开异步IO的时候,没有给系统的oracle用户MLOCK权限,当主机已经开启的异步IO的参数,但是没给MLOCK权限,就会报这个错。

我们在HPUX上开异步IO正确做法应该为:

前提:hpux上使用裸设备可以打开异步IO来提高IO性能,如果使用文件系统,就不能使用异步IO,但是可以通过设置多个DBWR进程来提高IO

1、Hp-ux使用Aio的补丁要求
   a、Hp-ux 11.00的补丁要求为:
      PHKL_22126: s700_800 VM,async,hyperfabric
   b、HP-UX 11i的补丁要求为:
      PHKL_25212 vm preemption point, mlock/async_io
      PHKL_25506 asyncio driver patch


2. 创建aio字符设备
   % /sbin/mknod /dev/async c 101 0x0
   % chown oracle:dba /dev/async
   % chmod 660 /dev/async


3. 用sam调整内核参数
     -> Kernel Configuration
        -> Drivers
           -> 选择'asyncdsk'
           -> Actions>Add Driver to Kernel. (此时pending state由out变为in状态)

     -> Kernel Configuration
        -> Configurable Parameters
           -> max_async_ports
              设置为初始化文件中的'processes'值+oracle后台进程数 (根据v$bgprocess,单实例后台进程数最多为78个)

4. 用sam设置aio_max_ops
     -> Kernel Configuration
        -> Configurable Parameters
           -> aio_max_ops
           -> 可设置为默认值2048
            
5. 设置oracle用户必须有MLOCK权限。
   a. 设定dba组的MLOCK的权限
      roolt#setprivgrp dba MLOCK

    b. 避免重启后失效,需要设置:
       vi /etc/privgroup 添加如下行:
       dba MLOCK
       如果没有设置MLOCK权限,在$ORACLE_HOME/rdbms/log/中有大量含Ioctl ASYNC_CONFIG error, errno = 1的trace文件。

6. 其他设置。在hpux中,大部分的进程会遵循一个共享时间表的策略(time-sharing scheduling policy),在业务的忙时,如果根据共享时间表的老化策略,会重新安排oracle进程的优先级,造成latch free,从而影响oracle的性能。所以,我们应该设置SCHED_NOAGE参数,使得oracle进程不会具有执行的优先级。
    a. root#setprivgrp dba RTSCHED RTPRIO
      
    b. 同时为了重启后参数失效,在/etc/privgroup文件中添加:
       dba RTSCHED RTPRIO
       结合上面的MLOCK,/etc/privgroup文件中应该为:
       dba RTSCHED RTPRIO MLOCK

    c. 数据库中:alter system set hpux_sched_noage=178 scope=spfile;


         尽管做到这步,还是遗留了一个问题,目前数据库经常会出现资源不够的警告,遍寻了Oracle的资料没有找到解决的办法,Oracle也没有给出具体的解决方法,还好不影响使用;


189070296,150201289

专业提供Oracle数据库服务、主机、存储、备份、中间件等相关技术支持服务,QQ号:176140749
关注ITPUX技术网微信公众号itpux_com  ,了解本站最新技术资料的分享.

欢迎加QQ群,提供超多高质量Oracle/Unix/Linux技术文档与视频教程的下载。

Oracle/MySQL/Linux群4-5:189070296  150201289  
Oracle/MySQL/Linux群6-8:244609803   522261684   522651731
备注:请勿重复加群,另请注明 from itpux

加群分享视频教程部分如下:

1、公开课视频:Oracle/MySQL数据库工程师职业发展前景讲解(免费)
http://edu.51cto.com/course/7015.html

2、51CTO学院Oracle数据库高级工程师培训(高薪就业.课程介绍)
http://edu.51cto.com/px/train/131?xiaotu

3、Oracle DBA数据库高级工程师培训视频课程1.1(系列78套+七大阶段+上千案例)
套餐视频地址: http://edu.51cto.com/topic/1121.html

4、MySQL数据库(终身门徒)套餐:http://edu.51cto.com/sd/1e1a6

回复 支持 反对

使用道具 举报

内容发布:风哥| 发布时间:2015-10-9 09:37:35
If /dev/async is present and correctly configured, Oracle (for HP only) will use it for memory locking which is needed for async i/o for SGA memory pages via ioctl.

Oracle (for HP only) opens /dev/async successfully only if the /dev/async HP-UX device driver is properly configured for read and write.

This is irrespective of whether the DISK_ASYNCH_IO parameter is set to TRUE.

Problem is Oracle (for HP only) still uses async I/O regardless of the value of init settings
(disk_asynch_io=FALSE and filesystemio_options=none).
The parameter filesystemio_options=none doesn't work.

From the 9.2 until 10.1 version, to inactivate ASYNCH_IO with Oracle, the workaround is to:

chown bin:bin /dev/async
chmod 660 /dev/async

Note: This may impact other applications that wish to use asynch I/O.
It is recommended to shutdown Oracle database before inactivating asynch I/O.

Grant dba group the MLOCK privilege to avoid the Ioctl ASYNC_CONFIG trace file errors:

(1) # /usr/sbin/setprivgrp dba MLOCK
(2) # vi /etc/privgroup
-- This should contain dba MLOCK RTSCHED RTPRIO
(3) # cat /etc/privgroup
dba MLOCK RTSCHED RTPRIO

Since the Oracle 10.2 version, the problem is resolved as these settings stop the tracing:
disk_asynch_io=FALSE
filesystemio_options=none
189070296,150201289

专业提供Oracle数据库服务、主机、存储、备份、中间件等相关技术支持服务,QQ号:176140749
关注ITPUX技术网微信公众号itpux_com  ,了解本站最新技术资料的分享.

欢迎加QQ群,提供超多高质量Oracle/Unix/Linux技术文档与视频教程的下载。

Oracle/MySQL/Linux群4-5:189070296  150201289  
Oracle/MySQL/Linux群6-8:244609803   522261684   522651731
备注:请勿重复加群,另请注明 from itpux

加群分享视频教程部分如下:

1、公开课视频:Oracle/MySQL数据库工程师职业发展前景讲解(免费)
http://edu.51cto.com/course/7015.html

2、51CTO学院Oracle数据库高级工程师培训(高薪就业.课程介绍)
http://edu.51cto.com/px/train/131?xiaotu

3、Oracle DBA数据库高级工程师培训视频课程1.1(系列78套+七大阶段+上千案例)
套餐视频地址: http://edu.51cto.com/topic/1121.html

4、MySQL数据库(终身门徒)套餐:http://edu.51cto.com/sd/1e1a6

回复 支持 反对

使用道具 举报

1框架
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表