<Insert Picture Here> Exadata MAA Best Practices Series Session 5: Using Resource Manager on Exadata

Similar documents
Resource Manager Overview. Sue Lee, Director of Development 1 Copyright 2013, Oracle and/or its affiliates. All rights reserved.

<Insert Picture Here> Best Practices for Extreme Performance with Data Warehousing on Oracle Database

Capacity Management for Oracle Database Machine Exadata v2

Database Instance Caging: A Simple Approach to Server Consolidation. An Oracle White Paper September 2009

Comprehending the Tradeoffs between Deploying Oracle Database on RAID 5 and RAID 10 Storage Configurations. Database Solutions Engineering

Expert Oracle Exadata

Exadata and Database Machine Administration Seminar

Performance Baseline of Hitachi Data Systems HUS VM All Flash Array for Oracle

Preview of Oracle Database 12c In-Memory Option. Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Inge Os Sales Consulting Manager Oracle Norway

2009 Oracle Corporation 1

How To Use Exadata

Performance Tuning and Optimizing SQL Databases 2016

Expert Oracle Exadata

Oracle Aware Flash: Maximizing Performance and Availability for your Database

Overview: X5 Generation Database Machines

Oracle Exadata Database Machine for SAP Systems - Innovation Provided by SAP and Oracle for Joint Customers

An Oracle White Paper October Best Practices for Database Consolidation On Exadata Database Machine

Direct NFS - Design considerations for next-gen NAS appliances optimized for database workloads Akshay Shah Gurmeet Goindi Oracle

Maximum Availability Architecture

Oracle Exadata: The World s Fastest Database Machine Exadata Database Machine Architecture

Applying traditional DBA skills to Oracle Exadata. Marc Fielding March 2013

Exadata Database Machine Administration Workshop NEW

Why Standardize on Oracle Database 11g Next Generation Database Management. Thomas Kyte

Oracle Database Performance Management Best Practices Workshop. AIOUG Product Management Team Database Manageability

Rackspace Cloud Databases and Container-based Virtualization

Flash Performance for Oracle RAC with PCIe Shared Storage A Revolutionary Oracle RAC Architecture

The Revival of Direct Attached Storage for Oracle Databases

Removing Performance Bottlenecks in Databases with Red Hat Enterprise Linux and Violin Memory Flash Storage Arrays. Red Hat Performance Engineering

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 412, University of Maryland. Guest lecturer: David Hovemeyer.

SQL Server Business Intelligence on HP ProLiant DL785 Server

SUN ORACLE DATABASE MACHINE

Best Practices for Deploying SSDs in a Microsoft SQL Server 2008 OLTP Environment with Dell EqualLogic PS-Series Arrays

How To Build An Exadata Database Machine X2-8 Full Rack For A Large Database Server

MS SQL Performance (Tuning) Best Practices:

An Oracle White Paper June Effective Resource Management Using Oracle Database Resource Manager

Top 10 Performance Tips for OBI-EE

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into

An Oracle White Paper November Oracle Real Application Clusters One Node: The Always On Single-Instance Database

Optimizing Storage for Better TCO in Oracle Environments. Part 1: Management INFOSTOR. Executive Brief

Application of Predictive Analytics for Better Alignment of Business and IT

Exadata Database Machine

An Oracle White Paper December A Technical Overview of the Oracle Exadata Database Machine and Exadata Storage Server

Introduction to Database as a Service

Oracle Database In-Memory The Next Big Thing

Performance Characteristics of VMFS and RDM VMware ESX Server 3.0.1

SUN ORACLE EXADATA STORAGE SERVER

Instant-On Enterprise

Condusiv s V-locity Server Boosts Performance of SQL Server 2012 by 55%

Application-Tier In-Memory Analytics Best Practices and Use Cases

Maximum Availability Architecture. Oracle Best Practices for High Availability

Microsoft SQL Server OLTP Best Practice

Best Practices for Monitoring Databases on VMware. Dean Richards Senior DBA, Confio Software

TRACE PERFORMANCE TESTING APPROACH. Overview. Approach. Flow. Attributes

Application-Focused Flash Acceleration

<Insert Picture Here> Oracle Exadata Database Machine Overview

Navisphere Quality of Service Manager (NQM) Applied Technology

An Oracle White Paper May Exadata Smart Flash Cache and the Oracle Exadata Database Machine

Scaling in a Hypervisor Environment

Flash Databases: High Performance and High Availability

Informatica Data Director Performance

The Evolution of Microsoft SQL Server: The right time for Violin flash Memory Arrays

