<Insert Picture Here> Performance, performance, performance!!! John Abrahams Technology Sales Consultant Oracle Nederland
Important Trends Highest QoS for all applications 24 x 7 availability Predictable Service Levels Databases rapidly grow in size
Agenda Automated Performance Management Automatic Workload Management Large Databases Oracle ILM Oracle DWH Balanced Configurations When milliseconds counts - Oracle TimesTen Inmemory database
Agenda Automated Performance Management Automatic Workload Management Large Databases Oracle ILM Oracle DWH Balanced Configurations When milliseconds counts - Oracle TimesTen Inmemory database
Traditional Performance Tuning Performance and Workload Data Capture System Statistics, Wait Information, SQL Statistics, etc. Analysis What types of operations database is spending most time on? Which resources is the database bottlenecked on? What is causing these bottlenecks? What can be done to resolve the problem? Problem Resolution If multiple problems identified, which is most critical? How much performance gain expected if is solution implemented? Oracle Database 10g Automates All Steps to Addresses Main Issues & Challenges
Automatic Workload Repository (AWR) Built-in Workload and Performance Statistics Repository Within Database Part of Oracle Database 10g Intelligent Self-Management Infrastructure Automatically Captures Workload Data Every 60 minutes, or manually, saves data for 7 days by default Resides in Newly Introduced SYSAUX Tablespace Server Automatically Manages Space Requirements Old Data is automatically purged Stores different classes of data: BASE STATISTICS e.g. physical reads SQL STATISTICS e.g. disk reads (per sql stmt) METRICS e.g. physical reads / sec ACTIVE SESSION HISTORY
Proactive Performance Tuning High-load SQL SQL Advisor Snapshots in Automatic Workload Repository Self-Diagnostic Automatic Diagnostic Engine inside Engine DB IO / CPU issues System Resource Advice RAC issues Network + DB config Advice Automatic Database Diagnostic Monitor (ADDM) Self-Diagnostic Engine In the Database Integrate all components together Automatically provides database-wide performance diagnostic On-Demand Performance Analysis Provides impact and benefit analysis, non problem areas Runs proactively out of the box, reactively when required
Manual Tuning Challenges Requires expertise in several domains SQL optimization: adjust the execution plan Access design: provide fast data access SQL design: use appropriate SQL constructs Time consuming Each SQL statement is unique Potentially large number of statements to tune Never ending task SQL workload always evolving Plan regressions
Oracle 10g Automates the SQL Tuning Process I can do it for you! ADDM High-Load SQL DBA SQL Workload SQL Tuning Advisor
Automatic Tuning Optimizer (ATO) It is the query optimizer running in tuning mode Uses same plan generation process but performs additional steps that require lot more time It performs verification steps To validate statistics and its own estimates Uses dynamic sampling and partial executions to validate It performs exploratory steps To investigate the use of new indexes that could provide significant speed-up To analyze SQL constructs that led to expensive plan operators
Automatic SQL Tuning Overview Automatic Tuning Optimizer Statistics Analysis SQL Tuning Advisor SQL Tuning Recommendations Gather Missing or Stale Statistics SQL Profiling Create a SQL Profile Access Path Analysis Add Missing Indexes DBA SQL Structure Analysis Modify SQL Constructs
SQL Tuning Usage Scenarios Automatic Selection AWR ADDM High-load SQL SQL Sources Manual Selection AWR Cursor Cache Filter / Rank SQL Tuning Set (STS) SQL Tuning Advisor User-defined
SQL Tuning Set (STS) Motivation Enable user to tune a custom set of SQL statements It is a new object in Oracle10g for capturing SQL workload It stores SQL statements along with.. Execution context: parsing user, bind values, etc. Execution statistics: buffer gets, CPU time, elapse time, number of executions, etc. It is created from a SQL source Sources: AWR, cursor cache, user-defined SQL workload, another STS
SQL Tuning Set Benefits Allows selective, on-demand, custom SQL workload tuning It simplifies tuning of large number of SQL statements It is persistent Provides a common infrastructure for dealing with SQL workloads Can be used as a source for different tuning tasks
SQL Source: ADDM Finding
SQL Source: Top SQL
SQL Tuning Recommendations Overview
Implement Recommendations
SQLAccess Advisor Workload SQL Access Advisor Indexes Materialized Views Materialized View Logs
Usage Scenarios Filter Options Cursor Cache User Defined Hypothetical Workload STS SQL Access Advisor
Conclusion SQL Tuning and Access Advisors automate SQL tuning Provide targeted, quick, easy tuning advice Fully integrated with CBO Easy, user-friendly interface
Agenda Automated Performance Management Automatic Workload Management Large Databases Oracle ILM Oracle DWH Balanced Configurations When milliseconds counts - Oracle TimesTen Inmemory database
Oracle Real Application Clusters 10g Automatic Workload Management Financials HR DSS AWM is an abstraction that customers use to divide work into logical workloads. Services is the first stage in AWM Each service represents a workload with common function common service level thresholds common priority (common resource footprint) e.g. mail server imap, postman, garbage collector, monitor
Service Distribution Example Node-1 Node-2 Node-3 Node-4 Critical-1 Critical-2 Critical-3 Critical-4 Medium 1 Medium 2 Low Batch Using RAC Automatic Workload Management
Sample Work Sheet Service Usage Priority Response time (sec) warning / critical Preferred Instances Available Instances ERP Client service 1 0.5, 0.75 RAC01, RAC02 RAC03, RAC04 CRM Client service 2 0.5, 1.0 RAC03, RAC04 RAC01, RAC02 SELF_SERVIC E Client service 2 1.0, 1.5 RAC01, RAC02, RAC03, RAC04 - HOT_BATCH Job scheduler 3 RAC01 RAC02, RAC03, RAC04 STD_BATCH Job scheduler 4 RAC01, RAC02, RAC03, RAC04 -
Creating Services Services are maintained in the data dictionary Each service has attributes globally unique name service thresholds (response time, CPU/service) resource consumer group (ratios or priorities) HA business rules are maintained in OCR preferred configuration for availability TAF policy
Creating Services Oracle 10g single instance DBMS_SERVICE to create and administer services Oracle 10g RAC DBCA, NETCA or SRVCTL to create and administer services EM or PL/SQL to create thresholds, consumer groups, job classes, detail monitoring, traces
Database Resource Manager DBMS_RESOURCE_MANAGER. SET_CONSUMER_GROUP_MAPPING Automatically sets consumer groups for services at connect time. alter session to change consumer groups within service Using ratios e.g. two-thirds of resource to payroll and one-third to CRM. Using priorities satisfy the highest priority services first, followed by the next priority services, and so on.
Services are a unit for performance A new level dimension for performance tuning workloads are visible and measurable tuning by service and SQL replaces session and SQL in most systems where sessions are shared. Performance measures for real transactions Alerts and actions when performance goals are violated
Service Thresholds and Alerts DBMS_SERVER_ALERT.SET_THRESHOLD SERVICE_ELAPSED_TIME SERVICE_CPU_TIME Warning and critical levels for observed periods Import from EM baselines Comparison of response time against accepted minimum levels a desire for the wall clock time to be, at most, a certain value.
30 service, module, action statistics user calls DB time response time DB CPU CPU/service parse count (total) parse time elapsed parse time cpu execute count sql execute elapsed time sql execute cpu time opened cursors cumulative session logical reads physical reads physical writes redo size user commits workarea executions - optimal workarea executions - onepass workarea executions - multipass session cursor cache hits user rollbacks db block changes gc cr blocks received gc cr block receive time gc current blocks received gc current block receive time cluster wait time concurrency wait time application wait time user I/O wait time
Automatic Workload Management Provides Visibility 30 25 20 15 10 D C B A 5 0 9 10 11 12 13 14 15 16 17 18
Automatic Workload Management Provides Visibility
AWR Automatically Measures Service AWR measures response time, resource used Automatically for work done in every service AWR monitors thresholds, sends AWR alerts response time, cpu used maintains runtime history every 30 minutes Statistics collection and tracing are HA persistent for service location / instance restart. enabled and disabled globally for RAC.
Getting the best out of Oracle - Configuration Plan your services application to service, data range to service global name, HA configuration, priority, response time Use service: not SID, not Instance, not Host Use service to connect Use virtual IP for database access Use cluster alias to eliminate address lists. Use service for jobs and PQ.
Agenda Automated Performance Management Automatic Workload Management Large Databases Oracle ILM Oracle DWH Balanced Configurations When milliseconds counts - Oracle TimesTen Inmemory database
Information Lifecycle Management The policies, processes, practices, and tools used to align the business value of information with the most appropriate and cost effective IT infrastructure from the time information is conceived through its final disposition. Storage Networking Industry Association (SNIA) Data Management Forum Active Data Less Active Data Historical Data
Oracle ILM Oracle Oracle Database 10g with Partitioning Option Active Applications Desktop Apps Less Active Portals & Browsers ISV Apps Historical Low Cost Can use low cost storage to reduce the cost of retaining data Transparent to Applications Applications are unchanged Enforceable Compliance Policies Sophisticated techniques to define and enforce data policies Fine Grained Control Lifecycle of groups of business data is managed down to individual rows Hardware Independent
Implementing Oracle ILM Define Data Classes Create Storage Tiers for the Data Classes Define and Enforce Compliance Policies Create Data Access and Migration Policies
Implementing Oracle ILM Oracle ILM Assistant Manages the ILM environment Define Lifecycle Definitions Illustrates Storage Costs & Savings Manage Compliance & Security Calendar of Events Simulates the impact of partitioning on a table Advises how to Partition a Table Generates Scripts to move data when required
Separate Data by Class Apply different policies to different classes of data To treat data classes differently, you must physically separate data by class Data classes must be mapped to data attributes e.g. Order date Table Partitions enable you to separate data by data attribute Can manage each class (Partition) as a unit Store, move, archive, search, query Partitions are transparent to the application Use ILM Assistant to define a Lifecycle All Orders Q1 Orders Q2 Orders Q3 Orders Q4 Orders Older Orders
Lifecycle Definition
Create Physical Storage Tiers Create separate storage areas for high performance and low cost storage High Performance Storage Tier uses High performance storage arrays s optimised for throughput Low Cost Storage Tier uses Modular arrays for reduced cost Large capacity commodity ATA disks High Performance Storage Tier Low Cost Storage Tier
Automatic Storage Management (ASM) ASM & ILM Partitions are located in different diskgroups Each tier uses ASM for load balancing group H group L group A Jan Feb Mar 2005 2004 1997-2001 High Performance Tier 2003 2002 Online Archive Tier Low Cost Tier
Online Archive Storage Tier The Online Archive Storage Tier is Very large Low Activity Read-only or Read-mostly Store in low cost storage tier Information is still online and always readable No delay when data needed, always available Storage cost is almost same as tape Leverage usage patterns to further reduce size and cost Defragment and Compress Declare read-only
Assign Classes/Partitions to Storage Tiers All Orders Q1 Orders Q2 Orders Q3 Orders Active High Performance Storage Tier Less Active Low Cost Storage Tier Q4 Orders Older Orders Historical Online Archive Storage Tier
Enforcing Compliance Policies Oracle Applications Desktop Apps Portals & Browsers Compliance Policy Oracle Database 10g with Partitioning Option ISV Apps Oracle ILM provides an intelligent central location to store data and enforce compliance data policies Policies are customisable for businesses-specific needs Centralised policy definition and enforcement Flexibility to respond to changing regulations
Agenda Automated Performance Management Automatic Workload Management Large Databases Oracle ILM Oracle DWH Balanced Configurations When milliseconds counts - Oracle TimesTen Inmemory database
DW Configuration Problem: I/O An unbalanced configuration 100% Possible Efficiency Database CPUs Memory Actuators LUNs s Raid < 50% Achieved Efficiency A balanced configuration 100% Possible Efficiency Database CPUs Memory Actuators LUNs s Raid 100% Achieved Efficiency
Oracle Information Appliance Foundation What is it? Documented balanced system configurations for pre-defined DWBI environments Starting point for sizing a system Balanced system consists of CPU, memory, I/O, and cabling Sizing factors are raw data, avg. concurrent users and workload complexity Leverages scalable, modular components Enables incremental growth (scale-in, scale-out) Mitigates implementation risks Different OS and HW configurations Different workload configurations Price/Performance versus I/O intensive
Oracle Information Appliance Foundation What is it? Balanced system configurations are built on modular balanced building blocks Add building blocks as you grow Each building block is a balanced unit s s s s s Different building blocks provide guided choices Many small nodes versus few large nodes
What is a balanced unit? HBA1 HBA2 HBA1 HBA2 FC-Switch1 HBA1 HBA2 HBA1 HBA2 FC-Switch2 The weakest link defines the throughput Each building block is a balanced unit Components to consider: CPU: Quantity and speed HBA (Host Bus Adapter): Quantity and speed Switch speed Controller: Quantity and speed : Quantity and speed Array 1 Array 2 Array 3 Array 4 Array 5 Array 6 Array 7 Array 8
Grid Components Rough Sizing numbers Throughput Performance Component theory (Bit/s) maximal Byte/s HBA 1/2Gbit/s 100/200 Mbytes/s 16 Port Switch 8 x 2Gbit/s 1600 Mbytes/s Fibre Channel 2Gbit/s 200 Mbytes/s Controller 2Gbit/s 200 Mbytes/s GigE NIC 1Gbit/s 80 Mbytes/s Infiniband 10Gbit/s 890 Mbytes/s CPU 200MB/s * 2Gbit based
Sample Balanced Unit HBA1 HBA2 HBA1 HBA2 HBA1 HBA2 HBA1 HBA2 FC-Switch1 FC-Switch2 Each machine has 2 CPUs All four servers drive about 2 * 200MB/s * 4 = 1600 The MB/s weakest link defines the throughput Each building block is a balanced unit Components to consider: CPU: Quantity and speed HBA (Host Bus Adapter): Quantity and speed Switch speed Controller: Quantity and speed : Quantity and speed Array 1 Array 2 Array 3 Array 4 Array 5 Array 6 Array 7 Array 8
Sample Balanced Unit HBA1 HBA2 HBA1 HBA2 HBA1 HBA2 HBA1 HBA2 FC-Switch1 FC-Switch2 Each machine has 2 CPUs All four servers drive about 2 * 200MB/s * 4 = 1600 The MB/s weakest link defines the throughput Each building block is a Each balanced machine has unit2 Gb HBAs All 8 HBAs can sustain CPU: 8 * 200MB/s Quantity = 1600 and MB/s speed HBA (Host Bus Adapter): Quantity and speed Switch speed Controller: Quantity and speed : Quantity and speed Components to consider: Array 1 Array 2 Array 3 Array 4 Array 5 Array 6 Array 7 Array 8
Sample Balanced Unit HBA1 HBA2 HBA1 HBA2 HBA1 HBA2 HBA1 HBA2 FC-Switch1 FC-Switch2 Each machine has 2 CPUs All four servers drive about 2 * 200MB/s * 4 = 1600 The MB/s weakest link defines the throughput Each building block is a Each balanced machine has unit2 Gb HBAs Components All 8 HBAs can sustain to consider: CPU: 8 * 200MB/s Quantity = 1600 and MB/s speed HBA (Host Bus Adapter): Quantity and speed Each switch needs to support 800MB/s to guarantee Switch a speed total system throughput of 1600 Controller: MB/s Quantity and speed : Quantity and speed Array 1 Array 2 Array 3 Array 4 Array 5 Array 6 Array 7 Array 8
Sample Balanced Unit HBA1 HBA2 HBA1 HBA2 HBA1 HBA2 HBA1 HBA2 FC-Switch1 FC-Switch2 Each machine has 2 CPUs All four servers drive about 2 * 200MB/s * 4 = 1600 The MB/s weakest link defines the throughput Each building block is a Each balanced machine has unit2 Gb HBAs Components All 8 HBAs can sustain to consider: CPU: 8 * 200MB/s Quantity = 1600 and MB/s speed HBA (Host Bus Adapter): Quantity and speed Each switch needs to support 800MB/s to guarantee Switch a speed total system throughput of 1600 Controller: MB/s Quantity and speed : Quantity and speed Each disk array has one 2Gbit controller All 8 disk arrays can sustain 8 * 200MB/s = 1600 MB/s Array 1 Array 2 Array 3 Array 4 Array 5 Array 6 Array 7 Array 8
Agenda Automated Performance Management Automatic Workload Management Large Databases Oracle ILM Oracle DWH Balanced Configurations When milliseconds counts - Oracle TimesTen Inmemory database
Oracle TimesTen In-Memory Database In-memory RDBMS in the middle-tier.. enables the Real-time Enterprise Application Application
Oracle TimesTen In-Memory Database Network Application TimesTen Libraries Direct-linked Cache Agent Cache Tables Application TimesTen Client lib Client- Server Tx Logs Checkpoints In-Memory RDBMS Entire database is in memory Low latency + high throughput fast Data access via ODBC, JDBC, SQL-92 standard Shared by multi-threaded and multi-user applications Direct-linked and client-server Transactions are logged and recoverable Transaction logs and checkpoint files persist on disk safe Thousands of customers proven Compatible with Oracle database
Cache Connect to Oracle Network Application TimesTen Libraries Direct-linked Cache Agent Cache Tables Application TimesTen Client lib Client- Server Tx Logs Checkpoints Cache tables from Oracle database User configured cache groups Cache individual tables and related tables Cache all or subset of rows and columns Read-only or updatable Access cached tables like regular database tables Automatic data synchronization TimesTen to Oracle Oracle to TimesTen
Caching Data from Oracle Database Cache Group describes the Oracle data to be cached in the TimesTen in-memory database, via a SQL WHERE clause TimesTen Cache Groups Child Table Root Table Child Table Child Table Example: Caching name and address of premier customers who have had more than 500 purchase orders CREATE CACHE GROUP PremierUsers FROM CUSTOMER ( NAME VARCHAR2(100) NOT NULL, ADDR VARCHAR2(100) ) WHERE CUSTOMER.ORDER > 500;
On-Demand Caching C/S Applications Client/Server IMDB Age out when no longer needed Application Oracle Application Clients On Demand Cache Group Load data from Oracle upon SELECT On-demand loading of data from Oracle if data not found in TimesTen All updates to the cache writethrough to Oracle database Set data aging policy to age out the data that s no longer needed
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 optimization of routes & schedules MON TUE WED Cache last 15 minutes of RFID data for real-time process monitoring Cache last 90 days of orders to speed searching by call agents or self-service portals Cache last 30 days of market data for analytics & simulation
Benchmark example Oracle 3-tier architecture Benchmark app runs in mid-tier Presentation Oracle + TimesTen 3-tier architecture Benchmark app runs in mid-tier Benchmark Program Benchmark Program TimesTen embedded in benchmark app Oracle Oracle 10 g 10 g Updatable cache contains benchmark data
Combined Performance
TimesTen and J2EE Application Servers Customers use TimesTen database with their J2EE applications TimesTen supports industry leading Application Servers Oracle Application Server IBM Websphere Application Server BEA WebLogic Application Server Sun Application Server JBOSS Application Server Refer to TimesTen Application Server Guide for more details
Java Middleware Tested with TimesTen Oracle Application Server 10.1.2 & 10.1.3 Oracle BPEL Process Manager 10.1.3 Oracle TopLink 9.0.4 & 10.1.3 Oracle JDeveloper 10.1.3 JBoss Application Server 4 Hibernate 3 WebSphere Application Server 6 Weblogic Application Server 8 Sun Java System Application Server 8
Product Features In the Pipeline.. Integration with Oracle SQL Developer tool TimesTen will be supported in next release Support Oracle Call Interface (OCI) and Pro*C embedded SQL Support for PL/SQL stored-procedures Integration with Oracle Enterprise Manager