• read(10, "NTP0 13690 ", 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 ", 64)            = 11 <0.681689>   
    fcntl(10, F_SETFD, FD_CLOEXEC)          = 0 <0.000009>

    4  在查看其他生产库,假设參数不一样。基本能够确定是这两个參数引起!

  • 相关阅读:
    关于Monitor和lock的锁操作 笔记
    模型/数据验证(System.ComponentModel.DataAnnotations)笔记
    NSIS 打包操作
    关于IE和非IE浏览器的一些差异笔记
    Wpf 字典触发器
    关于MongoDB在C#的使用
    Apache JMeter
    关于在移动端方面的css应用
    关于csc.exe
    增量运算符+=和*=的原理与不可变序列增量运算效率低的原因
  • 原文地址:https://www.cnblogs.com/zfyouxi/p/5405789.html
Copyright © 2020-2023  润新知