exadata & smart scan-an introduction

36
Getting Started with Exadata & Smart Scan Aman Sharma

Upload: aman-sharma

Post on 19-Jun-2015

327 views

Category:

Technology


3 download

DESCRIPTION

Presented at AIOUG's North India Chapter 8th tech-meet and 1st webinar. The presentation is to introduce the Exadata technology and it's most magical feature, Smart Scan to the delegates.

TRANSCRIPT

Page 1: Exadata & Smart Scan-An Introduction

Getting Started with

Exadata & Smart Scan

Aman Sharma

Page 2: Exadata & Smart Scan-An Introduction

Aman Sharma About 12+ years using Oracle Database Oracle ACE Frequent Contributor to OTN Database forum(Aman….) Oracle Certified Sun Certified Member - AIOUG,IOUG Member - AIOUG North India Chapter team Twitter : @amansharma81 * Oracle Blog : http://blog.aristadba.com * Email: [email protected]

Who Am I?

Page 3: Exadata & Smart Scan-An Introduction

What We Shall Talk About

• Exadata Introduction

• Exadata Hardware & Network Overview

• Exadata Software Overview

• Exadata Key Features

• Smart Scan

Page 4: Exadata & Smart Scan-An Introduction

A Typical Database Server Setup

Page 5: Exadata & Smart Scan-An Introduction

RAC Database Server Setup

Page 6: Exadata & Smart Scan-An Introduction

So What Can Go Wrong?

Page 7: Exadata & Smart Scan-An Introduction

DBA’s Life Can Be Hard!

Users/

Developer

DBA

Manager

Page 8: Exadata & Smart Scan-An Introduction

Say Hello To Exadata

• Engineered machine catering both OLTP and DSS workloads

• Platform for Database Cloud • Extreme Performance &

High Availability • Well balanced platform

eliminating bottlenecks • Robust yet secure & easy to

setup and implement

Page 9: Exadata & Smart Scan-An Introduction

Evolution of Exadata Technology

Exadata Model Year Storage(TB) Flash(TB) CPU(Cores) Memory(TB)

V1 2008 168 NIL 64 256

V2 2009 336 5.3 64 576

X2 2010 504 5.3 96 1152

X3 2012 504 22.4 128 2048

X4 2013 672 44.8 192 4096

Page 10: Exadata & Smart Scan-An Introduction

Exadata-A Sneak Peak Inside

Image courtesy-Google Images

Page 11: Exadata & Smart Scan-An Introduction

Exadata(X4-2) Available Configurations

Page 12: Exadata & Smart Scan-An Introduction

Exadata-Key Features

Hybrid

Columnar

Compression

(HCC)

Smart

Scan

Infiniband

Network

Smart Flash

Cache

IORM Storage

Indexes

Page 13: Exadata & Smart Scan-An Introduction

Exadata- Hardware& Network introduction using Quarter RAC

Database Server

02

Database Server

01

36 Port IB1

36 Port IB2

Page 14: Exadata & Smart Scan-An Introduction

Database

Server 01 IB1(Leaf)

IB3(Spine)

IB2(Leaf)

Ethernet Switch

Client Access

10GbE-Client Access

1GbE-Client Access

Mgmt Access

ILOM

Mgmt Access

ILOM

Page 15: Exadata & Smart Scan-An Introduction

Exadata-Software Overview

ORCL1 +ASM1

LIBCELL

ORCL2 +ASM2

LIBCELL

DB01 DB02

MS RS MS RS MS RS

iDB

CELLSRV CELLSRV CELLSRV

Page 16: Exadata & Smart Scan-An Introduction

Smart(Storage) Scan

Hybrid

Columnar

Compression

(HCC)

Smart

Scan

Infiniband

Network

Smart Flash

Cache

IORM Storage

Indexes

Page 17: Exadata & Smart Scan-An Introduction

Smart Scan/Data Offloading

• Data Offloading makes Exadata “magical”

• Offloading is – Work is offloaded to the Exadata storage(Cells)

– Not related to just SQL statement execution

– Going to optimize others operations i.e. Backups also

• Smart SCAN – Is related specifically to SQL statement processing

– Works for Table/Index Scans, Joins

– Uses the iDB protocol

– Does NOT work all the time

– Is NOT an optimizer feature

Page 18: Exadata & Smart Scan-An Introduction

Smart Scan-From A Little Closer

• Smart Scan works for – Column Offloading

– Predicate Offloading

