times ten in-memory database when time counts - laszlo ludas

42
<Insert Picture Here> Oracle TimesTen In-Memory Database 11g Oracle In-Memory Database Cache 11g Laszlo Ludas Oracle

Upload: oracle-user-group-estonia

Post on 17-Dec-2014

2.540 views

Category:

Technology


0 download

DESCRIPTION

Presentation from conference "Oracle Day 2011" in Estonia 11.03.2011 Nordic Hotel Forum

TRANSCRIPT

Page 1: Times Ten in-memory database when time counts - Laszlo Ludas

<Insert Picture Here>

Oracle TimesTen In-Memory Database 11g

Oracle In-Memory Database Cache 11g

Laszlo LudasOracle

Page 2: Times Ten in-memory database when time counts - Laszlo Ludas

When You Think “Database…”

RDBMS + network connectivity

SQLSQL

ResultsResultsApplication RDBMS

This may NOT be fast enough for some

response-time-critical applications

Typical solutions: Build a home-grown, application-specific, in-memory buffer ‘cache’…..

Page 3: Times Ten in-memory database when time counts - Laszlo Ludas

But what if you have..

SQL

Results

ApplicationDisk-based RDBMS

• Full capabilities of a relational database

• Memory-optimized speed and latency

• Persistent, recoverable, highly available

• Can also deploy standalone

• Full capabilities of a relational database

• Memory-optimized speed and latency

• Persistent, recoverable, highly available

• Can also deploy standalone

ONE product, an In-Memory Database that is a ‘cache’ with

Page 4: Times Ten in-memory database when time counts - Laszlo Ludas

<Insert Picture Here>

Three Customer Use CasesThree Customer Use Cases

Page 5: Times Ten in-memory database when time counts - Laszlo Ludas

Pre-Paid Rating Engine

TimesTen Usage

� Event capture (real-time balance authentication)

� Balance management (prepaid authentication/charging)

� Dynamic state management (active call/session status)

Performance Metrics

� Prepaid application response time sub 200ms

� 70/30 read/update workload

Number 1 GSM Prepaid System Vendor

2G/2.5G

BSC

MSCBTS

GSM Prepaid

� 70/30 read/update workload

� Scales to 8 million subscribers on one node (server pair)

Configuration

� 4-CPU Servers (plus hot-standby)

� Sun/Solaris platforms

� 8 Gigabytes TimesTen® (DB of record)

Value of TimesTen

� Flexible prepaid charging

� Low maintenance requirements for global deployments

� Non-stop operation & no CDR loss

MSCBTS

Service Data Point (SDP)Service ControlPoint (SCP)

IVR

CustomerAdministration

Page 6: Times Ten in-memory database when time counts - Laszlo Ludas

Electronic Trading

TimesTen Usage

� Event capture (trade orders)

� Order processing (trade matching)

� Event publishing (trader alerts and closed orders)

Performance Metrics

� 300 - 1,000 orders / second

Market Data Trade

Orders Change

Orders Inquiries

TraderAlerts

Confirmations

Status

Externally Routed Orders

Trade Execution

Order Routing

InstitutionalClients Exchanges

Other Trading Venues

Position Keeping

Internal Traders

Configuration

� 2 X 4-CPU Servers (plus hot-standbys)

� Sun/Solaris O/S with C++ applications

� 2 Gigabyte TimesTen®

Value of TimesTen

� Intelligent Order Routing

� Fast order execution

� Trader alerting

Message Bus

Active

Global Order Repository

Active StandbyStandby

ClosedOrders

ExecutionRouting

TimesTen

Internal Trades

Keeping

Oracle

Page 7: Times Ten in-memory database when time counts - Laszlo Ludas

Dynamic Personalisation

Load BalancerLoad Balancer

Hosted CRM Application

TimesTen Usage

� Caching personalization preferences

Performance Metrics

� > 200,000 Subscribers, 14,000 Corporations

� 10 million requests per day

� 250 peak requests per second

Configuration

� 2 X 4-CPU servers (plus hot-standbys)