Eloquence Training What s new in Eloquence B.08.00

An Oracle White Paper December Exadata Smart Flash Cache Features and the Oracle Exadata Database Machine

Oracle Maximum Availability Architecture with Exadata Database Machine. Morana Kobal Butković Principal Sales Consultant Oracle Hrvatska

Private Cloud Database Consolidation Randy Hietter, Product Management - Oracle

Benchmarking Hadoop & HBase on Violin

An Oracle White Paper June A Technical Overview of the Oracle Exadata Database Machine and Exadata Storage Server

Extreme Data Warehouse Performance with Oracle Exadata

Performance and scalability of a large OLTP workload

Oracle Database - Engineered for Innovation. Sedat Zencirci Teknoloji Satış Danışmanlığı Direktörü Türkiye ve Orta Asya

Oracle Enterprise Manager 12c New Capabilities for the DBA. Charlie Garry, Director, Product Management Oracle Server Technologies

Daniela Milanova Senior Sales Consultant

Accelerating Oracle with IBM FlashSystem: The Need for Speed

Oracle Database 10g: New Features for Administrators

Evaluation Report: Accelerating SQL Server Database Performance with the Lenovo Storage S3200 SAN Array

IT CHANGE MANAGEMENT & THE ORACLE EXADATA DATABASE MACHINE

Performance rule violations usually result in increased CPU or I/O, time to fix the mistake, and ultimately, a cost to the business unit.

Exadata Performance, Yes You Still Need to Tune Kathy Gibbs Senior Database Administrator, CONFIO Software

EMC VMAX3 SERVICE LEVEL OBJECTIVES AND SNAPVX FOR ORACLE RAC 12c

Deep Dive: Maximizing EC2 & EBS Performance

Oracle Database Cloud Exadata Service

How To Test For A Test On A Test Server

Administering Microsoft SQL Server 2012 Databases

White paper: Unlocking the potential of load testing to maximise ROI and reduce risk.

PERFORMANCE TUNING ORACLE RAC ON LINUX

Case Study: Oracle E-Business Suite with Data Guard Across a Wide Area Network

Einsatzfelder von IBM PureData Systems und Ihre Vorteile.

HP ProLiant Gen8 vs Gen9 Server Blades on Data Warehouse Workloads

Oracle Database 11g: RAC Administration Release 2

EMC XtremSF: Delivering Next Generation Performance for Oracle Database

Capacity Planning Process Estimating the load Initial configuration

RAID Performance Analysis

Virtuoso and Database Scalability

<Insert Picture Here> Adventures in Middleware Database Abuse

Best Practices for Synchronous Redo Transport

Is there any alternative to Exadata X5? March 2015

Batch Processing in Disaster Recovery Configurations Best Practices for Oracle Data Guard

Tips and Tricks for Using Oracle TimesTen In-Memory Database in the Application Tier

Transcription:

<Insert Picture Here> Exadata MAA Best Practices Series Session 5: Using Resource Manager on Exadata Sue K Lee Sue K. Lee Senior Development Manager, Oracle Resource Manager

Exadata MAA Best Practices Series 1. E-Business Suite on Exadata 2. Siebel on Exadata 3. PeopleSoft on Exadata 4. Exadata and OLTP Applications 5. Using Resource Manager on Exadata 6. Migrating to Exadata 7. Using DBFS on Exadata 8. Exadata Monitoring 9. Exadata Backup & Recovery 10. Exadata MAA 11. Troubleshooting Exadata 12. Exadata Patching & Upgrades 13. Exadata Health Check <Insert Picture Here>

Customer Take-Aways <Insert Picture Here>

Resource Manager and Exadata 1. Manage multiple workloads in an Exadata database with Resource Manager 2. Consolidate multiple databases on Exadata using Resource Manager

Key point #1: Manage mixed workloads in an Exadata database with Resource Manager By managing how workloads share critical resources, Resource Manager provides customers the key to optimizing i i resource usage while fulfilling performance objectives.

Scenario: Mixed Workloads in an Exadata Database OLTP Applications Tuned workload Requires consistently good performance Exadata Database Low-Priority Ad-hoc queries Data export Resource intensive and unpredictable Apt to disrupt system Reports Long running reports Large batch jobs Moderate performance requirements

Requirements Workloads should use critical system resources according to their priority CPU, I/O, parallel servers Fully utilize critical resources Avoid inefficient schemes that require dedicated resources, e.g. Avoid servers dedicated to services Avoid separate databases for reporting Manage runaway queries OLTP should have no long-running operations. Any such operations should be identified and aborted. Ad-hoc queries should not use resources excessively

