4. (mjk) extreme performance 2

27
<Insert Picture Here>

Upload: doina-draganescu

Post on 20-May-2015

844 views

Category:

Technology


1 download

DESCRIPTION

Michal Kostrzewa-Extreme Performance

TRANSCRIPT

Page 1: 4. (mjk) extreme performance 2

<Insert Picture Here>

Page 2: 4. (mjk) extreme performance 2

<Insert Picture Here>

Oracle Database Extreme Performance

Michał Jerzy Kostrzewa

EECIS Database Director

[email protected]

Page 3: 4. (mjk) extreme performance 2

Application and Database PerformanceGeneral Approaches Used

• Tune the database• Query optimization and database schema

• Handcode or tool-based (Oracle Database 11g)

• Rely on hardware• Add or upgrade processors, disk storage

• Get bigger hardware (scale up)

• Get more hardware (scale out)

• Rely on software• Specialized tools for various data processing needs

• DWH (big data: partitioning, query parallelism, materialized views)

• Reporting (comparatitive: OLAP)

• Analytical (in depth pattern analysis: Data Mining)

• What about transactional processing?

Page 4: 4. (mjk) extreme performance 2

• Best Machine for Data Warehousing

• Best Machine for OLTP

• Best Machine for Database Consolidation

• Unique Architecture Makes it

• Fastest, Lowest Cost

Exadata Database MachineBest Platform to Run the Oracle Database

Page 5: 4. (mjk) extreme performance 2

Extreme performanceUsing server and storage grids

Grid Control

In-Memory Database Cache

Automatic Storage Management

Real Application Clusters

© 2010 Oracle Corporation

Page 6: 4. (mjk) extreme performance 2

• Automates storage management of storage devices

• Online addition and migration of storage (+rebalancing)

• Advanced data striping, layout optimizations for max I/O performance

• Mirroring protects from disk failure

Automatic Storage ManagementVirtualize and share storage resources

Page 7: 4. (mjk) extreme performance 2

Extreme performanceUsing server and storage grids

Grid Control

In-Memory Database Cache

Automatic Storage Management

Real Application Clusters

© 2010 Oracle Corporation

Page 8: 4. (mjk) extreme performance 2

• Run all databases for all applications on shared platform

• Highly available and scalable

• No changes required to applications

Real Application ClustersVirtualize database servers into a shared platform

© 2010 Oracle Corporation

SALES

Page 9: 4. (mjk) extreme performance 2

• Resource Manager allocates CPU resources

– Also I/O usage on Exadata

• Instance caging allocates cores per instance

• According to Service Level Agreement

Workload and Resource ManagementDatabases run as Services across shared platform

© 2010 Oracle Corporation

Page 10: 4. (mjk) extreme performance 2

Extreme performanceUsing server and storage grids

Grid Control

In-Memory Database Cache

Automatic Storage Management

Real Application Clusters

© 2010 Oracle Corporation

Page 11: 4. (mjk) extreme performance 2

Examples

• Fraud detection

• Order matching

• Compliance

• Provisioning

• Authentication

• Authorization

• Personalization

• CRM

• BAM

• Real-time Billing

• …

Needs of the Real-Time EnterpriseBlazingly Fast Response Competitive Advantage

NEW CUSTOMER

SIGN-UP

WEB

SELF-CARE

MGMT

DASHBOARD

MOBILE DATA

SERVICES

PROCESS AN

ORDER

SCHEDULE CALCULATE BILLVERIFY CREDIT & TERMSCHECK ADDRESS

ACTIVATE A NEW SUBSCRIBER MONITOR FOR CRITICAL EVENTS

Page 12: 4. (mjk) extreme performance 2

Tuning Application PerformanceGeneral Approaches Used

• Implement some ‘cache’ in the application

• Challenges for application specific ‘caches’

• Limited functionality, typically not share-able with other application

• SQL query language typically not available

• Higher application maintenance cost

• No support for HA (high availability)

Performance and Reliability are must have requirements

Page 13: 4. (mjk) extreme performance 2

