oracle性能优化:Oracle性能究极优化

正在看ORACLE教程是:Oracle性能究极优化  增大 SGA 已经缓冲看来对于性能提升并不显著加载时间只提升了 1.73%下面我们增加 SGA 重做日志大小:
  DB3: Log Buffer
  Database Block Size 2K
  SGA Buffer Cache 128M
  SGA Shared Pool 128M
  SGA Redo Cache 16M
  Redo Log Files 16M
  Tablespaces Dictionary
  TPC Results Load Time (Seconds) 41.39
  Transactions / Second 10.088
  我们可以看到加载时间提升了 17.35%TPS 也提升了 9.33%加载和同时插入更新删除需要比 8M 大空间但是看起来增加内存性能并没有显著提升我们加大块大小:
  DB4: 4K Block
  Database Block Size 4K
  SGA Buffer Cache 128M
  SGA Shared Pool 128M
  SGA Redo Cache 16M
  Redo Log Files 16M
  Tablespaces Dictionary
  TPC Results Load Time (Seconds) 17.35
  Transactions / Second 10.179
  我们看到加载时间提升了 138%!而对 TPS 值没有很大影响下面个简单念头是表空间管理从目录切换为本地:
  DB5: Local Tablespaces
  Database Block Size 4K
  SGA Buffer Cache 128M
  SGA Shared Pool 128M
  SGA Redo Cache 16M
  Redo Log Files 16M
  Tablespaces Local
  TPC Results Load Time (Seconds) 15.07
  Transactions / Second 10.425
  下面我们把数据库块加大到 8K 来看结果:
  DB6: 8K Block
  Database Block Size 8K
  SGA Buffer Cache 128M
  SGA Shared Pool 128M
  SGA Redo Cache 16M
  Redo Log Files 16M
  Tablespaces Local
  TPC Results Load Time (Seconds) 11.42
  Transactions / Second 10.683
  看来结果并不坏我们没有理由继续增加块大小了我们还没有根据 CPU 个数调整相应参数这次我们设置 I/O 进程数来继续调整:
  DB7: I/O Slaves
  Database Block Size 8K
  SGA Buffer Cache 128M
  SGA Shared Pool 128M
  SGA Redo Cache 16M
  Redo Log Files 16M
  Tablespaces Local
  dbwr_io_slaves 4
  lgwr_io_slaves (derived) 4
  TPC Results
  Load Time (Seconds) 10.48
  Transactions / Second 10.717
  我们测试是基于 Red Hat 6.2 进行内核版本为 2.2.14-5 smp对于 Linux 内核而言有将近几百个参数可以调整包括对 CPU 类型SMP 支持APIC 支持DMA 支持IDE DMA 缺省参数使用以磁盘限额支持根据 Oracle 文档我们要做主要调整是共享内存和信号量大小SHMMAX 最少配置 0x13000000SEMMNI, SEMMSL 和 SEMOPN 分别至少设置 100, 512, 100这些参数设置可以通过下面命令实现:
  # echo 0x13000000 >/proc/sys/kernel/shmmax
  # echo 512 32000 100 100 >/proc/sys/kernel/sem
  OS1: 单内核和 IPC
  TPC Results
  Load Time (Seconds) 9.54
  Transactions / Second 11.511
<

Tags:  oracle数据库优化 oracle性能 oracle优化 oracle性能优化

延伸阅读

最新评论

发表评论