Running and Managing Oracle Databases on OpenVMS (Apr 2016) - - PowerPoint PPT Presentation

running and managing
SMART_READER_LITE
LIVE PREVIEW

Running and Managing Oracle Databases on OpenVMS (Apr 2016) - - PowerPoint PPT Presentation

Running and Managing Oracle Databases on OpenVMS (Apr 2016) Maklee Engineering Christian Moser Chief Technology Officer cmos@maklee.com Agenda Oracle 11g on OpenVMS Configuration and Tuning Performance monitoring tools Oracle


slide-1
SLIDE 1

Running and Managing Oracle Databases

  • n OpenVMS

(Apr’2016)

Maklee Engineering Christian Moser Chief Technology Officer cmos@maklee.com

slide-2
SLIDE 2

Agenda

  • Oracle 11g on OpenVMS
  • Configuration and Tuning
  • Performance monitoring tools
slide-3
SLIDE 3

Oracle 11g on OpenVMS

  • The long wait is finally over!
  • Oracle finally released 11.2.0.4 for OpenVMS

– (Summer 2015)

  • Most customers we worked with saw 10% - 20% performance increase

after upgrading from 10g to 11g

  • We decided to take it for a spin....

– We benchmarked Oracle 10.2.0.5 on OpenVMS V8.4 against Oracle 11.2.0.4 on OpenVMS V8.4-1H1 – We were looking at 2 common workload benchmarks, Swingbench and SLOB

slide-4
SLIDE 4

Hardware Configuration – Oracle 10g

  • HP Integrity rx2800 i2 (1.33GHz/4.0MB)
  • 8 CPU Cores
  • 64GB Memory
  • OpenVMS V8.4
  • Oracle 10.2.0.5
  • 20GB SGA
  • 30GB Database
slide-5
SLIDE 5

Hardware Configuration – Oracle 11g

  • HP Integrity rx2800 i4 (2.53GHz/32.0MB)
  • 16 CPU Cores (only 8 used for the benchmark)
  • 128GB Memory
  • OpenVMS V8.4-1H1
  • Oracle 11.2.0.4
  • 24GB SGA
  • 30GB Database
slide-6
SLIDE 6

Swingbench

  • Swingbench is a free load generator (and benchmark) designed to

stress test an Oracle database (10g, 11g, 12c)

  • Our test measured the amount of work that can be performed during

a 15 minute run

  • 60 Users
  • Benchmark (according to database wait events) is about 50% CPU and

50% I/O

  • Order Entry Benchmark
  • Database has been bounced (to clear cache) between runs
slide-7
SLIDE 7

Transactions Committed Per Minute

Transactions Committed Per Minute (More is better)

slide-8
SLIDE 8

New Order Latency

Latency Per New Order (Less is better)

slide-9
SLIDE 9

Order Entry Benchmark Results

  • Out of the box 11g was about 2.7X faster than 10g

– Faster processor speed account for some of the improvement – The i4 processors have higher clock frequency 2.53GHz vs 1.33GHz – Oracle 11g is faster and more efficient than Oracle 10g – Most customers we work with see 10% - 20% improvement just by upgrading

slide-10
SLIDE 10

Silly Little Oracle Benchmark (SLOB)

  • Benchmark is testing both CPU and I/O subsystem
  • 10 different user schemas run for 10 min

– Avoid contention – Random SELECT and UPDATE statements – 30% update and 70% select queries – Table contains 10,000 blocks with 1 row per block

  • Results

– SELECT is 2.5X better (11g vs 10g) – UPDATE is 10X better (11g vs 10g)

slide-11
SLIDE 11

Silly Little Oracle Benchmark (SLOB)

slide-12
SLIDE 12

Oracle on OpenVMS

  • Oracle is “just another” user mode application

– (almost) O/S agnostic – Datafiles are compatible between platforms – Does not rely on OpenVMS specific mechanism (locking, ASTs, etc) – Exception is mapping to physical memory and keep memory resident – It is a large application, many processes, requires large quotas – Requires a good I/O subsystem – Use the available physical memory – More CPUs is a good thing

slide-13
SLIDE 13

System Recommendations

  • General OpenVMS system tuning

– Enough paged and non-paged pool – Smaller XFC cache (Oracle uses own buffer cache), no need to double cache – Correctly assign fastpath devices – Use site id if multi-site host-based shadowing – Disable caching for Oracle datafiles

  • $ set file /caching=no_caching <datafile>
