The Self-Managing Database: Automatic SGA Memory Management Tirthankar Lahiri Senior Manager, Distributed Cache & Memory Management Oracle Corporation.

Slides:



Advertisements
Similar presentations
1 Chapter 16 Tuning RMAN. 2 Background One of the hardest chapters to develop material for Tuning RMAN can sometimes be difficult Authors tried to capture.
Advertisements

Chapter 9. Performance Management Enterprise wide endeavor Research and ascertain all performance problems – not just DBMS Five factors influence DB performance.
13 Copyright © 2005, Oracle. All rights reserved. Monitoring and Improving Performance.
Starfish: A Self-tuning System for Big Data Analytics.
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Overview of Database Administrator (DBA) Tools
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 2 Overview of Database Administrator (DBA) Tools.
Oracle Architecture. Instances and Databases (1/2)
Wim Coekaerts Director of Linux Engineering Oracle Corporation.
Self-Managing Database: Easy Upgrade Tom Graves Consulting Member of Technical Staff Oracle Corporation Session id:
15 Copyright © 2004, Oracle. All rights reserved. Monitoring and Managing Memory.
Oracle Online Features - Golfing Instead of Working on Weekends Oracle World 2003 – Session Sep 2003 Denny Wong Consultant Database Services.
12 Copyright © 2005, Oracle. All rights reserved. Proactive Maintenance.
The Self-managing Database: Automatic Performance Diagnosis Graham Wood Kyle Hailey Oracle Corporation Session id:
1 - Oracle Server Architecture Overview
Oracle Architectural Components
Managing an Oracle Instance
10 Copyright © 2006, Oracle. All rights reserved. Automatic Shared Memory Management.
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
Simplify your Job – Automatic Storage Management Angelo Session id:
Module 8: Server Management. Overview Server-level and instance-level resources such as memory and processes Database-level resources such as logical.
Introduction and simple using of Oracle Logistics Information System Yaxian Yao
12 Copyright © 2007, Oracle. All rights reserved. Database Maintenance.
15 Copyright © 2004, Oracle. All rights reserved. Proactive Maintenance.
Oracle on Windows Server Introduction to Oracle10g on Microsoft Windows Server.
Oracle10g RAC Service Architecture Overview of Real Application Cluster Ready Services, Nodeapps, and User Defined Services.
Basic Oracle Architecture
Michael Sit Solution Specialists Manager Oracle Corporation.
1 Robert Wijnbelt Health Check your Database A Performance Tuning Methodology.
Chapter 20 Other Memory Management Topics
The Self-Managing Database: Guided Application and SQL Tuning Mohamed Ziauddin Consulting Member of Technical Staff Oracle Corporation Session id:
Oracle9i Performance Tuning Chapter 2 Tuning the Buffer Cache.
Oracle Tuning Ashok Kapur Hawkeye Technology, Inc.
Copyright © Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
13 Copyright © 2006, Oracle. All rights reserved. Tuning PGA and Temporary Space.
Oracle 10g Database Administrator: Implementation and Administration Chapter 2 Tools and Architecture.
A Guide to Oracle9i1 Database Instance startup and shutdown.
Oracle9i Performance Tuning Chapter 12 Tuning Tools.
15 Copyright © 2006, Oracle. All rights reserved. Performance Tuning: Summary.
Outline Introduction to Oracle Memory Structures SGA, PGA, SCA The Specifics of the System Global Area (SGA) Structures Overview of Program Global Areas.
1 Oracle Enterprise Manager Slides from Dominic Gélinas CIS
Oracle 9i Release 2, A new set of tips, tricks and Techniques. Steve George Sr. Delivery Manager – Oracle University Oracle Corporation Session id: #32681.
Instance and Media Recovery Structures Supinfo Oracle Lab. 7.
The Self-managing Database: Proactive Space and Schema Object Management Amit Ganesh Director, Data, Space and Transaction Processing Oracle Corporation.
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
Week 1 Lecture 1 Oracle Architecture Overview. Learning Objectives Learn about Oracle9i architecture and key Oracle9i software components Discover differences.
Preface 1Performance Tuning Methodology: A Review Course Structure 1-2 Lesson Objective 1-3 Concepts 1-4 Determining the Worst Bottleneck 1-5 Understanding.
Session id: Darrell Hilliard Senior Delivery Manager Oracle University Oracle Corporation.
7 Copyright © Oracle Corporation, All rights reserved. Instance and Media Recovery Structures.
Oracle9i Performance Tuning Chapter 4 Tuning the Shared Pool Memory.
Dr. Stephan Bühne SAP Solution Center Walldorf Oracle 9i: Features for SAP Which new Oracle 9i features are helpful for a SAP customer? Dr. Stephan Bühne.
6 Copyright © 2005, Oracle. All rights reserved. Managing Database Storage Structures.
A deep dive into SQL Server Plan Cache Management.
4 Copyright © 2004, Oracle. All rights reserved. Managing the Oracle Instance.
5 Copyright © 2005, Oracle. All rights reserved. Managing the Oracle Instance.
Oracle Database Architectural Components
Chapter 21 SGA Architecture and Wait Event Summarized & Presented by Yeon JongHeum IDS Lab., Seoul National University.
 Database Administration Oracle Database Instance Management Starting Up and Shutting Down أ. ندى الغامدي, أ. ندى الطوالة.