What is Oracle TimesTen In-Memory Database?

• In-memory RDBMS• Entire database in memory

• Standard SQL with JDBC,

ODBC, OCI, Pro*C, PL/SQL

• Compatible with Oracle

Database

• Persistent and durable• Transactions with ACID

properties

• Extreme performance• Instantaneous response time

• Very high throughput

Directly-Linked Application

TimesTen Libraries

Client-Server Application

TimesTen Client Lib

Memory-Resident

Database

Client/Server

JDBC / ODBC / OCI / PLSQL

Checkpoint Files

Log Files

Fast

data

access

Page 14: 4. (mjk) extreme performance 2

Lightning Fast Response Time

0

2

4

6

8

10

12

14

16

Read a Record Update Transaction

millionths

of

a second

4

millionths

of

a second

14

Mic

rose

co

nd

s

Oracle TimesTen In-Memory Database 11g - Intel Xeon 3.0 Ghz 64-bit Oracle Enterprise Linux

Page 15: 4. (mjk) extreme performance 2

246,623

394,671

730,696

993,390

1,265,867

0

200,000

400,000

600,000

800,000

1,000,000

1,200,000

1,400,000

Rea

d O

pe

rati

on

s P

er

Se

co

nd

1 2 4 6 8

Concurrent Processes

Linear Throughput Scaling – Read ThroughputScale Up on Multi-Processor / Multi-Core Hardware

Oracle TimesTen In-Memory Database 11g AMD64 Dual-Core 1.8GHz, 4 Processors, 16GB RAM; OEL 4.0

Page 16: 4. (mjk) extreme performance 2

Linear Throughput Scaling – Update ThroughputScale Up on Multi-Processor / Multi-Core Hardware

Oracle TimesTen In-Memory Database 11g AMD64 Dual-Core 1.8GHz, 4 Processors, 16GB RAM; OEL 4.0

56,179

86,782

141,093

184,126188,532

0

20000

40000

60000

80000

100000

120000

140000

160000

180000

200000

Tra

nsa

cti

on

s p

er

Seco

nd

1 2 4 6 8

Concurrent Update Processes

Out of CPU resources in the test system;

more processors

will continue

the scaling

Page 17: 4. (mjk) extreme performance 2

TimesTen In-Memory DatabasePersistent, Recoverable, and Highly Availability

• Persistent and durable

• Database persisted to disk

• Transaction logs persisted to

disk

• Highly-available via

transactional replication

• Active-standby plus read-only

subscribers

• Asynchronous, Synchronous

• Online upgrade, cross versions

replication

• Clusterware integration

Active Standby

In-Memory

Database

Tx Logs

Checkpoints

Direct-linkedApplications

C/S

Client-Server

* Direct-linked = In-process

Client-Server

TimesTen Client lib

Application

TimesTen Client lib

Application

TimesTen Client

Application

In-Memory

Database

Direct-linkedApplications

Tx Logs

Checkpoints

C/S

ApplicationApplication

Application

Read-only Subscribers

Page 18: 4. (mjk) extreme performance 2

In-Memory Database Cache An Oracle Database Option

• Built using Oracle TimesTen

In-Memory Database

• Full feature RDBMS

• Scale up and scale-out with in-

memory cache grid

• Cache Oracle database

tables in the application-tier• Extremely fast response time

and very high throughput

• Read-only and read/write

cache tables

• Automatic synchronization

with the Oracle database

Telco ServicesFinancial Services

CRM, Portal, SaaS,

Customer-facing Applications

Real-TimeBAM & BI

In-MemoryDatabase

Cache

Application In-MemoryDatabase

Cache

Application

In-MemoryDatabase

Cache

Application

Page 19: 4. (mjk) extreme performance 2

What is Oracle In-Memory Database Cache?

• Cache subset of Oracle

Database tables in application-

tier

• Applications access cache tables

like regular relational tables• Standard SQL with JDBC, ODP.NET,

ODBC, OCI, Pro*C, PL/SQL

• Read-only and read/write cache