slide-14
SLIDE 14

Hyperthreading

  • According to Intel’s marketing numbers, HTs provide up to 25%

performance increase

  • Not suitable for all applications
  • May degrade performance for some applications
  • Requires testing
  • Rule of thumb

– If high CPU utilization and COMputable processes – it might help

  • No clear yes/no answer
slide-15
SLIDE 15

TCPIP

  • TCPIP Tuning parameters

– Enable local I/O post-processing for TCPIP – Increase socket parameter – Add to TCPIP$ETC:SYSCONFIGTAB.DAT

net:

  • vms_iopost_local = 1

inet: pmtu_enabled = 0 tcbhashsize = 16384 tcbhashnum = 16 socket: somaxconn = 65535 sominconn = 65535

slide-16
SLIDE 16

Storage Subsystem

  • Running some IOT tests to verify IO performance

– Larger IO’s to measure throughput  1.5 GB/sec – Smaller IO’s to measure IO rate  30,000 IO/sec

  • Good 3PAR performance

$ iot /count=50000 /op=read /pat=rand /size=512 /que=64 - $1$DGA8950 $1$dga8951 $1$dga8952 $1$dga8953 _$1$DGA8950: (DGX00 DG "3PARdata VV") 49632 xfer, 33.440 sec,1484.2 xfer/sec, 379958 Kb/sec _$1$DGA8951: (DGX00 DG "3PARdata VV") 49928 xfer, 33.440 sec,1493.1 xfer/sec, 382224 Kb/sec _$1$DGA8952: (DGX00 DG "3PARdata VV") 49743 xfer, 33.440 sec,1487.5 xfer/sec, 380808 Kb/sec _$1$DGA8953: (DGX00 DG "3PARdata VV") 50000 xfer, 33.440 sec,1495.2 xfer/sec, 382775 Kb/sec Total (p < 0.001)199303 xfer, 33.440 sec,5960.0 xfer/sec,1525765 Kb/sec $ iot /count=100000 /op=read /pat=rand /size=16 /que=64 - $1$DGA8950 $1$dga8951 $1$dga8952 $1$dga8953 _$1$DGA8950: (DGX00 DG "3PARdata VV") 98002 xfer, 13.150 sec,7452.6 xfer/sec, 59621 Kb/sec _$1$DGA8951: (DGX00 DG "3PARdata VV")100000 xfer, 13.150 sec,7604.6 xfer/sec, 60837 Kb/sec _$1$DGA8952: (DGX00 DG "3PARdata VV") 98276 xfer, 13.150 sec,7473.5 xfer/sec, 59788 Kb/sec _$1$DGA8953: (DGX00 DG "3PARdata VV") 99892 xfer, 13.150 sec,7596.3 xfer/sec, 60771 Kb/sec Total (p < 0.001)396170 xfer, 13.160 sec,30104.1 xfer/sec, 240833 Kb/sec

slide-17
SLIDE 17

Memory Resident

  • Pin Oracle’s SGA to physical memory
  • Add or increase the reserved memory

– Larger SGA size, requires system reboot

  • SYSMAN reserved memory, units is in MB

– $ mc sysman reserve add ora_<sid>_sga /size=23000 /page /allo /zero – $ mc sysman reserve mod ora_<sid>_sga /size=30720 /page /allo /zero – Pick a ”round” number to avoid multiple chunks – Oracle database parameter LOCK_SGA ignored on OpenVMS – Verify Oracle is using memory resident sections (page in use is non-zero)

$ show mem/res System Memory Resources on 15-SEP-2015 04:39:23.49 Memory Reservations (pages): Group Reserved In Use Type ORA_ORA11_SGA SYSGBL 3840 0 Page Table ORA_ORA11_SGA SYSGBL 3670016 0 Allocated ORA_ORA11_SGA SYSGBL 262144 0 Allocated Total (30.02 GBytes reserved) 3936000 0

slide-18
SLIDE 18

Memory Resident (cont’d)