– Joins(using Bloom Filter)

• Data access must use Direct-Path Read

• To have Smart Scan enabled – Database must have set CELL_OFFLOAD_PROCESSING=TRUE

– Disk Group must have set CELL.SMART_SCAN_CAPABLE=TRUE(FALSE)

• To display Smart Scan in the execution plan, set – CELL_OFFLOAD_PLAN_DISPLAY=AUTO/ALWAYS/NEVER

Page 19: Exadata & Smart Scan-An Introduction

Smart Scan-When It Doesn’t Work

• On a Clustered table

• On an Index Organized Table

• LOB/LONG Column is selected

• More than 255 columns are

referenced in the query

• No predicate clause or column filtering

is used <<partial list>>

Page 20: Exadata & Smart Scan-An Introduction

Smart Scan- Example 1 • SQL> select count(*) from employees where deptartment = ‘SALES'; COUNT(*) ---------- 12849 Elapsed: 00:00:02.14 Execution Plan ---------------------------------------------------------- Plan hash value: 1273666552 ------------------------------------------------------------------------------ | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| ------------------------------------------------------------------------------ | 0 | SELECT STATEMENT | | 1 | 7 | 3136 (1)| | 1 | SORT AGGREGATE | | 1 | 7 | | |* 2 | TABLE ACCESS STORAGE FULL| EMPLOYEES| 255K| 998K| 3136 (1)| ------------------------------------------------------------------------------ Predicate Information (identified by operation id): --------------------------------------------------- 2 - storage(“DEPARTMENT"=‘SALES') filter(“DEPARTMENT"=‘SALES')

Page 21: Exadata & Smart Scan-An Introduction

Smart Scan-Going Beyond Execution Plans

• SQL> SELECT s.name, m.value/1024/1024 MB FROM V$SYSSTAT s, V$MYSTAT m 2 WHERE s.statistic# = m.statistic# AND 3 (s.name LIKE 'physical%total bytes' OR s.name LIKE 'cell phys%' 4 OR s.name LIKE 'cell IO%'); NAME MB

– ---------------------------------------------------------------- ----------

physical read total bytes 131.371 physical write total bytes 0 cell physical IO interconnect bytes .453101219 cell physical IO bytes saved during optimized file creation 0 cell physical IO bytes saved during optimized RMAN file restore 0 cell physical IO bytes eligible for predicate offload 131.367438 cell physical IO bytes saved by storage index 0 cell physical IO bytes sent directly to DB node to balance CPU 0 cell physical IO interconnect bytes returned by smart scan .1512428219 cell IO uncompressed bytes 131.367438 10 rows selected. Elapsed: 00:00:00.17

Page 22: Exadata & Smart Scan-An Introduction

Smart Scan-Example 2

• SQL> select count(*) from employees where deptartment = ‘SALES'; COUNT(*) ---------- 12849 Elapsed: 00:00:06.04 Execution Plan ---------------------------------------------------------- Plan hash value: 1273666552 ------------------------------------------------------------------------------ | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| ------------------------------------------------------------------------------ | 0 | SELECT STATEMENT | | 1 | 7 | 3136 (1)| | 1 | SORT AGGREGATE | | 1 | 7 | | |* 2 | TABLE ACCESS STORAGE FULL| EMPLOYEES| 255K| 998K| 3136 (1)| ------------------------------------------------------------------------------ Predicate Information (identified by operation id): --------------------------------------------------- 2 - storage(“DEPARTMENT"=‘SALES') filter(“DEPARTMENT"=‘SALES')

Page 23: Exadata & Smart Scan-An Introduction

But Is Smart Scan Really Helping?

• SQL> SELECT s.name, m.value/1024/1024 MB FROM V$SYSSTAT s, V$MYSTAT m 2 WHERE s.statistic# = m.statistic# AND 3 (s.name LIKE 'physical%total bytes' OR s.name LIKE 'cell phys%' 4 OR s.name LIKE 'cell IO%'); NAME MB

– ---------------------------------------------------------------- ----------

physical read total bytes 131.371 physical write total bytes 0 cell physical IO interconnect bytes 89.352121219 cell physical IO bytes saved during optimized file creation 0 cell physical IO bytes saved during optimized RMAN file restore 0 cell physical IO bytes eligible for predicate offload 131.367438 cell physical IO bytes saved by storage index 0 cell physical IO bytes sent directly to DB node to balance CPU 0 cell physical IO interconnect bytes returned by smart scan 89.892121219 cell IO uncompressed bytes 131.367438 10 rows selected. Elapsed: 00:00:00.17

Page 24: Exadata & Smart Scan-An Introduction

Smart Scan- When Execution Plan Lies

• SQL> SELECT DISTINCT event, total_waits, 2 time_waited/100 wait_secs, average_wait/100 avg_wait_secs 3 FROM V$SESSION_EVENT e, V$MYSTAT s 4 WHERE event LIKE 'cell%' AND e.sid = s.sid; EVENT TOTAL_WAITS ----------- ----------- WAIT_SECS AVG_WAIT_SECS ---------- ------------- cell smart table scan 65 1.54 .0236 cell single block physical read 305 4.34 .0142

Page 25: Exadata & Smart Scan-An Introduction

When using Smart Scan, Look For

• Transactions happening over the buffers thus resulting in dirty buffers

• Dynamic Sampling

• Migration of rows or Chained rows

• Storage Cell Servers CPU’s are more busy than DB Servers

• If the required data is already in the buffer cache

Page 26: Exadata & Smart Scan-An Introduction

Smart Scan Related Metrics & Wait Events

• For Wait Events – SELECT DISTINCT event, total_waits, time_waited/100 wait_secs,

average_wait/100 avg_wait_secs FROM V$SESSION_EVENT e, V$MYSTAT s WHERE event LIKE 'cell%' AND e.sid = s.sid;

• For Statistics – SELECT s.name, m.value/1024/1024 MB FROM V$SYSSTAT s, V$MYSTAT m

WHERE s.statistic# = m.statistic# AND (s.name LIKE 'physical%total bytes' OR s.name LIKE 'cell phys%' OR s.name LIKE 'cell IO%');

Page 27: Exadata & Smart Scan-An Introduction

• Four Step Phase • Pre-Installation

– Uses Oracle Exadata Deployment Assistant(OEDA) – Customer side task

• Installation, Configuration & Deployment – Uses OneCommand

• Oracle Advance Customer Support(ACS) handles it

• Additional(Misc.) Configuration – For example, deploying EM Cloud Control

• Customer/ACS

• Post-Installation – Monitoring & maintaining of the Exadata machine

• Customer/ACS

Exadata-Deployment & Installation

Page 28: Exadata & Smart Scan-An Introduction

• Latest version available at MOS# 888828.1

• Used by the Advanced Customer Support engineers

• Uses a series of the steps to configure the Exadata machine

• Executes required configuration steps automatically

• Customizable

OneCommand

Page 29: Exadata & Smart Scan-An Introduction

• CELLADMIN user – Uses CELLCLI utility to do the administration tasks – Can manage storage components of the storage server – Default password- welcome

• CELLMONITOR user – For monitoring only – Doesn’t have any administrative privileges – Default password- welcome

• ROOT user – Has all the rights as of CELLADMIN user – Default password-welcome1

Oracle Exadata Machine Storage Server- System Accounts

Page 30: Exadata & Smart Scan-An Introduction

Oracle Exadata Machine Storage Server- Storage Layout

Cell Server

System LUN’s Cell Disks

Page 31: Exadata & Smart Scan-An Introduction

Oracle Exadata Machine Storage Server- Storage Layout

Cell Disk

Grid Disk(s)

Page 32: Exadata & Smart Scan-An Introduction

Grid Disk(s) ASM Disk(s)

Oracle Exadata Machine Storage Server- Storage Layout

Page 33: Exadata & Smart Scan-An Introduction

That’s All For Exadata Today!

• Exadata is an awesome combination of software & hardware

• Exadata does’nt mean that a DBA is not needed

• VM images of Exadata are NOT available

• Exadata is the future!

Page 34: Exadata & Smart Scan-An Introduction

Exadata-Useful Books

Page 35: Exadata & Smart Scan-An Introduction

• http://www.oracle.com/goto/exadata

• http://www.oracle.com/goto/oll

• https://community.oracle.com/community/database/high_availability/exadata

• Information Center: Oracle Exadata Database Machine (1306791.2)

• Information Center: Installing and Configuring Oracle Exadata Database Machine (1347995.2)

• Exadata Database Machine and Exadata Storage Server Supported Versions (888828.1)

• Oracle Exadata Best Practices (757552.1)

• Oracle Database Machine Monitoring Best Practices (1110675.1)

Exadata-Useful MOS#’s & URL’s

Page 36: Exadata & Smart Scan-An Introduction

Thank You