[原创]  到11g TNS监听器的连接速度很慢_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 5792 | 回复: 0   主题: [原创]  到11g TNS监听器的连接速度很慢        下一篇 
大红薯
注册用户
等级:少校
经验:1440
发帖:159
精华:0
注册:2011-7-21
状态:离线
发送短消息息给大红薯 加好友    发送短消息息给大红薯 发消息
发表于: IP:您无权察看 2011-8-22 10:06:35 | [全部帖] [楼主帖] 楼主

到11g TNS监听器的连接速度很慢

适用于:

Oracle Net Services - Version: 11.1.0.6.0 and later [Release: 11.1 and later ]
Information in this document applies to any platform.
Effects versions 11.1.0.6 to 11.2.0.2


症状
连接到11g TNS监听器很慢,可以花费从10秒到2分钟。
在连接握手,Oracle网络客户端跟踪显示,1st之间的延迟连接数据包,并重新发送nttrd功能数据包。

09:59:57.552261 : nttrd:entry
10:00:37.578836 : nttrd:socket 11 had bytes read=8
10:00:37.578894 : nttrd:exit
10:00:37.578918 : nsprecv:8 bytes from transport
10:00:37.578943 : nsprecv:tlen=8, plen=8, type=11
10:00:37.578966 : nsprecv:packet dump
10:00:37.578987 : nsprecv:00 08 00 00 0B 00 00 00 |........|


Oracle网络监听器跟踪显示周围的fork过程中的延迟。

09:59:57.575893 : ntpwr:exit
09:59:57.575911 : ntprd:entry
10:00:37.578078 : ntprd:exit
10:00:37.578181 : ntprd:entry
10:00:37.578482 : ntprd:exit
10:00:37.578501 : nsbequeath:NSE=12586
10:00:37.578520 : nsbequeath:error reading REDIR/NSE msg


请注意,NSE=12586仅仅是一个完整的代码,而不是一个错误。
明显的延迟,也可能在监听跟踪报道的getaddrinfo()函数:

2009-12-09 13:52:19.835738 : snlinGetAddrInfo:entry
2009-12-09 13:52:29.836309 : snlinGetAddrInfo:getaddrinfo() failed with error -2
Notice in this example a 10 second delay in the getaddrinfo() function.
Strace / Truss of the TNS listener process on connection:
strace -frT -o -p
Shows process ID of the fork as sntpcall:result string is NTP0 20742
09:59:57.575582 : sntpcall:result string is NTP0 20742
09:59:57.575610 : sntpcall:exit
09:59:57.575626 : ntpctl:exit
09:59:57.575664 : nttaddr2bnd:entry
09:59:57.575683 : snlinGetNameInfo:entry
09:59:57.575700 : snlinGetNameInfo:exit
09:59:57.575717 : nttaddr2bnd:Resolved to 192.168.132.6
09:59:57.575738 : nttaddr2bnd:exit
09:59:57.575761 : nsbequeath_stg2:doing connect handshake...
09:59:57.575779 : nsbequeath:doing connect handshake...
09:59:57.575796 : ntpwr:entry
09:59:57.575820 : ntpwr:exit
09:59:57.575838 : ntpwr:entry
09:59:57.575857 : ntpwr:exit
09:59:57.575874 : ntpwr:entry
09:59:57.575893 : ntpwr:exit
09:59:57.575911 : ntprd:entry
10:00:37.578078 : ntprd:exit
Process 20742 for the strace/truss shows delay between file descriptors (FD) 10 and 11
strace:20742 0.000062 poll([{fd=10, events=POLLIN}], 1, 5000) = 0
strace:20742 5.000105 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 11
strace:20742 0.000050 connect(11, {sa_family=AF_INET,
sin_port=htons(53), sin_addr=inet_addr("111.111.111.1")}, 28) = 0


进一步延误文件描述符10&11

strace:20742 0.000044 poll([{fd=10, events=POLLOUT, revents=POLLOUT}],
1, 0) = 1
strace:20742 0.000062 poll([{fd=10, events=POLLIN}], 1, 5000) = 0
strace:20742 0.000034 poll([{fd=11, events=POLLOUT, revents=POLLOUT}],
1, 0) = 1


文件描述符10和11呈现出以下几个

connect(10, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("111.111.111.1")
connect(11, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("222.222.222.2")


这些都是你的DNS服务器地址。


原因

BUG9593134 DNS或NIS配置错误可能会导致缓慢的数据库连接。
问题是由于一个函数调用,这就需要DNS配置正确工作。

BUG为内部标记,客户是不可见的

解决方案

问题从补丁集11.2.0.2发布起得到修复,其中已修订的DNS调用Oracle代码。请注意,如果功能期待在11.2.0.2前成功从DNS的应答,那么不能使用本地hotst文件选项。

客户还应该看看,以解决任何潜在与DNS解析有关的问题

在/etc/resov.conf文件有一个坏的条目时,这些症状也已经被IBM AIX所报告。




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论