$ mc sysman res show %SYSMAN-I-OUTPUT, command execution on node UEHARA Reservation Name Group RAD Size (MB) Pages Pg In Use Attributes ORA_ORA11_SGA SYSGBL ANY 2875 2875 Allocated PageTables ORA_ORA11_SGA SYSGBL ANY 20480 2621440 2621440 Allocated ORA_ORA11_SGA SYSGBL ANY 2048 262144 2568 Allocated ORA_ORA11_SGA SYSGBL ANY 256 32768 2184 Allocated ORA_ORA11_SGA SYSGBL ANY 192 24576 2081 Allocated ORA_ORA11_SGA SYSGBL ANY 16 2048 545 Allocated ORA_ORA11_SGA SYSGBL ANY 8 1024 545 Allocated $ mc sysman res list %SYSMAN-I-OUTPUT, command execution on node UEHARA Reservation Name Group RAD Size (MB) Pages Attributes ORA_ORA11_SGA SYSGBL ANY 30720 3932160 Allocated Zeroed ORA_ORA11_SGA SYSGBL 3840 PageTables Allocated $ mc sysman res show %SYSMAN-I-OUTPUT, command execution on node UEHARA Reservation Name Group RAD Size (MB) Pages Pg In Use Attributes ORA_ORA11_SGA SYSGBL ANY 3840 3840 Allocated PageTables ORA_ORA11_SGA SYSGBL ANY 28672 3670016 3670016 Allocated ORA_ORA11_SGA SYSGBL ANY 2048 262144 245491 Allocated

slide-19
SLIDE 19

Install Images Memory Resident

  • Most important OpenVMS related shareable images are already

installed /resident

  • Make sure granularity hint region values are large enough

– GH_RES_CODE larger than 512MB will result in SYSBOOT bugcheck and end up in XDelta

  • Install Oracle images resident

– Large image, code section is 366MB for 11g – Modify INSORACLE.COM – $ install add ora_root:[bin]oracle.exe /open /head /share=addr /resident – Might not fit into 512MB with other resident installed images – Re-link and put code into P2 space and use S2 space for memory resident

slide-20
SLIDE 20

Granularity Hint Regions

  • Enlarge GH_xxx parameters and reboot

$ mc sysgen sh load_sys Parameter Name Current Default Min. Max. Unit Dynamic

  • LOAD_SYS_IMAGES 3 7 0 31 Bitmask

$ mc sysgen sh gh Parameter Name Current Default Min. Max. Unit Dynamic

  • GH_EXEC_CODE 8192 4096 4096 65536 Pages

GH_EXEC_DATA 2048 2048 1024 65536 Pages GH_RES_CODE 65536 5120 0 1048576 Pages GH_RES_DATA 65536 512 0 65536 Pages GH_RSRVPGCNT 0 0 0 -1 Pages GH_RES_CODE_S2 65536 0 0 1048576 Pages

slide-21
SLIDE 21

Relink Oracle Image

  • Re-link Oracle main image

$ define/nolog ora_olb ora_root:[rdbms.lib], ora_root:[lib], ora_root:[dbjava.lib] $ link – /exe=ora_root:[rdbms.bin]oracle.exe – /dsf=ora_root:[rdbms.bin]oracle.dsf – /map=ora_root:[rdbms.bin]oracle.map – /cross – /full – /sysexe – /section_binding=code – /segment=(short=write,code=p2) –

  • ra_root:[rdbms.bin]loracle_4dc23418.opt/opt
slide-22
SLIDE 22

Install Oracle Images

  • Install main and some shareable images /resident
  • Shared address space requires larger paged pool (PAGEDYN)

$ install repl/open/head/share=addr/resi libcorenls11_4dc23418 $ install repl/open/head/share=addr/resi libskgxn2_4dc23418 $ install repl/open/head/share=addr/resi libskgxp11_4dc23418 $ install repl/open/head/share=addr/resi liborashr11_4dc23418 $ install repl/open/head/share=addr/resi ora_root:[bin]oracle.exe

slide-23
SLIDE 23

Install Oracle Images (cont’d)

SDA> sh proc/image/ind=51 Process index: 0051 Name: ORA_ORA11_PMON Extended PID: 00000451

  • Process activated images
  • Image Name Type IMCB GP
  • -------------------------------------- ------------ -------- -----------------