Step 1: Identify Workloads Create Consumer Groups for each type of workload Create rules to dynamically map sessions to Consumer Groups Session to Consumer Group Mapping Rules Consumer Groups service = CRM OLTP client program = OBIEE Reports client program = OBIEE && module = AdHoc query has been running > 1 hour estimated execution time of query > 12 hours Low-Priority service = ETL

Step 2: Manage CPU CPU is a critical resource on Exadata Exadata Smart Scan only returns useful data blocks Exadata Flash Cache completes I/Os in microseconds Result is heavy CPU loads Goal Allocate sufficient CPU to OLTP to satisfy performance objectives Allocate excess CPU to other workloads Solution Configure CPU allocations in Database Resource Plan Enable Database Resource Manager

Step 2: Manage CPU Day Time Plan Level 1 Level 2 OLTP 100% Reports 80% Low-Priority 20% The DBA can create a Night Time Plan that allocates more CPU to Batch Any CPU unused by OLTP is allocated to Reports and Low-Priority o sessions s Very fine-grained scheduling Resource Manager schedules at a 100 ms quantum, like an OS scheduler All sessions run, but some run more frequently than others Low-priority session yields to a high-priority session within a quantum Background processes are not managed Backgrounds are high-priority and not CPU-intensive Bonus: managing foregrounds results in Stable OS loads Backgrounds not starved

CPU Scheduling with Resource Manager Oracle- Internal CPU Queue OLTP Reports Sessions wait on resmgr:cpu quantum event Sessions scheduled every 100 ms CPU Resource Manager Resource Plan: OLTP 75% Reports 25% (OLTP picked 3 out of 4 times)

Step 3: Manage I/O Disk bandwidth is a critical resource on Exadata Key to exceptional query performance? One query can utilize a high percentage of each disk s bandwidth Multiple concurrent parallel queries result in heavy disk loads and long disk latencies Goal Shared ASM disk groups for efficient resource utilization Allocate sufficient I/O bandwidth to OLTP to satisfy performance objectives Allocate excess I/O bandwidth to Reports and Low-Priority workloads Solution Configure I/O allocations in Database Resource Plan Enable Exadata I/O Resource Manager

Exadata I/O Resource Manager Issue enough I/Os to keep each disk busy. Queue the rest. When an I/O completes: 1) Pick a Consumer Group queue 2) Issue the I/O request from the head of that queue OO OLTP I/Os R R R Database Resource Plan Database Reports I/Os L Low-Priority I/Os I/O Resource Manager TO O OL OL O B B B B Background I/Os Exadata Storage Cell Outstanding I/O Requests Disk

Exadata I/O Resource Manager Configure Exadata I/O Resource Manager using the Database Resource Plan Same plan used to manage CPU Specify resource allocations per Consumer Group Resource allocation == disk utilization Background and ASM I/Os automatically managed Critical I/Os prioritized: instance recovery, LGWR, control file, etc. Specify optimization objective Use low_latency or balanced for OLTP-oriented databases Use high_throughput for data warehouses Use IORM metrics to track I/O load per Consumer Group (IOPS, MBPS, disk utilization %) I/O throttling per Consumer Group 2010 Oracle Corporation

Step 4: Manage Parallel Execution Parallel servers are a limited resource Limit specified by parallel_max_servers Too many concurrent parallel statements causes thrashing When there are no more parallel servers Critical statements may run serially When parallel servers free up, no way to boost DOP of running statements Non-ideal solutions Under-utilize the system Manually schedule large queries during off hours 2010 Oracle Corporation

Parallel Statement Queuing Goals: 1. Run enough parallel statements to fully utilize system resources 2. Queue subsequent parallel statements 3. Dequeue a parallel statement when it won t thrash system Enable by setting parallel_degree_policy = auto 2010 Oracle Corporation

Parallel Statement Queuing No Parallel more parallel servers servers are available Parallel statements run are now immediately queued Available Servers: 32 64 128 0 Parallel Statement Queue Parallel Statement Queue Coordinator Running Parallel Statementst t 2010 Oracle Corporation

Ordering Parallel Statements DBAs want to control the order that parallel queries are dequeued Prioritize tactical queries over batch and ad-hoc queries Impose a user-defined policy for ordering queued parallel statements Solution Separate queues per Consumer Group Resource Plan specifies which queue s parallel statements are issued next 2010 Oracle Corporation

