read(10, "NTP0 13690\n", 64) 数据库登录缓慢
初步怀疑:下面两个參数引起:
SQL> conn / as sysdba
Connected.
SQL> show parameter lock
NAME
------------------------------------ ----------- ------------------------------
db_file_multiblock_read_count integer 128
ddl_wait_for_locks boolean FALSE
distributed_lock_timeout integer 60
dml_locks integer 48420
gc_files_to_locks string
lock_name_space string
lock_sga boolean TRUE
SQL> show parameter pre
NAME TYPE VALUE
os_authent_prefix string ops$
pre_11g_enable_capture boolean FALSE
pre_page_sga boolean TRUE
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@KXSALE02 ~]$ tail
分析过程:
1 提取awr报告发现等待事件
Event Waits Time(s) Avg Wait(ms) % Total Call Time Wait Class
CPU time 267 103.3
os thread startup 48 22 462 8.6 Concurrency
control file sequential read 19,523 4 0 1.7 System I/O
log file parallel write 1,322 2 1.1 System I/O
control file parallel write 1,202 3 2 1.0 System I/O
2 Dump systemstat 10 发现问题
---------------------------------------------------
[80 samples, 12:37:56 - 12:39:16]
idle wait at each sample
[1 sample, 12:37:55]
waited for 'os thread startup', seq_num: 50784
p1: ''=0x0
p2: ''=0x0
p3: ''=0x0
time_waited: 0.458091 sec (sample interval: 0 sec)
时间也比較温柔
3 在測试库上开启这两个參数发现:
close(8) = 0 <0.000008>
close(11) = 0 <0.000007>
read(10, "NTP0 13690\n", 64) = 11 <0.681689>
fcntl(10, F_SETFD, FD_CLOEXEC) = 0 <0.000009>
4 在查看其他生产库,假设參数不一样。基本能够确定是这两个參数引起!