3 Copyright © Oracle Corporation, All rights reserved. 管理数据库事例.
Data, Space and Transaction Processing
Initialization Parameters
Sangam-AIOUG 2016 (11th ,12th Nov) Suvendu
Performance Management
OTN Yatra 2016 (23rd ,24th April) Suvendu
Is 221: Database Administration
Introduction.
Monitoring and Managing Memory
Managing Memory.
Which new Oracle 9i features are helpful for a SAP customer?
Presentation transcript:

The Self-Managing Database: Automatic SGA Memory Management Tirthankar Lahiri Senior Manager, Distributed Cache & Memory Management Oracle Corporation Session id: 40091

Outline  Overview of Oracle Shared Memory (SGA)  Introducing Automatic SGA Management  Benefits  Using the feature  How Does it Work?  Summary

SGA Overview  SGA: Oracle’s “Shared Global Area”  Comprises multiple memory components Java Pool Database Buffer Cache Redo Log Buffer Shared Pool Large Pool SGA Fixed SGA

SGA Overview  In past releases: Separate parameters for SGA components DB_CACHE_SIZE SHARED_POOL_SIZE LARGE_POOL_SIZE JAVA_POOL_SIZE

SGA Overview  Difficult to optimally set parameters  Undersized component: – Poor performance (excess IO, parses) – Out-of-memory errors (ORA-4031)  Oversized component: – Wastes memory – Configuring for the worst-case

SGA Overview  Oracle9i introduced SGA memory advisories: – Buffer Cache Advice (v$db_cache_advice) – Shared Pool Advice (v$shared_pool_advice)  Predicts performance for different sizes Physical IOs Buffer cache size Buffer Cache Advice

SGA Overview  Advisories allow better sizing for components – Available out-of-the-box – Reduces trial and error – Recommendations based on actual workload – With Dynamic SGA:  Recommendations can be implemented online  Task of adjusting sizes still left to the DBA

Introducing Automatic SGA Memory Management  The Oracle Database 10g – Single parameter for total SGA size – Automatically sizes SGA components – Memory is transferred to where most needed – Uses workload information – Uses internal advisory predictions

Introducing Automatic SGA Memory Management  Single parameter for SGA size DB_CACHE_SIZE SHARED_POOL_SIZE LARGE_POOL_SIZE JAVA_POOL_SIZE Enable Automatic Shared Memory Management SGA_TARGET

Introducing Automatic SGA Memory Management  Set SGA_TARGET to the total SGA size SGA_TARGET = 8G Java Pool Database Buffer Cache Redo Log Buffer Shared Pool Large Pool SGA Fixed SGA

Introducing Automatic SGA Memory Management  Four most commonly configured components are automatically sized: – Shared Pool – Large Pool – Java Pool – Buffer Cache (DEFAULT buffer pool)  STATISTICS_LEVEL must be set to TYPICAL

 Automatically adapts to workload changes  Maximizes memory utilization  Single Parameter makes it easier to use  Helps eliminate out of memory errors  Can help improve performance Online Users Large Batch Jobs Java Pool Shared Pool Large Pool Buffer Cache Shared Pool Large Pool Buffer Cache Java Pool Benefits of Automatic SGA Management

Using Automatic SGA Management: SGA_TARGET Parameter  Includes everything in the SGA: – Fixed SGA and other internal allocations – Automatically sized SGA components  Default buffer cache  Shared pool  Large pool  Java pool – Manual SGA components  Log buffer  Other caches (KEEP/RECYCLE, other blocksizes)  Streams pool (new in 10g)

 When SGA_TARGET is not set (or zero): – Auto-tuned parameters behave as in Oracle9i – Exception: SHARED_POOL_SIZE:  In Oracle10g internal startup overhead is included  May need to increase value from Oracle9i  Query to determine actual shared pool size in 9i  Shared Pool Size automatically adjusted during upgrade SELECT SUM(bytes) FROM v$sgastat WHERE pool = 'shared pool'; Using Automatic SGA Management: Automatically Tuned Parameters

 When SGA_TARGET is set : – Default values of auto-tuned parameters is zero – A non-zero value is a lower bound on the size of the component – Actual component size may be higher Using Automatic SGA Management: Automatically Tuned Parameters Java Pool (1G) Large Pool (1G) Buffer Cache (3G) Sga size = 8G Parameters: SGA_TARGET = 8G LARGE_POOL_SIZE = 1G SHARED_POOL_SIZE = 1G Shared Pool (3G) (Min size = 1G)