Hosted CRM Vendor

Worldwide Corporate Subscribers

NA Application Servers

EMEA / APAC Application Servers

Load BalancerLoad Balancer

Active StandbyStandby

� 2 X 4-CPU servers (plus hot-standbys)

� RedHat Linux on Sun Opteron

� Java/JDBC applications

� Oracle back-office RDBMS

� 2 Gigabyte TimesTen®

Value of TimesTen

� Offloading backend RDBMS

� Low latency response

� Replication / availability

� Headroom for substantial growth

Active

4-CPU Cache Server

Master Database

Master Database

48-CPU Database Server

Oracle Oracle

Page 8: Times Ten in-memory database when time counts - Laszlo Ludas

Proven in Real-Time DeploymentsDeployed by Thousands of Companies

Page 9: Times Ten in-memory database when time counts - Laszlo Ludas

<Insert Picture Here>

The TechnologyThe Technology

Page 10: Times Ten in-memory database when time counts - Laszlo Ludas

What is Oracle TimesTen In-Memory Database?

• In-memory RDBMS• Entire database in memory

• Standard SQL with JDBC,

ODBC, OCI, Pro*C, .NET,

PL/SQL

• Compatible with Oracle

Database

Directly-Linked Application

TimesTen Libraries

Client-Server Application

TimesTen Client Lib

Client/Server

JDBC / ODBC / OCI / PLSQL

Database

• Persistent and durable• Transactions with ACID

properties

• Extreme performance• Instantaneous response time

• Very high throughput

• Embeddable Memory-Resident

Database

Checkpoint Files

Log Files

Fast

data

access

* Direct-linked = In-process

Page 11: Times Ten in-memory database when time counts - Laszlo Ludas

Why Is TimesTen So Fast?

• In-Memory Database

• Entire database is always in memory

• Designed and optimized for memory layout

• No buffer cache management overhead

• Shorter code path = better performance

• Application program can link directly to the TimesTen • Application program can link directly to the TimesTen

database

• Database operations executed directly from the application process’

address space

• Eliminate network and inter-process communication overhead

• Achieve extremely low response time (like calling a procedure)

Page 12: Times Ten in-memory database when time counts - Laszlo Ludas

Lightning Fast Response Time

10

12

14

16

millionths

of

a second

1414

Microseconds

Disc based RDBMs are measured in miliseconds (x

1000)

0

2

4

6

8

10

Read a Record Update Transaction

millionths

of

a second

44Microseconds

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

Page 13: Times Ten in-memory database when time counts - Laszlo Ludas

730,696

993,390

1,265,867

800,000

1,000,000

1,200,000

1,400,000

Read Operations Per Second

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

246,623

394,671

0

200,000

400,000

600,000

Read Operations Per Second

1 2 4 6 8

Concurrent Processes

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

Page 14: Times Ten in-memory database when time counts - Laszlo Ludas

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

86,782

141,093

184,126188,532

100000

120000

140000

160000

180000

200000

Transactions per Second

Out of CPU resources in the test system; more

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

56,179

86,782

0

20000

40000

60000

80000

100000

Transactions per Second

1 2 4 6 8

Concurrent Update Processes

more processors

will continue the scaling

Page 15: Times Ten in-memory database when time counts - Laszlo Ludas

Oracle In-Memory Database Cache TimesTen In-Memory Database as a Cache for Oracle Database

• Built using Oracle TimesTen

In-Memory Database

• Full featured RDBMS

• Scale up and scale-out with in-

memory cache grid

• Cache Oracle database

Telco ServicesFinancial Services

CRM, Portal, SaaS,

Customer-facing Applications

Real-TimeBAM & BI

Application

tables into TimesTen• Extremely fast response time

and very high throughput

• Read-only and read/write

cache tables

• Automatic synchronization

with the Oracle database

In-MemoryDatabaseCache

Application In-MemoryDatabaseCache

Application

In-MemoryDatabaseCache

Application

Page 16: Times Ten in-memory database when time counts - Laszlo Ludas

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

