Oracle for Linux を使いこなす技



Similar documents
~~~~~~~~~~~~~~~~~~ wait Call CPU time 1, latch: library cache 7, latch: library cache lock 4, job scheduler co

untitled

[ D-4 ] Oracle9i Database

<Documents Title Here>

<Documents Title Here>

... 3 Oracle on Linux I/O I/O... 5 I/O io_request_lock... 6 I/O GB RAM SGA GB RAM Very Large M

Oracle Enterprise Manager概説 リリース2.2

untitled

はじめに コース概要と目的 Oracle データベースのパフォーマンス問題の分析方法 解決方法を説明します 受講対象者 データベース管理者の方を対象としています 前提条件 データベース アーキテクチャ データベース マネジメント を受講された方 もしくは同等の知識 をお持ちの方 テキスト内の記述につ

Recovery Managerのバックアップおよびリカバリの最適化

untitled

意外と簡単!? Oracle Database 11g -バックアップ・リカバリ編-

Oracle Change Management Pack, Oracle Diagnostics Pack, Oracle Tuning Packインストレーション・ガイド リリース2.2

<Documents Title Here>

Oracle HTML DB 導入ガイド

untitled

imt_817_tuning_11_1822.PDF

<Documents Title Here>

untitled

<Documents Title Here>

Oracle Database 10gのOracle Data Guard

untitled

PowerPoint プレゼンテーション

雲の中のWebアプリケーション監視術!~いまなら間に合うクラウド時代の性能監視入門~

Windowsユーザーの為のOracle Database セキュリティ入門