ORACLE MAIN SHR 7FE28010 00000000.02000000 TCPIP$IPC_SHR MRGD SHR 7FE2C4D0 00000000.0254A000 TCPIP$ACCESS_SHR GLBL SHR 7FE2BC70 00000000.025C2000 DISMNTSHR GLBL PRT SHR 7FE296C0 00000000.7B21E000 MAILSHRP GLBL PRT SHR 7FE2BDA0 00000000.7B304000 SECURESHRP GLBL PRT SHR 7FE29590 00000000.7B43E000 RMISHR GLBL PRT SHR 7FE297F0 00000000.7B49E000 LIBRTL GLBL SHR 7FE2A570 00000000.7B4CC000 LIBOTS GLBL SHR 7FE2A6A0 00000000.7B4E6000 MAILSHR GLBL SHR 7FE29B80 00000000.7B5AE000 SECURESHR GLBL SHR 7FE29460 00000000.7B662000 CMA$TIS_SHR GLBL SHR 7FE2BED0 00000000.7B698000 DPML$SHR GLBL SHR 7FE2BB40 00000000.7B852000 PTHREAD$RTL GLBL SHR 7FE29920 00000000.7B884000 DECC$SHR GLBL SHR 7FE29DE0 00000000.7BA20000 TRACE GLBL SHR 7FE29CB0 00000000.7BA82000 LIBCORENLS11 GLBL SHR 7FE2BA10 00000000.7C6DE000 LIBSKGXN2 GLBL SHR 7FE28AE0 00000000.7C708000 LIBSKGXP11 GLBL SHR 7FE28C10 00000000.7C728000 LIBORASHR11 GLBL SHR 7FE28D40 00000000.7CBDE000 SYS$BASE_IMAGE GLBL 7FE2A7D0 FFFFFFFF.D0225200 SYS$PUBLIC_VECTORS GLBL 7FE2A900 FFFFFFFF.D0200400 Total images = 22 Pages allocated = 5666 SDA>

slide-24
SLIDE 24

Install Oracle Images (cont’d)

SDA> show proc/image=all Process index: 0051 Name: ORA_ORA11_PMON Extended PID: 00000451

  • Process activated images
  • Maj,Min ID,Match GP

Image Name/Link Time/Section Type Type/File Id IMCB Base End Image Offset

  • ----------------------------------- ------------ -------- ----------------- ----------------- -----------------

ORACLE MAIN SHR 7FE28010 2FD2,868EE0E9,01 00000000.02000000 14-SEP-2015 15:00:28.89 (21134,3,0) Data (read/write) 00000000.00010000 00000000.00066ECC 00000000.00010000 Demand zero 00000000.00070000 00000000.0008175B 00000000.00070000 Data (read only) 00000000.00090000 00000000.01DF7963 00000000.00090000 Code FFFFF802.30000000 FFFFF802.46E16AAF 00000000.80000000 Data (read only) FFFFFFFF.B02EBA00 FFFFFFFF.B08C3067 00000000.96E20000 Short data (read/write) 00000000.01E00000 00000000.021759A7 00000000.01E00000 Fixup FFFFFFFF.D727E890 FFFFFFFF.D8CA8CF7 00000000.97400000

slide-25
SLIDE 25

Granularity Hint Regions

SDA> clue mem/gh Granularity Hint Regions - Huge Pages

  • S0S1 Resident Image Code Region Pages/Slices