Directly-Linked Application

TimesTen Libraries

Client-Server Application

TimesTen Client Lib

Client/Server

JDBC / ODBC / OCI / PLSQLCheckpoint

Files

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

Log Files

Mid-Tier Server

Database Tier

Page 17: Times Ten in-memory database when time counts - Laszlo Ludas

Flexible Caching Definition

Application Transactions

Root 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 PremierUsers

Child

Table

CREATE CACHE GROUP PremierUsers

FROM CUSTOMER (

NAME VARCHAR2(100) NOT NULL,

ADDR VARCHAR2(100) )

WHERE CUSTOMER.ORDER > 500;

• Cached tables are regular

database tables in TimesTen

• Joins/search, insert/update/delete

Page 18: Times Ten in-memory database when time counts - Laszlo Ludas

Read-only CacheFor Frequently Queried Data

• Oracle database is the

‘master’

• Updates in Oracle

automatically refreshed to the

in-memory cache tables

3-node Cache Grid

InIn--MemoryMemory

Application Reads

InIn--MemoryMemoryCache TablesCache Tables

Application Reads

InIn--MemoryMemory

Application Reads

• 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

InIn--MemoryMemoryCache TablesCache Tables

InIn--MemoryMemoryCache TablesCache Tables

Page 19: Times Ten in-memory database when time counts - Laszlo Ludas

Read-Write Cache With Transactional Consistency

• TimesTen database is the

‘master’

• Transactions executed in

TimesTen

• Committed transactions

3-node Cache Grid

InIn--MemoryMemory

Application Transactions

InIn--MemoryMemoryCache TablesCache Tables

Application Transactions

InIn--MemoryMemory

Application Transactions

• Committed transactions

write-through to Oracle

database

• Asynchronous write-through

yields better response time and

throughput

Automatic Synchronization

InIn--MemoryMemoryCache TablesCache Tables

InIn--MemoryMemoryCache TablesCache Tables

Page 20: Times Ten in-memory database when time counts - Laszlo Ludas

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

communication between grid

nodes

Incremental scalabilityHigh

availability

In-MemoryDatabaseCache

Application

In-MemoryDatabaseCache

Application

In-MemoryDatabaseCache

Application

Transactional consistency

In-MemoryDatabaseCache

Application

Synchronized with Oracle database

In-MemoryDatabaseCache

Application

Online addition (and removal) of cache nodes

Page 21: Times Ten in-memory database when time counts - Laszlo Ludas

6487

10114

58366104

6,000

8,000

10,000

12,000

Response Tim

e in M

icroseconds

Oracle Oracle +In-Memory Database Cache

Significant Response Time Improvement

In-Memory Database Cache + Oracle Database

128 100

210518501848

2018665441680

2,000

4,000

Delete C

all Fw

d

Selec

t Access D

ata

Selec

t Base D

ata

Selec

t New Dest

Insert C

all Fw

d

Update Subscribe

r

Update Location

Response Tim

e in M

icroseconds

Response time improvement for a sample application before and after using In-Memory Database Cache

Page 22: Times Ten in-memory database when time counts - Laszlo Ludas

<Insert Picture Here>

High Availability

and and

Maximum Availability Architecture

Page 23: Times Ten in-memory database when time counts - Laszlo Ludas

Updatable Cache Replication

• Application transactions

executed on Active node

• Committed transactions

replicated to Standby

• Standby propagates committed

transactions to Oracle database

• Standby database is available

Hot Standby available for

readsApplication Transactions

Active

InIn--MemoryMemoryCache TablesCache Tables

Standby

InIn--MemoryMemoryCache TablesCache Tables

• Standby database is available

for reads

• Continue execution of

transactions even if connection

to Oracle database is down

• Enable instant failover and no

data loss

Cache Write-through

Tx logs

on disk

Tx logs

on disk

Page 24: Times Ten in-memory database when time counts - Laszlo Ludas

Read-only Cache Replication

• Updates from Oracle database incrementally refreshed to Active