tables• Transactions with ACID properties

• Persistent and durable

• Automatic data synchronization

with the Oracle database

Directly-Linked Application

TimesTen Libraries

Client-Server Application

TimesTen Client Lib

Client/Server

JDBC / ODBC / OCI / PLSQLCheckpoint

Files

Log Files

Mid-Tier Server

Database Tier

Page 20: 4. (mjk) extreme performance 2

In-Memory Database Cache

Flexible Caching Definition

Application Transactions

Root Table

Child

Table

Child

Table

Child

Table

Cache Groups • Cache Group describes the

data in the Oracle Database to

cache

• Groups of related tables

• All or subset of rows and columns

• Defined via SQL WHERE clause

CREATE CACHE GROUP

WHERE <predicate>

• Cached tables are regular

database tables in TimesTen

• Joins/search, insert/update/delete

Page 21: 4. (mjk) extreme performance 2

In-Memory Database Cache Updatable Cache with Transactional Consistency

• TimesTen database is the

‘master’

• Transactions executed in

TimesTen

• Committed transactions

write-through to Oracle

database

• Asynchronous write-through

yields better response time

and throughput

Automatic Synchronization

3-node Cache Grid

In-MemoryCache Tables

Application Transactions

In-MemoryCache Tables

Application Transactions

In-MemoryCache Tables

Application Transactions

Page 22: 4. (mjk) extreme performance 2

In-Memory Database Cache Read-only Cache for Frequently Queried Data

• Oracle database is the

‘master’

• Updates in Oracle

automatically refreshed to the

in-memory cache tables

• Refresh frequency (interval)

configurable

• Updates to read-only cache

tables disallowed

• May use pass-through to directly

update the Oracle databaseUpdates to

Oracle Server

Automatic Synchronization

3-node Cache Grid

In-MemoryCache Tables

Application Reads

In-MemoryCache Tables

Application Reads

In-MemoryCache Tables

Application Reads

Page 23: 4. (mjk) extreme performance 2

In-Memory Database Cache Flexible Caching Options

• Different caches may all coexist

• Pre-loaded read-only cache

• Pre-loaded updatable cache

• Dynamic read / write cache

• Sliding window cache

• Flexible In-memory database caching

• Locality optimized for consistent response time

• Globally shared across all nodes for application transparency

• Scale-out horizontally with processing capacity

• Transactional consistency across cache nodes and

synchronization with Oracle Database

Page 24: 4. (mjk) extreme performance 2

In-Memory Database Cache GridScaling with Business Growth Peer-to-peer

communication between grid

nodes

Incremental scalabilityHigh

availability

In-MemoryDatabase

Cache

Application

In-MemoryDatabase

Cache

Application

In-MemoryDatabase

Cache

Application

In-MemoryDatabase

Cache

Application

Synchronized with Oracle database

Transactional consistency

In-MemoryDatabase

Cache

Application

Online addition (and removal) of

cache nodes

Page 25: 4. (mjk) extreme performance 2

In-Memory Database Cache Tooling aspects

• IMDB/Timesten connectivity

• JDBC, ODBC, New in 11g: PL/SQL, OCI, Pro*C Support

• Planned for CY2010: ODP.NET data provider, PHP

• Compatibility - Minimal application changes:

• PL/SQL engine in TimesTen, same language, subset of packages

• OCI Support, Identical API signatures as Oracle Db, subset functions

• TimesTen Extension in SQL Developer 2.1

• Managing cache groups, Load/unload/refresh cache data, PL/SQL

support, SQL execution plans

• TimesTen System Monitoring Tool (EM)

• Monitoring, user defined thresholds for alerts and notifications, out-of-

the-box reports, custom reports GUI

Page 26: 4. (mjk) extreme performance 2

For More Information

Oracle TimesTen/IMDB Product Center on OTN:

http://oracle.com/technology/products/timesten

• Technology white papers

• Quick Start Guide and tutorials

• Discussion Forum

• And more..

Page 27: 4. (mjk) extreme performance 2

27