Oracle Application Server 10g(9

Null

untitled

Oracle Enterprise Manager 10g R2 Grid Control: データベース管理の新機能

Oracle Application Server 10g( )インストール手順書

Oracle Application Server 10g(9

NEC Storage series NAS Device

<Insert Picture Here> Oracle Business Intelligence 2006/6/27

Linux上のOracle Real Application Clustersの記憶領域オプション

Microsoft Word - nvsi_050090jp_oracle10g_vlm.doc

o8i_816_LinuxTips_02_1015

nakayama15icm01_l7filter.pptx

自己管理データベース: 自動SGAメモリー管理

untitled

Null

Slide 1

Oracle Database 10g Automatic Storage Management の NEC iStorage S シリーズへの適用

OM.indd

Oracle Database 11g × Hitachi Storage Solutionsのベストプラクティス

スライド 1

オラクルのバックアップとリカバリの必須要件

untitled

untitled

untitled

D2印刷用.PDF

スライド 1

自動シャットタ<3099>ウンクイックインストールカ<3099>イト<3099>.indb

リアルタイムシステム

FUJITSU Software Systemwalker Operation Manager V13 カタログ

sg_lenovo_os.xlsx

スライド 1

untitled

A book

Windows Oracle -Web - Copyright Oracle Corporation Japan, All rights reserved.

Linux2.4でのメモリ管理機構

How to Use the PowerPoint Template

Oracle8簡単チューニング for Windows NT


EA3.PDF

Microsoft Word - nvsi_090196_r1_vaultdr_offline_rhel_dualpath.doc

ORACLEデータベース10G データ・ポンプ: 超高速データ移動ユーティリティの基盤

Agenda はじめに 目的とゴール Part1の振り返り AWRを使用した性能分析 AWR 概要 AWRに格納される情報 AWR レポートにおける分析アプローチ AWR 確認ポイント Case Study AWRとアーキテクチャの関係 まとめ Part2のポイント まとめ Copyright 20

ETERNUS SF総合

クラウド時代のインフラ構成/変更管理とコンプライアンス管理

Web Microsoft 2008 R2 Database Database!! Database 04 08

1 Microsoft Windows Server 2012 Windows Server Windows Azure Hyper-V Windows Server 2012 Datacenter/Standard Hyper-V Windows Server Windo

Oracle Fail Safe For Windows NT and Windows 2000 リリース・ノート、リリース 3.1.2

Oracleの領域管理~トラブル防止のテクニック~

,,.,,., II,,,.,,.,.,,,.,,,.,, II i

cover1.indd

perf_tool.PDF

Red Hat Enterprise Linux 2.1 ASからRed Hat Enterprise Linux 3へのアップグレード時のOracle Database 10g環境の保持

Microsoft Word - マニュアル4.1J

BIG_RM_BAS_OPEN

これは何? ORACLE の内部状態を示す情報の一つである 待機イベントについて解説します 待機イベントを知ることで 一歩進んだパフォーマンスチューニングが出来ます また 待機イベントという切り口を通して ORACLE のアーキテクチャに対する理解を深めていきます なお ORACLE のバージョンは

Armadillo-9 ソフトウェアマニュアル

C3印刷用.PDF

FileMaker Server Getting Started Guide

VMware VirtualCenter: Virtual Infrastructure Management Software

IBM Software Group DB2 Information Management Software DB2 V8 XML SQL/XML 2 XML XML UDF XMLExtender XML XML XMLCollection, XMLColumn XML UDF Informati

untitled

< >

56 OS OS OS OS 1 OS HDD OS 1 OS HDD HDD OS OS OSOS HDD 図 1 二重キャッシュ環境 3. 負の参照の時間的局所性 3.1 参照の局所性 Locality of Reference Temporal locality Spatial localit

H1

Oracle XML DB によるスケーラビリティおよびパフォーマンス検証 - MML v.3.0

<Documents Title Here>

HULFT-DataMagic Ver2.2.0 製品対応OS

untitled

Sybase on CLUSTERPRO for Linux HowTo


WebSphere Application Server V5.0 for Linux Ver. 1.11

Apache Web Server 2 Compaq ActiveAnswers Deskpro Compaq Insight Manager Fastart Systempro Systempro/LT ProLiant ROMPaq Qvision SmartStart NetFlex Quic

new_logo.eps

Oracle Database 10g Release 2を使用したデータベース・パフォーマンス


Transcription:

Oracle9i for Linux

Linux Monitoring the Oracle Monitoring the Server

vs vs OS vs Oracle vs SQL vs

3 I/O I/O

STEP1: STEP2:DB DB STEP3: STEP4: DB etc

STEP5:SQL SQL STEP6: Oracle STEP7: I/O I/O STEP8: STEP9:OS

1. ( ) 2. ( ) 3. ( ) 4. ( )

SQL

Oracle OS DB: STATSPACK OS: vmstat, iostat I/O Oracle 20%

Linux

Linux

MIRACLE LINUX V2.0 I/O MIRACLE LINUX V2.0 CD-ROM kernel 2.4.7 Web kernel-2.4.9 Red Hat Linux 7.1 CD-ROM kernel 2.4.2 Web kernel-2.4.9

Oracle SGA SGA Oracle9i Database R1(9.0.1) 1.8GB Oracle9i Database R2(9.2) 62GB 4GB

SHMMAX 1 SHMMAX SHMSEG Oracle SHMMAX 1/2 SGA 1 SGA<SHMMAX kparam sysctl ipcs Oracle sysresv

kparam kparam MIRACLE LINUX MIRACLE LINUX

kparam /etc/sysconfig/kparam # vi /etc/sysconfig/kparam /proc/sys/kernel/semopm 100 /proc/sys/kernel/shmmax 262934528 /proc/sys/kernel/sysrq 0 /proc/sys/kernel/panic 10 /proc/sys/kernel/sem 250 32000 100 128 kparam # service kparam restart

Oracle OS MIRACLE LINUX V2.0/2.1 ext2, ext3, ReiserFS, RAW I/O RAW ext2 ext3 HA ext3 MIRACLE LINUX V2.0/V2.1 ext3 ext3 mkinitrd

i-node -j ext3 # mke2fs [-j] -b -T i-node Oracle OS OS : 4K Oracle 4K, 8K, 16K # tune2fs -l

# mke2fs -b -T i-node 1024,2048,4098 i-node News Largefile Largefile4 4KB 1node 1MB 1node 4MB 1node # mke2fs -j -b 4098 -T largefile4 /dev/sdb1

UNIX/Linux atime 3 mtime ctime atime atime

atime 2 /etc/fstab noatime /dev/sdb2 /home ext2 defaults,noatime 1 2 $ chattr +A * $ cd < > stat $ stat

Monitoring the Oracle

SQL Oracle SQL /tkprof EXPLAIN PLAN SQL*Plus BSTAT/ESTAT STATSPACK Oracle Enterprise Manager Diagnostics Pack/Tuning Pack V$

Oracle8i R8.1.6 STATSPACK BSTAT/ESTAT 2

STATSPACK STATSPACK $ sqlplus / as sysdba SQL> @?/rdbms/admin/spcreate SQL> @?/rdbms/admin/spdrop SQL> @?/rdbms/admin/spcreate 2 SQL> connect perfstat/pertstat SQL> execute statspack.snap # SQL> execute statspack.snap(i_snap_level=>5)

STATSPACK SQL> connect perfstat/pertstat SQL> @?/rdbms/admin/spreport Top 5 Wait Events ~~~~~~~~~~~~~~~~~ Wait % Total Event Waits Time (s) Wt Time -------------------------------------------- ------------ ----------- ------- log file parallel write 125 2 24.50 SQL*Net more data from dblink 39,020 2 23.03 SQL*Net message from dblink 234 1 20.15 sort segment request 1 1 13.69

Monitoring the Server

I/O CPU I/O I/O CPU CPU Oracle

Linux Linux vmstat sysstat sar,iostat,mpstat,isag netstat ps aux ipcs free uptime Linux /proc

CPU Run Queue/Wait Queue vmstat cpu(usr, sys, idl) sar -U vmstat r/b vmstat memory (free,swpd,buff,cache) sar -r vmstat bi/bo Disk I/O sar -B sar -b vmstat si/so I/O sar -W iostat -x await DiskQueue iostat -x avgqu-sz

vmstat vmstat IO CPU 1 OS CPU I/O Excel vmstat [s] $ vmstat 10 20 procs memory swap io system cpu r b w swpd free buff cache si so bi bo in cs us sy id 0 0 0 32460 7512 15556 144024 0 0 7 20 52 82 9 4 87 0 0 0 32460 7512 15556 144024 0 0 0 10 103 14 0 0 100

2 $ vmstat 2 vmstat CTRL+C 2 10 -n 1 tee Excel $ vmstat -n 2 tee output_vmstat

Process r: CPU vmstat b: I/O r CPU b Memory swpd: (KB) free: (KB) buff: (KB) cache: (KB)

vmstat Swap si: (kb/s) so: (kb/s)

vmstat IO bi: (blocks/s) bo: (blocks/s) CPU CPU us: sy: id:

I/O iostat CPU iostat [s] $ iostat -dt 2 Linux 2.4.7-2.24mlsmp (host.your.domain.name) 03/01/02 Time: 07:35:06 Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn dev8-0 2.25 19.51 39.10 4324622 8665724 dev8-1 1.28 12.12 38.43 2685560 8516872 Time: 07:35:08 Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn dev8-0 1.50 0.00 24.00 0 48 dev8-1 0.50 0.00 4.00 0 8 1

iostat iostat $ iostat -d -x $ iostat -d -x sdb 2 Linux 2.4.7-2.24mlsmp (dhcp-0198.miraclelinux.com) 03/01/02 Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util sdb 2.09 3.28 0.39 0.88 19.86 33.30 41.95 161.22 1357.58 660 9.96 83.76 Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10.00 0.00 0.00 100.00

iostat avgqu-sz I/O I/O await I/O [m sec] %util I/O CPU

STATSPACK, iostat, vmstat

STATSPACK STATSPACK A4 20 1 Load Profile ~~~~~~~~~~~~ Per Second Per Transaction --------------- --------------- Redo size: 443,895.17 121,577,953.78 Logical reads: 405.38 111,030.44 Block changes: 331.01 90,658.67 Physical reads: 35.54 9,733.11 Physical writes: 121.03 33,148.89

STATSPACK 1 Instance Efficiency Percentages (Target 100%) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Buffer Nowait %: 99.99 Redo NoWait %: 99.68 Buffer Hit %: 99.93 In-memory Sort %: 99.78 Library Hit %: 92.46 2 Shared Pool Statistics Begin End ------ ------ Memory Usage %: 86.27 53.81 % SQL with executions>1: 62.89 54.14 % Memory for SQL w/exec>1: 37.60 29.86 SQL 2

STATSPACK Top5 Wait Events Top 5 Wait Events ~~~~~~~~~~~~~~~~~ Wait %Total Event Waits Time (s) Wt Time -------------------------------------------- ------------ ----------- ------- log file switch (checkpoint incomplete) 1,182 1,131 51.80 log file parallel write 4,868 331 15.17 log buffer space 3,809 249 11.39 control file parallel write 1,745 131 5.99 log file switch completion 113 106 4.88 80% Wait REDO

vmstat (CPU, Process) Wait queue 1

vmstat ( free

STATSPACK CPU wait queue 1 I/O REDO REDO REDO :10MB 1GB REDO :500KB 5MB 2

Appendix: sar/isag free Web

sysstat sar iostat mpstat CPU sar sadc sar isag sar sadc iostat I/O

sar UNIX/Linux CPU -o -f

sar I/O 2 10 $ sar -b 2 10 Linux 2.4.7-2.14mlsmp (host.your.domain.name) 10/15/01 16:52:30 tps rtps wtps bread/s bwrtn/s 16:52:32 0.00 0.00 0.00 0.00 0.00 2 $ sar -W 2 0 Linux 2.4.7-2.14mlsmp (host.your.domain.name) 10/15/01 16:55:17 pswpin/s pswpout/s 16:55:19 0.00 0.00 16:55:21 0.00 12.00 -B pgpgin/s pgpgout/s I/O

2 sar 100 outfile $ sar -A 2 100 -o outfile outfile I/O $ sar -b -f ourfile /var/lib/sa $ sar

MIRACLE LINUX V2.0 sadc(sar) 10 /etc/cron.hourly/sysstat, /etc/cron.daily/sysstat /var/lib/sa $ ls /var/log/sa sa21 sa23 sa25 sa27 sar21 sar23 sar25 sar27 sa22 sa24 sa26 sa28 sar22 sar24 sar26 sar28 sann NN sarnn NN

isag(interactive System Activity Grapher) sar/sadc I/O CPU etc

isag isag [-p datafile_path] datafile_path /var/lib/sa $ isag -p. Chart

free $ free total used free shared buffers cached Mem: 512120 501632 10488 102484 6156 149616 -/+ buffers/cache: 345860 166260 Swap: 1052248 24032 1028216 Mem Total OS Used Free OS (cached) (buffers) Shared

free -/+ buffers/cache Used Mem:Used - buffers - cached Free Mem:Free + buffers + cached Swap Total swap Used Free http://www.linux.or.jp/jf/jfdocs/the-linux- Kernel-4.html

Web http://www.miraclelinux.com MIRACLE LINUX http://www.miraclelinux.com/products/ml/index.html MIRACLE LINUX http://www.miraclelinux.com/support/hardware20.html MIRACLE LINUX http://www.miraclelinux.com/support/update/list.php3 MIRACLE LINUX http://www.miraclelinux.com/products/product_info/support.html

Web http://www.oracle.co.jp Oracle Technology Network Japan http://technet.oracle.co.jp Linux & Windows Linux OTN Oracle Technology Network http://otn.oracle.com

Web How to Get Maximum Performance from Linux and Oracle http://www.linux.com/newsitem.phtml?sid=93&aid=12536 Linux Performance Tuning http://linuxperf.nl.linux.org/links.html Oracle FAQ http://www.orafaq.com/faq2.htm sysstat home page http://perso.wanadoo.fr/sebastien.godard/

Oracle9i Oracle9i Oracle 13 Oracle 2 Mark Gurry, Peter Corrigan Oracle Oracle8

Oracle SQL Tuning Pocket Reference Mark Gurry, O REILLY Oracle9i Oracle9i for Windows 2000 Tips & Techniques Scott Jesse,Matthew Hart, OSBORNE Oracle9i Windows 2000 Windows 2000 Oracle9i ORACLE High-Performance SQL Tuning Donald K.Burleson, OSBORNE SQL

Oracle SQL High-Performance Tuning 2nd Guy Harrison,Prentice Hall 1 cle DBA on Unix and Linux Michael Wessler, SAMS Linux/UNIX