Ordering Parallel Statements Since there When are Since no parallel more Tactical Tactical servers is Priority parallel become it 1, lits statements, available, parallel t tl the we resource pick either Batch or plan statements Ad-Hoc. is used Batch are to select always is selected a selected queue. 70% The first. of the head time parallel after statement Ad-Hoc. from that queue is run. Available Servers: 16 0 64 Tactical Queue Batch Queue Parallel Statement Queue Coordinator Ad-Hoc Queue Resource Plan: Priority 1: Tactical Priority 2, 70%: Batch Priority 2, 30%: Ad-Hoc Running Queries 2010 Oracle Corporation

Reserving Parallel Servers for Critical Workloads Flood of batch queries can use up all parallel servers Tactical queries are forced to queue Solution Limit the percentage of parallel servers a Consumer Group can use For example, parallel queries from the Batch Consumer Group can only use 50% of the parallel servers Reserves parallel servers for Tactical queries Limit the degree of parallelism of non-critical workloads 2010 Oracle Corporation

Reserving Parallel Servers for Critical Workloads Since parallel servers are available, Tactical queries can be run immediately Available Servers: 48 32 64 64 Tactical Queue Batch limited to 50% of the parallel servers Batch Queue Parallel Statement Queue Coordinator Ad-Hoc Queue Resource Plan: Priority 1: Tactical Priority 2, 70%: Batch Priority 2, 30%: Ad-Hoc Running Queries 2010 Oracle Corporation

Step 5: Restrict Resource Usage Requirement Consistent, predictable performance for workloads Useful for hosted environments and departmental apps Solution Cap the CPU utilization for a Consumer Group Cap the disk utilization for a Consumer Group Day Time Plan Allocation Limit Tactical 60% Sales Reports 15% 30% Marketing Reports 15% 30% ETL 10% 2010 Oracle Corporation

Step 6: Manage Runaway Queries Runaway queries are caused by Missing indicies Unexpected inputs Bad execution plans Severely impact performance of well-behaved queries Very hard to completely eradicate! Query 1 Query 2 Query 3 Query 4 Query Time

Manage Runaway Queries Define runaway queries: Estimated execution time Actual execution time Actual number of I/Os (11.1) Actual bytes of I/O (11.1) Manage runaway queries: Switch to another consumer group Lower-priority consumer group Consumer group with CPU utilization limit (11.2) Abort call Kill session

Manage Runaway Queries For Tactical consumer group, runaway means: 30+ sec Switch to Low Priority consumer group! For Reports consumer group, runaway means: 32GB+ I/Os Abort query! For Ad-Hoc consumer group, runaway means: 24+ hour estimated execution time Don t execute!

2010 Oracle Corporation Step 7: Monitor and Tune

Resource Manager - End to End Test scenario: 2 workloads in a data warehouse Tactical queries (short TPC-H queries) Batch jobs (long TPC-H queries) Goal: Run Batch jobs with Tactical queries Don t impact response time of Tactical queries! 2010 Oracle Corporation

2010 Oracle Corporation Resource Manager - End to End

Key point #2: Consolidate multiple databases on Exadata using Resource Manager By managing how databases share critical resources, Resource Manager provides customers the ability to consolidate multiple l databases on Exadata.

Scenario: Consolidation Exadata Servers Exadata Storage Cells Database A ase B Databa Data abase C Data abase A Data abase B Data abase C Server Consolidation Better server utilization - X2-8 has 128 cores! Some deployments not ready for database consolidation Storage Consolidation More cells => higher peak throughput Better storage cell utilization ASM triple redundancy requires many disks 2010 Oracle Corporation

Step 1: Instance Caging Instance Caging is an Oracle feature for caging or limiting the amount of CPU that a database instance can use at any time Important tool for server consolidation Available in 11.2.0.1 Just 2 steps: 1. Set cpu_count count parameter Maximum number of CPUs the instance can use at any time 2. Set resource_manager_plan parameter Enables CPU Resource Manager E.g. out-of-box plan DEFAULT_PLAN

CPU Usage Without Instance Caging Wait for CPU on O/S run queue Oracle processes from one Database Instance try to use all CPUs Running Processes 2010 Oracle Corporation

CPU Usage With Instance Caging Wait for CPU on Resource Manager run queues Running Processes Instance Caging limits the number of Oracle processes running at any moment in time 2010 Oracle Corporation

Partitioning Approach Provides maximum isolation For performance-critical databases If one database is idle, its CPU allocation is unused 32 28 24 20 16 12 8 CPU Allocations Instance D: 2 CPUs Instance C: 2 CPUs Instance B: 4 CPUs Number of CPUs on Server 4 Instance A: 8 CPUs 0