• Active replicates updates to Standby

• Standby database is available for reads• Read from both Active and

Hot Standby also

available for reads

Queries on read-only cache

Active

InIn--MemoryMemoryCache TablesCache Tables

Standby

InIn--MemoryMemoryCache TablesCache Tables

• Read from both Active and Standby

• Application continues to read from Cache database even when connection to Oracle database is down

• Enable instant failover without reloading the entire cache

Cacherefresh

Tx logs

on diskTx logs

on disk

Page 25: Times Ten in-memory database when time counts - Laszlo Ludas

Integration with Oracle RACCross-tier High Availability

• Automatic recovery from

Oracle Database RAC node

failures using TAF and FAN

• Automatic reconnection to the

cluster

• Automatic resumption of data

Application Transactions

Hot Standby for reads

In-MemoryCache Tables

Active Standby

In-MemoryCache Tables

• Automatic resumption of data

refresh from Oracle to

TimesTen

• Automatic resumption

transaction propagation from

TimesTen to Oracle

• No loss of transactions

Page 26: Times Ten in-memory database when time counts - Laszlo Ludas

Integration with Oracle ClusterwareAutomated Management, Monitoring and Failover

Oracle Clusterware

• Manages TimesTen / IMDB

Cache processes

• Monitors and detects failure of

• Nodes

• TimesTen / IMDB Cache

In-MemoryDatabaseCacheIn-MemoryDatabaseCacheIn-MemoryDatabaseCache

In-MemoryDatabaseCache

Application

In-MemoryDatabaseCache

Application

Active Standby

Spare Nodes

• TimesTen / IMDB Cache

processes

• Applications

• Manages automatic failover

and assignment of new roles

• Recovers automatically,

including provisioning of spare

nodes

SharedStorage

For Clusterware

Page 27: Times Ten in-memory database when time counts - Laszlo Ludas

Integration with Oracle Data GuardOracle Maximum Availability Architecture

• Support Data Guard

synchronous

physical standby

• Failover

• Switchover

• Rolling upgrade

InIn--Memory Database CacheMemory Database Cache

Cache

tables

BusinessApplications

Cache

tables

BusinessApplications

Real Application ClustersReal Application Clusters Standby Oracle DatabaseStandby Oracle Database

Data Guard

• Rolling upgrade

Page 28: Times Ten in-memory database when time counts - Laszlo Ludas

<Insert Picture Here>

Oracle TimesTen

APIs and ToolsAPIs and Tools

Page 29: Times Ten in-memory database when time counts - Laszlo Ludas

TimesTen API Infrastructure

All TimesTen APIs are available through direct-linked and client/server connections

ODBC is TimesTen’s native API

PL/SQL code can be called from ODBC, JDBC, OCI, and Pro*C interfaces

Application

Pro*C

ttClasses (C++)JDBC

ODBC

TimesTen Database Engine

SQL Engine

Pro*C

OCI

PL/SQL Engine

Page 30: Times Ten in-memory database when time counts - Laszlo Ludas

Comprehensive J2EE Support

JDBC EJB

TimesTen JDBC DriverTimesTen JDBC Driver

Page 31: Times Ten in-memory database when time counts - Laszlo Ludas

TimesTen Extension in SQL Developer 2.1

• In-Memory Database Cache

• Create/drop/alter cache groups

• Load/unload, flush, refresh cache data

• PL/SQL support

• Create/Replace/Drop, Edit, Compile, Run, and Export

procedures/functions/packages

• Show SQL execution plans• Show SQL execution plans

• New SQL objects: bitmap index,

MV log, ROWID

• Support TimesTen 7.0.x and

11.2.1.x releases

• Available with SQL Developer 2.1

Page 32: Times Ten in-memory database when time counts - Laszlo Ludas

TimesTen System Monitoring Tool

An Oracle Enterprise Manager Plug-In

• Monitor key

performance metrics

• User defined

thresholds for alerts

and notifications

• Out-of-the-box reports • Out-of-the-box reports

for TimesTen metrics

