播布客视频-Performance Tuning笔记(三)Database Configuration and IO Issues

Database Configuration and IO Issues

一、目标
    1. 不同的oracle文件类型的优缺点
    2. 诊断表空间的使用情况
    3. 为什么要对表空间中的数据进行分区
    4. 检查点的工作原理
    5. 如何监控和调优检查点
    6. 如何监控和调优redo log
   
二、Oracle Database 11g includes 3 standard storage options:
    1. File system
       Network attched storage(NAS)
       Storage area network(SAN)
       Direct attached storage
    2. Raw paratitions
    3. Automatic Storage Management(ASM)
   
三、Oracle process and files
    1. DBWn: Write data files(不读,只写), Read/Write Control file
    2. LGWR: Write log
    3. ARCn: Read log, Write Archive, Read/Write Control fil
    4. CKPT: Read/Write Data files header, Read/Write Control file
    5. SERVER: Rdad/Write data files, Read log, Write Archive(手动归档)
   
四、Performance Guidelines Basic rules
    1. Keep disk I/O to a minimum.
    2. Spread your disk load across disk devices and controllers.
    3. Use temporary tablespaces where appropriate.
   
五、Distributing Files
    1. Separate data files and redo log files on different disk.
    2. Stripe table data.
    3. Reduce disk I/O unrelated to the database.
   
六、Tablespace Usage
    1. Reserve the system/sysaux tablespace for data dictionary objects.
    2. Create locally managed tablesapces to avoid space management issues.
    3. tables and indexes into separate tablespaces.
    4. Create rollback segments in their own tablespaces.
    5. Stroe large objects in their own tablespace.
    6. Create on or more temp tablespaces.
   
七、Tools for I/O Statistics
    1. Server I/O utilization
       v$filestat SQL
       SELECT phyrds, phywrts, d.name
       FROM v$datafile d, v$filestat f
       WHERE d.file#=f.file#
       ORDER BY d.name ;
       I/O Statistics SQL
       SELECT d.tablespace_name TABLESPACE,
              d.file_name, f.phyrds, f.phywrts
       FROM v$filestat f, dba_data_files d
       WHERE f.file#=d.file_id
      
       v$tempstat
       v$datafile
    2. System I/O utilization
       Performance tools  
      
八、File Striping
    1. Operationg system Striping
       os striping software
       RAID
    2. Manaual Striping
       create table/ alter table xxx command with allocate extent new file_id
 
九、Tuning FTS Operations
    1. investigate the need for full table scans.
    2. DB_FILE_MULTIBLOCK_READ_COUNT
       determine the number of db blocks the server reads at once
       influence the execution plan of the CBO
    3. v$session_longops(>6s): Monitor long-running full table scans 
       select name , value
       from v$sysstat
       where name like '%table scan%'
        <4 block = short tables
        >4 block = long tables
       select sid, serial#, opname,
              start_time,
              (sofar/totalwork)*100 as percent_complete
       from v$session_longops
    4. use SET_SESSION_LONGOPS to populate v$session_longops
       dbms_application_info.set_session_longops(rindex, slno, "Operation X",obj,0,sofar, totalwork, "table", "tables");
      
十、 Checkpoints
     1. Incremental checkpoints(lead to increase recovery time)
        CKPT updates the control file.
        During a log switch CKPT updates the controlfile and the data file headers.
     2. Full checkpoints
        CKPT updates the control file and data file header
        DBWn writes out all buffers on the checkpoint queue.
        a. Complete: alter system checkpoint;
        b. Tablespace: alter tablespace xxx begin backup/ offline;
     3. Checkpoint Queue (DIRTY BUFFER QUEUE)相关的init parameter
        FAST_START_IO_TARGET
        FAST_START_MTTR_TARGET: the number of seconds the db crash recovery of instance
         
十一、 Redo Groups and Members
       1. LGWR: write Group1, then Group2, then Group3
       2. ARCH: read redo Group1 then write disk.
          DBWn还未写入disk时, redo不可覆写;
          e.g. Thread 1 cannot allocate new log , sequence 1466
               Checkpoint not complete
               Current log#2 xxx...
          LGWR与 ARCH争用
       3. 建议:
          a. 减少竞争  LGWR与DBWn竞争及LGWR与ARCH竞争
          b. redo log file on separate, fast devices.
          c. v$logfile
             v$log
             v$log_history
            
十二、 Archiving Performance
       1. Allow the LGWR process to write to a disk different from the one the ARCn process is reading
       2. Alter system archive log all to
       3. Increase the number of archive processes.
       4. Change archiving speed:
          LOG_ARCHIVE_MAX_PROCESSES
          LOG_ARCHIVE_DEST_n(different disk from redo log disk)
       5. Diagnostic Tools
          v$archive_dest
          v$archived_log
          v$archive_processes
          LOG_ARCHIVE_DEST_STATE_n

参考链接:http://www.boo booke.com/bbs/thread-7630-1-1.html

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

转载于:http://blog.itpub.net/9252210/viewspace-627407/

这篇论文主要介绍了一种稀疏结构搜索的方法来有效地调整深度神经网络中的参数,以达到更好的性能和更高的效率。作者将该方法称为Pruning with Neuron Selectivity Ratio (PNSR)。该方法的主要思想是通过对神经元的选择性比率进行剪枝,来寻找最优的网络结构。 具体来说,PNSR方法首先训练一个初始的完整模型,然后通过计算每个神经元的选择性比率来确定哪些神经元可以被剪枝。选择性比率是指在训练过程中神经元被激活的次数与总共经历的迭代次数之比。这个比率越高,说明这个神经元在网络中的作用越大,越不应该被剪枝。根据选择性比率,可以将网络中的神经元分为类:保留、可剪枝和不可剪枝。其中保留的神经元直接保留在模型中,不可剪枝的神经元则不能被剪枝,而可剪枝的神经元则可以被剪枝,并且剪枝后不会影响网络的性能。 接下来,PNSR方法使用一种叫做“剪枝重训练”的策略来进一步优化网络结构。这种策略的基本思想是先剪枝掉一些神经元,然后重新训练网络,使其在剪枝后的结构上取得最佳性能。具体来说,PNSR方法在剪枝后使用一种叫做“结构化剪枝”的方法来调整网络的结构,使得剪枝后的网络结构更加紧凑和简单。然后,PNSR方法使用该结构再次训练网络,直到网络达到最佳性能。 最后,作者在CIFAR-10和ImageNet数据集上对PNSR方法进行了实验。实验结果表明,PNSR方法可以显著减少模型的参数数量,同时保持网络性能不变或稍微下降。这表明,PNSR方法可以有效地提高深度神经网络的效率,并有望在实际应用中得到广泛应用。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值