ITPub博客

首页 > Linux操作系统 > Linux操作系统 > tns连接非常慢

tns连接非常慢

原创 Linux操作系统 作者:BTxigua 时间:2010-08-09 18:39:08 0 删除 编辑
以下所有的操作都是在本机执行的,所以可以排除网络问题。

$ tnsping mssdb2_255

TNS Ping Utility for IBM/AIX RISC System/6000: Version 9.2.0.8.0 - Production on 09-AUG-2010 08:55:03

Copyright (c) 1997, 2006, Oracle Corporation.  All rights reserved.

Used parameter files:
/oracle/app/oracle/product/9.2.0/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.201.255.10)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME =mssdb2)))
OK (10470 msec)

TNS ping 耗时1万多毫秒,当时的系统负载情况,其实系统也没有忙到这种程度:
$ vmstat 1
System Configuration: lcpu=16 mem=23647MB
kthr    memory              page              faults        cpu   
----- ----------- ------------------------ ------------ -----------
r  b   avm   fre  re  pi  po  fr   sr  cy  in   sy  cs us sy id wa
11  0 4203248 1423059   0   0   0   0    0   0 3932 38075 12585 76 12  5  7
8  0 4202970 1423327   0   0   0   0    0   0 6268 24592 15878 69 15  7  9
11  0 4204770 1421521   0   0   0   0    0   0 1747 25479 4157 82 12  2  3
9  0 4206332 1419947   0   0   0   0    0   0 1049 33114 3647 77  7  8  8
10  0 4206948 1419321   0   0   0   0    0   0 1136 28215 3661 70 11  9 10
10  0 4207126 1419132   0   0   0   0    0   0 1184 19773 3640 68 10 13 10
9  0 4205677 1420569   0   0   0   0    0   0 1329 34922 3890 76 11  5  8
12  0 4206259 1419973   0   0   0   0    0   0 994 25841 3100 84  6  2  7
16  0 4206841 1419387   0   0   0   0    0   0 3257 41001 8264 83  9  4  4
11  0 4205584 1420633   0   0   0   0    0   0 1524 25640 3892 70  9 14  8
5  0 4205898 1420307   0   0   0   0    0   0 1291 22445 4421 59  9 21 11
6  0 4206335 1419863   0   0   0   0    0   0 1080 43732 3422 64 11 16 10
6  0 4205308 1420878   0   0   0   0    0   0 3463 29527 8693 58 16 16 11
8  0 4208394 1417784   0   0   0   0    0   0 2451 22139 6769 57 14 21  8
7  0 4210456 1415714   0   0   0   0    0   0 2613 17220 8778 43 16 26 15
5  0 4213319 1412841   0   0   0   0    0   0 4048 19100 9205 41 18 22 19
6  0 4213943 1412179   0   0   0   0    0   0 2264 14892 6908 57 15 12 16
7  0 4213981 1412132   0   0   0   0    0   0 1723 22403 5631 56 11 17 16
8  0 4212196 1413907   0   0   0   0    0   0 1820 15836 5077 62 11 14 13
7  0 4212064 1414025   0   0   0   0    0   0 2038 19721 5990 74  8  6 11

另外做了sqlplus来进行登陆测试
$ date
Mon Aug  9 08:59:27 BEIST 2010
$ sqlplus bpm/xxxxxx@mssdb2_255

SQL*Plus: Release 9.2.0.8.0 - Production on Mon Aug 9 08:59:27 2010

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.8.0 - Production

quit

SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.8.0 - Production
$ date
Mon Aug  9 09:00:15 BEIST 2010
这个耗时48秒。

如果不使用监听,连接就相当快了。
$ date
Mon Aug  9 08:59:56 BEIST 2010
$ sqlplus bpm/xxxxxx
SQL*Plus: Release 9.2.0.8.0 - Production on Mon Aug 9 08:59:56 2010

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.8.0 - Production

quit

SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.8.0 - Production
$ date
Mon Aug  9 08:59:57 BEIST 2010

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10867315/viewspace-670610/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-01-31

  • 博文量
    101
  • 访问量
    313454