• Create custom reports

with graphical report

wizard

• Low overhead

Page 33: Times Ten in-memory database when time counts - Laszlo Ludas

<Insert Picture Here>

Oracle TimesTen

Sample Customer Use CasesSample Customer Use Cases

Page 34: Times Ten in-memory database when time counts - Laszlo Ludas

Proven in Real-Time Deployments

Deployed by Thousands of Companies

Page 35: Times Ten in-memory database when time counts - Laszlo Ludas

250

300

350

Transaction Tim

e in m

illiseconds

German Stock Exchange

Missed response time target of 80 milliseconds

SLA Target < 80ms

BEFORE Oracle In-Memory Database Cache

0

50

100

150

200

250

Transaction Tim

e in m

illiseconds

SLA Target < 80ms

Trading Day Intervals

Page 36: Times Ten in-memory database when time counts - Laszlo Ludas

250

300

350

Transaction Tim

e in m

illiseconds

German Stock Exchange

Meeting response time target of 80 milliseconds

SLA Target < 80ms

AFTER Oracle In-Memory Database Cache

0

50

100

150

200

250

Transaction Tim

e in m

illiseconds

SLA Target < 80ms

Trading Day Intervals

Page 37: Times Ten in-memory database when time counts - Laszlo Ludas

NYFIX - Order Matching Market Place

Application

Dispatcher

ACTIVE

Dispatcher

Application

STANDBY

Message Bus

Clients

Orders

SUBSCRIBER on DR Site

Remote

Data Center

Performance• Low latency

• High throughput

• Scalable

Reliability

Dispatcher

Application

DR Subscriber

Order Repository

Service Desk App

InIn--MemoryMemory

Cache TablesCache Tables

Application

InIn--MemoryMemory

Cache TablesCache Tables

ApplicationReliability• Guaranteed transaction model

• High availability

• Fast failover

• No data loss

InIn--MemoryMemory

Cache TablesCache Tables

Application

Page 38: Times Ten in-memory database when time counts - Laszlo Ludas

Improve Response Time and ReliabilityWeb Ads Delivery System

Web Users

1. Users surf the web

2. Served relevant ads

3. User click on ad

Web Server Farm with TimesTen

In-Memory

Database

Application

In-Memory

Database

Application

In-Memory

Database

Application

Business Challenges

• Inadequate performance

for growth

• Can’t meet SLA <100 ms

• High IT maintenance

with TimesTen IMDB Cache

Cache

• New ads + metadata

• Served and Clicked ad stats

New Ads and biz rules

Advertisers, Publishers

RAC

Database

Cache

Database

Cache

Database

CacheOracle TimesTen Solution

• Response time meets SLA

• Lower cost*

• Ability to scale-out

• Better reliability

* Replaced hundreds of Microsoft IIS and SQL Servers with 48 TimesTen caches and one Oracle RAC system

Page 39: Times Ten in-memory database when time counts - Laszlo Ludas

Dynamic Database Caching

Call Center Application Example

• Transparent loading of customer data from Oracle

Database• Load customer data dynamically

at the time of the call

• Improve database responsiveness for subsequent responsiveness for subsequent

operations

• Automatic data aging • Remove old or least-recently-used data to make room for new

callers

Page 40: Times Ten in-memory database when time counts - Laszlo Ludas

Sliding Window Caching

Cache data from a specific time window for real-time management, monitoring and optimization

• Cache 5 days of shipments for real-time delivery status

• Cache last 15 minutes of RFID data for real-time WEDTUEMON RFID data for real-time process monitoring

• Cache last 90 days of ordersto speed searching by call agents or self-service portals

• Cache last 30 days of market data for analytics & simulation

WEDTUEMON

Page 41: Times Ten in-memory database when time counts - Laszlo Ludas

For More Information

Oracle TimesTen Product Center on OTN:

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

• Technology white papers• Technology white papers

• Quick Start Guide and tutorials

• Discussion Forum

• And more..

Page 42: Times Ten in-memory database when time counts - Laszlo Ludas