Base/End VA FFFFFFFF.90000000 FFFFFFFF.B0000000 Cur Size 65536/ 65536 Base/End PA 00000000.10000000 00000000.30000000 Free / 44915 Total Size 00000000.20000000 512.0 MB In Use / 20621 Bitmap VA/Size FFFFFFFF.D12BE190 00000000.00002000 Init Size 65536/ 65536 Slice Size 00000000.00002000 Released 0/ 0 Next free Slice 00000000.00003D05 S0S1 Resident Image Data Region Pages/Slices Base/End VA FFFFFFFF.B0000000 FFFFFFFF.D0000000 Cur Size 65536/****** Base/End PA 00000010.00000000 00000010.20000000 Free /****** Total Size 00000000.20000000 512.0 MB In Use / 17945 Bitmap VA/Size FFFFFFFF.D12C0190 00000000.00020000 Init Size 65536/****** Slice Size 00000000.00000200 Released 0/ 0 Next free Slice 00000000.00004619 S2 Resident Image Code Region Pages/Slices Base/End VA FFFFF802.30000000 FFFFF802.50000000 Cur Size 65536/ 65536 Base/End PA 00000010.20000000 00000010.40000000 Free / 18676 Total Size 00000000.20000000 512.0 MB In Use / 46860 Bitmap VA/Size FFFFFFFF.D12E0190 00000000.00002000 Init Size 65536/ 65536 Slice Size 00000000.00002000 Released 0/ 0 Next free Slice 00000000.0000B70C

slide-26
SLIDE 26

Install Oracle 11g on OpenVMS

  • Fastest way to install is using “silent” installation with response file
  • Ensure adequate SYSGEN parameters
  • Create Oracle account with large process quotas
  • Use ODS-5 disks
  • Use logical names instead of physical device names
  • Setup Java before EFS (otherwise java$filename_controls incorrect)
  • Create main directories
  • Create oraInst file with location and pointer
  • Unzip the Oracle 11g kit
  • Modify response file
slide-27
SLIDE 27

Install Oracle 11g on OpenVMS (cont’d)

$ mc authorize add/id/val=uic=[20,*] dba $ mc authorize cop system oracle/uic=[20,1]/pass=maklee/nopwdexp/dev=$1$dga20/dir=oracle $ mc authorize mod oracle/ast=1024/byt=1000000/fil=3000/pgflq=2000000/jtquota=16384 $ def/sys/nolog/tran=conc ora_11g $1$dga20: $ set def ora_11g:[temp] $ mc unzip vms_11204_db.zip $ mc unzip "-Vqo" db11204.zip $ cre/dir/owner=oracle ora_11g:[app.oracle.product.11g] $ cre/dir/owner=oracle ora_11g:[app.orainventory] $ cre ora_11g:[app.orainventory]oraInst.loc inst_group=dba inventory_loc=/ora_11g/app/orainventory <ctrl/Z> $ set process/parse_style=traditional $ @ora_11g:[temp.disk1.install.java$150.com]java$150_setup $ @ora_11g:[temp.disk1.install]efs.com $ unzip == "$ora_11g:[temp.disk1.install]unzip.exe" $ run_installer == "$ora_11g:[temp.disk1.install]runInstaller.exe" $ set protect=(s:rwed,o:rwed,g:re,w:re) /default $ def/nolog oracle_base "/ora_11g/app/oracle/product" $ def/nolog oracle_home "/ora_11g/app/oracle/product/11g" $ def/nolog tmp "/ora_11g/scratch" $ set default ora_11g:[temp.disk1.install] $ define/nolog ora_auto_insoracle "true" $ run_installer "-silent" "-responsefile" "/ora_11g/oracle/vms_11g.rsp" "-invptrloc" "/ora_11g/app/orainventory/oraInst.loc"

slide-28
SLIDE 28

Create Oracle Database

  • Again, fastest way is to use “silent” installation with response file
  • DBCA does not really use the response file, but instead it looks for

an argument file (yikes !)

$ cre/owner=oracle ora_11g:[oracle]dbca.rsp

  • silent
  • createDatabase
  • templateName Data_Warehouse.dbc
  • gdbname ora11
  • sid ora11
  • responseFile NO_VALUE
  • datafileJarLocation /app/oracle/product/11g/assistants/dbca/templates
  • datafileDestination /app/oracle11g/data

$ copy ora_11g:[oracle]dbca.rsp sys$scratch:dbca.args $ dbca –silent -responsefile ora_11g:[oracle]dbca.rsp

slide-29
SLIDE 29

Oracle 11g vs 10g on OpenVMS

  • Good

– General 11g Oracle performance imrpovements – Larger I/O size

  • Not (yet) available for OpenVMS platform in 11.2.0.4

– ASM (automatic storage management) – DBUA (database upgrade agent) – RAC (Real application clusters) – Refer to release notes for other missing features in current release

slide-30
SLIDE 30

Oracle Database Tuning

  • First step is to configure system, network, storage
  • Next properly setup general database parameters to size cache, db

writers etc.

  • Analyze workload
  • Drill-down associate SQL queries with wait events
  • Tune SQL queries
slide-31
SLIDE 31

Oracle Builtin Performance Tools

  • Tuning tools shipping with database
  • Automatic workload repository (AWR)

– awrrpt.sql

  • Active session history (ASH)

– ashrpt.sql

  • Automatic database diagnostic monitor (ADDM)

– addmrpt.sql

  • SQL access advisor
  • SQL tuning advisor
slide-32
SLIDE 32

Oracle AWR

  • Oracle AWR contains endless amount of performance related

metrics

– Some key information is still missing…AWR doesn’t associate a SQL statement with a wait event – No advising capabilities

  • Putting the “big picture” together and coming up with meaningful

actions is extremely challenging

slide-33
SLIDE 33

Bonfire Utility

slide-34
SLIDE 34

Operating System Advisor

slide-35
SLIDE 35

Database Information

slide-36
SLIDE 36

Database Parameter Advisor

slide-37
SLIDE 37

Workload Overview

slide-38
SLIDE 38

I/O Related Information

slide-39
SLIDE 39

Top Wait Events