Over-Provisioning Approach For non-critical databases that are typically wellbehaved Contention for CPU if databases are sufficiently loaded Not enough contention to destabilize OS or database instances Best approach if goal is fully utilize CPUs 32 28 24 20 16 12 8 CPU Allocations Instance D: 4 CPUs Instance C: 4 CPUs Instance B: 8 CPUs 4 Instance A: 8 CPUs Number of CPUs on Server 0

Instance Caging Results 4 CPU server Workload is a mix of OLTP transactions, parallel queries, and DMLs from Oracle Financials 2010 Oracle Corporation

Instance Caging: Under the Covers If cpu_count is set to 4 on a 16 CPU server All foreground processes make progress But only 4 foregrounds are running at any time Fine-grained scheduling! Most backgrounds not managed Critical and use very little CPU MMON, Job Scheduler slaves are managed No CPU affinity! All CPUs may be used CPU utilization averaged across all CPUs 25% 2010 Oracle Corporation

Best Practices for Instance Caging Cage size, cpu_count, is a dynamic parameter Changes take place immediately! Some overhead, so limit changes to once an hour Changes to cpu_count also affects other settings, such as parallel execution Avoid huge changes to cpu_count, particularly l from a small initial iti value (e.g. 1 or 2) cpu_count controls the number of logical CPUs or threads used - not cores or sockets! Monitor Instance Caging throttling AWR reports: resmgr:cpu quantum wait event Indicates that this instance would benefit from larger cage size 2010 Oracle Corporation

Step 2: Exadata I/O Resource Manager Scenario Multiple databases share Exadata storage cells Should databases share disks (ASM disk groups)? No! Load from one database doesn t affect another Dedicated disks offer more predictable performance Yes! Shared disks offer better bandwidth utilization Shared disks offer better space utilization But, you need a way to manage how database use disks 2010 Oracle Corporation

Exadata I/O Resource Manager Plans Sales DB 50% Allocation Limit Finance DB 25% 50% Marketing DB Standby 10% 50% Primary 25% 50% Exadata I/O Resource Manager gives you Predictability of dedicated disks Tools for allocating disk bandwidth to a database You can guarantee each database a certain amount of the disk bandwidth. You can specify different allocations for a database, depending on whether it s currently the primary or the standby. Tools for limiting disk bandwidth for a database - useful for hosted environments Efficient disk utilization of shared disks Unused allocations are redistributed Unused allocations are redistributed to needy databases. You can limit the disk bandwidth a database can use. 2010 Oracle Corporation

Exadata I/O Resource Manager Sales Database 1. Pick a database 2. Pick a Consumer Group Sales Database OLTP Queue OO R R R Resource Plans 3. Issue the head I/O request Reports Queue Finance Database I/O Resource Manager R O T O Tactical Queries Queue Finance T Outstanding I/O Requests Database B B B B Batch Queries Queue Exadata Storage Cell

Exadata I/O Resource Manager A Database Resource Plan manages workloads within a database An Inter-Database Resource Plan manages databases sharing Exadata storage cells OLTP Database A Reports Database B Low-Priority Database C Exadata Storage 2010 Oracle Corporation

I/O Utilization Limit Results Disk Utilization i 100% 90% 80% 70% 60% 50% 40% 30% 20% 10% 0% Time No I/O Limit 75% I/O Limit 50% I/O Limit 25% I/O Limit Queries from TPC-H benchmark suite Disk utilization measured via iostat 2010 Oracle Corporation

Business Takeaways

Business Value Take-Aways 1. For mixed workload databases, use Resource Manager to ensure sufficient resources for workloads that are performance critical. CPU Resource Manager I/O Resource Manager Parallel Statement Queuing Runaway Query Management 2. For server consolidation, use Instance Caging to distribute CPU among the databases. 3. For storage consolidation, use IORM to distribute disk bandwidth among the databases.

Best Practice Takeaways

Best Practice Take-Aways 1) Resource Manager presentations https://stbeehive.oracle.com/content/dav/st/database%20resource%20m anager/public%20documents 2) Resource Manager white paper http://www.oracle.com/technetwork/database/features/performance/res ource-manager-twp-133705.pdfpdf 3) Instance Caging http://www.oracle.com/technetwork/database/features/performance/ins com/technetwork/database/features/performance/ins tance-caging-wp-166854.pdf 4) MetaLink Notes for known issues 1207483.1 CPU Resource Manager 1208064.1 Instance Caging 1208104.1 max_utilization_limit _ 1208133.1 Managing Runaway Queries