Using Automatic SGA Management: Determining the current component sizes

 Some components not yet auto-tuned – Other buffer caches (Keep/Recycle) – Multiple blocksize caches – Streams Pool  Their parameters are user-specified  Precisely control the sizes of their components Using Automatic SGA Management: Manually Tuned Parameters

Using Automatic SGA Management: Manually Tuned Parameters  When SGA_TARGET is set: – Total size of manual parameters is subtracted – Balance is given to the auto-tuned components Keep Cache (1G) Parameters: SGA_TARGET = 8G DB_KEEP_CACHE_SIZE = 1G Auto Tuned Components (7G) Shared Pool Large Pool Default Cache Java Pool

 Initialization parameter values: Querying V$PARAMETER SGA_TARGET = 8G DB_CACHE_SIZE = 0 JAVA_POOL_SIZE = 0 LARGE_POOL_SIZE = 0 SHARED_POOL_SIZE = 0 SELECT name, value, isdefault FROM v$parameter WHERE name like '%size'; Using Automatic SGA Management Using v$parameter

Enabling Automatic SGA Management

Using Automatic SGA Management : Resizing SGA_TARGET  SGA_TARGET is dynamic  Can be increased till SGA_MAX_SIZE  Can be reduced till some component reaches minimum size  Change in value of SGA_TARGET affects only automatically sized components

Using Automatic SGA Management : Resizing SGA_TARGET SGA_MAX_SIZE=10G SGA_TARGET=9G Database Buffer Cache Database Buffer Cache Redo Log Buffer Large Pool SGA_TARGET = 8G Fixed SGA Shared Pool Java Pool

 SGA_TARGET = 0 disables auto-tuning – Auto parameters set to current component sizes – SGA size as a whole is unaffected Parameters: sga_target = 8G shared_pool_size=1G Parameters: sga_target = 0 db_cache_size = 4G shared_pool_size = 2G large_pool_size = 512M java_pool_size = 512M sga size = 8G SGA_TARGET=0 Disabling Automatic SGA Management

SGA_TARGET = 8G Java Pool Database Buffer Cache Redo Log Buffer Large Pool SGA Fixed SGA Shared Pool actual size = 2G SHARED_POOL_SIZE=1G Using Automatic SGA Management Resizing Auto Tuned Parameters Results in component resize only if new value > current size Otherwise silently changes the minimum size

 Manual parameter resize affects the tunable portion of the SGA Using Automatic SGA Management Resizing Manually Set Parameters Parameters: SGA_TARGET = 8G DB_KEEP_CACHE_SIZE = 1G Keep Cache (1G) Auto Tuned Components (7G) Shared Pool Large Pool Default Cache Java Pool Parameters: SGA_TARGET = 8G DB_KEEP_CACHE_SIZE = 2G Keep Cache (2G) Auto Tuned Components (6G)

How Does It Work? SGA Background Process Background SGA Memory Broker Tracks component size and pending resize Coordinates sizing of SGA components

 Based on workload information  Captures statistics periodically in background  Uses the different memory advisories  Memory is moved to where most needed  No need to configure parameters for the worst-case How Does It Work? Basic SGA Tuning Principles

How Does It Work? Persistence of auto-tuned values  If server parameter file (spfile) is used: – Component sizes saved across shutdowns – Saved values used to bootstrap component sizes – Avoids having to relearn optimal values  For this reason use of spfile is recommended with Automatic SGA Management

Conclusions  Relieves the administrator from manually configuring the SGA  Internal algorithm adjusts based on workload  No need to configure for the worst-case  Simple usage model

Next Steps….  Recommended sessions – The Self-Managing Database : Proactive Space and Schema Object Management (Thurs, Sept 11, 8 AM) – The Self-Managing Database : Automatic Health Monitoring (Thurs, Sept. 11, 11 AM) – The Invisible Oracle : Deploying Oracle Database in Embedded Environment (Wed, Sept. 10, 4:30 PM)  Recommended demos and/or hands-on labs – Oracle Database 10g : Manage the Oracle Environment Hands- On Lab – Campground Demo : “The Self-Managing Database: Memory Management”  Relevant web sites to visit for more information – ml

Reminder – please complete the OracleWorld online session survey Thank you.

A Q & Q U E S T I O N S A N S W E R S