SlideShare a Scribd company logo
MEMORY MANAGEMENT
IN ORACLE
BY DAVIN.J.ABRAHAM
1701310002/M.TECH DB/SRMU
BASIC MEMORY STRUCTURES
• The basic memory structures associated with Oracle Database include:
• Software code areas
• Software code areas are portions of memory used to store code that is being run or can be run. Oracle
Database code is stored in a software area that is typically at a different location from users' programs—a more
exclusive or protected location.
• System global area (SGA)
• The SGA is a group of shared memory structures, known as SGA components, that contain data and control
information for one Oracle Database instance. The SGA is shared by all server and background processes.
Examples of data stored in the SGA include cached data blocks and shared SQL areas.
• Program global area (PGA)
• A PGA is a memory region that contains data and control information for a server process. It is nonshared
memory created by Oracle Database when a server process is started. Access to the PGA is exclusive to the
server process. There is one PGA for each server process. Background processes also allocate their own PGAs.
The total memory used by all individual PGAs is known as the total instance PGA memory, and the collection of
individual PGAs is referred to as the total instance PGA, or just instance PGA. You use database initialization
parameters to set the size of the instance PGA, not individual PGAs.
RECOMMENDATION
• Memory management involves maintaining optimal sizes for the Oracle database instance memory
structures as demands on the database change. The memory that must be managed is the system
global area (SGA) memory and the instance program global area (instance PGA) memory. The instance
PGA memory is the collection of memory allocations for all individual PGAs.
• Oracle Database supports various memory management methods, which are chosen by initialization
parameter settings. Oracle recommends that you enable the automatic memory management method.
ABOUT AUTOMATIC MEMORY MANAGEMENT
• Oracle has made great strides in simplifying memory management over the last few versions of the database.
• Oracle 9i automated PGA management by introducing PGA_AGGREGATE_TARGET parameter.
• Oracle 10g continued this trend by automating SGA management using the SGA_TARGET parameter.
• Oracle 11g takes this one step further by allowing you to allocate one chunk of memory, which Oracle uses to
dynamically manage both the SGA and PGA.
• The simplest way to manage instance memory is to allow the Oracle Database instance to automatically
manage and tune it for you.
• To do so (on most platforms), you set only a target memory size initialization parameter (MEMORY_TARGET)
and optionally a maximum memory size initialization parameter (MEMORY_MAX_TARGET).
• The instance then tunes to the target memory size, redistributing memory as needed between the system
global area (SGA) and the instance program global area (instance PGA). Because the target memory
initialization parameter is dynamic, you can change the target memory size at any time without restarting the
database.
• The maximum memory size serves as an upper limit so that you cannot accidentally set the target memory
size too high, and so that enough memory is set aside for the Oracle Database instance in case you do want to
increase total instance memory in the future. Because certain SGA components either cannot easily shrink or
must remain at a minimum size, the instance also prevents you from setting the target memory size too low.
• If you create your database with Database Configuration Assistant (DBCA) and choose the basic installation
option, automatic memory management is enabled. If you choose advanced installation, Database
Configuration Assistant (DBCA) enables you to select automatic memory management.
ORACLE DATABASE MEMORY MANAGEMENT MODES
Memory Management Mode For You Set Oracle Database Automatically Tunes
Automatic memory management SGA and PGA  Total memory target size for the
Oracle instance
 (Optional) Maximum memory size for
the Oracle instance
 Total SGA size
 SGA component sizes
 Instance PGA size
 Individual PGA sizes
Automatic shared memory management
(Automatic memory management
disabled)
ENABLING AUTOMATIC MEMORY MANAGEMENT
• If you did not enable automatic memory management upon database creation (either by selecting the
proper options in DBCA or by setting the appropriate initialization parameters for the CREATE
DATABASE SQL statement), you can enable it at a later time. Enabling automatic memory management
involves a shutdown and restart of the database.
1. Start SQL*Plus and connect to the database as SYSDBA.
2. Calculate the minimum value for MEMORY_TARGET as follows:
• Determine the current sizes of SGA_TARGET and PGA_AGGREGATE_TARGET by entering the following SQL*Plus command:
• SHOW PARAMETER TARGET
• SQL*Plus displays the values of all initialization parameters with the string TARGET in the
parameter name.
• NAME TYPE VALUE
• ------------------------------ ------------- ---------------
• archive_lag_target integer 0
• db_flashback_retention_target integer 1440
• fast_start_io_target integer 0
• fast_start_mttr_target integer 0
• memory_max_target big integer 0
• memory_target big integer 0
• pga_aggregate_target big integer 90M
• sga_target big integer 272M
a. Run the following query to determine the maximum instance PGA allocated since the database
was started:
a. select value from v$pgastat where name='maximum PGA allocated';
b. Compute the maximum value between the query result from step 2b
and PGA_AGGREGATE_TARGET. Add SGA_TARGET to this value.
c. memory_target (m) = sga_target + max(pga_aggregate_target, maximum PGA allocated)
For example, if SGA_TARGET is 272M and PGA_AGGREGATE_TARGET is 90M as shown above, and if the
maximum PGA allocated is determined to be 120M, then MEMORY_TARGET should be at least 392M (272M
+ 120M).
3. Choose the value for MEMORY_TARGET that you want to use.
4. This can be the minimum value that you computed in step 2, or you can choose to use a larger value if
you have enough physical memory available.
5. For the MEMORY_MAX_TARGET initialization parameter, decide on a maximum amount of memory
that you would want to allocate to the database for the foreseeable future. That is, determine the
maximum value for the sum of the SGA and instance PGA sizes. This number (n) can be larger than or the
same as the MEMORY_TARGET value that you chose in the previous step.
5. Do one of the following:
• If you started your Oracle Database instance with a server parameter file, which is the default if you created
the database with the Database Configuration Assistant (DBCA), enter the following command:
• ALTER SYSTEM SET MEMORY_MAX_TARGET = nM SCOPE = SPFILE;
5. where n is the value that you computed in Step 4.
6. The SCOPE = SPFILE clause sets the value only in the server parameter file, and not for the running instance.
You must include this SCOPE clause because MEMORY_MAX_TARGET is not a dynamic initialization parameter.
7. If you started your instance with a text initialization parameter file, manually edit the file so that it
contains the following statements:
• memory_max_target = nM
• memory_target = mM
8. where n is the value that you determined in Step 4, and m is the value that you determined in step 3.
Note:
• In a text initialization parameter file, if you omit the line for MEMORY_MAX_TARGET and include a value
forMEMORY_TARGET, the database automatically sets MEMORY_MAX_TARGET to the value
of MEMORY_TARGET. If you omit the line for MEMORY_TARGET and include a value
for MEMORY_MAX_TARGET, the MEMORY_TARGET parameter defaults to zero. After startup, you can
then dynamically change MEMORY_TARGET to a nonzero value, provided that it does not exceed the
value of MEMORY_MAX_TARGET.
9. Shut down and restart the database.
If you started your Oracle Database instance with a server parameter file, enter the following commands:
ALTER SYSTEM SET MEMORY_TARGET = nM;
ALTER SYSTEM SET SGA_TARGET = 0;
ALTER SYSTEM SET PGA_AGGREGATE_TARGET = 0;
where n is the value that you determined in step 3.
Note
• The preceding steps instruct you to
set SGA_TARGET and PGA_AGGREGATE_TARGET to zero so that the sizes of
the SGA and instance PGA are tuned up and down as required, without
restrictions. You can omit the statements that set these parameter values to
zero and leave either or both of the values as positive numbers. In this case,
the values act as minimum values for the sizes of the SGA or instance PGA.
THANK YOU

More Related Content

What's hot

Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)
Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)
Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)
Raid Data Recovery
 
Rman Presentation
Rman PresentationRman Presentation
Rman Presentation
Rick van Ek
 
Disk structure
Disk structureDisk structure
Disk structure
sangrampatil81
 
Less09 managing undo data
Less09 managing undo dataLess09 managing undo data
Less09 managing undo data
Imran Ali
 
10 ways to improve your rman script
10 ways to improve your rman script10 ways to improve your rman script
10 ways to improve your rman script
Maris Elsins
 
DB security
 DB security DB security
DB security
ERSHUBHAM TIWARI
 
File records on disk
File records on diskFile records on disk
File records on disk
Shashwat Shriparv
 
Less17 moving data
Less17 moving dataLess17 moving data
Less17 moving data
Amit Bhalla
 
Database Administrator
Database AdministratorDatabase Administrator
Database Administrator
Dhrumil Panchal
 
Database backup and recovery
Database backup and recoveryDatabase backup and recovery
Database backup and recovery
Anne Lee
 
Oracle DBA
Oracle DBAOracle DBA
Oracle DBA
shivankuniversity
 
Exadata master series_asm_2020
Exadata master series_asm_2020Exadata master series_asm_2020
Exadata master series_asm_2020
Anil Nair
 
Backups And Recovery
Backups And RecoveryBackups And Recovery
Backups And Recovery
asifmalik110
 
Backup and recovery in oracle
Backup and recovery in oracleBackup and recovery in oracle
Backup and recovery in oracle
sadegh salehi
 
Les 19 space_db
Les 19 space_dbLes 19 space_db
Les 19 space_db
Femi Adeyemi
 
An Overview of Spanner: Google's Globally Distributed Database
An Overview of Spanner: Google's Globally Distributed DatabaseAn Overview of Spanner: Google's Globally Distributed Database
An Overview of Spanner: Google's Globally Distributed Database
Benjamin Bengfort
 
Database & Database Users
Database & Database UsersDatabase & Database Users
Database & Database Users
M.Zalmai Rahmani
 
Oracle archi ppt
Oracle archi pptOracle archi ppt
Oracle archi ppt
Hitesh Kumar Markam
 
Db2 recovery IDUG EMEA 2013
Db2 recovery IDUG EMEA 2013Db2 recovery IDUG EMEA 2013
Db2 recovery IDUG EMEA 2013
Dale McInnis
 
DB2 LUW - Backup and Recovery
DB2 LUW - Backup and RecoveryDB2 LUW - Backup and Recovery
DB2 LUW - Backup and Recovery
imranasayed
 

What's hot (20)

Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)
Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)
Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)
 
Rman Presentation
Rman PresentationRman Presentation
Rman Presentation
 
Disk structure
Disk structureDisk structure
Disk structure
 
Less09 managing undo data
Less09 managing undo dataLess09 managing undo data
Less09 managing undo data
 
10 ways to improve your rman script
10 ways to improve your rman script10 ways to improve your rman script
10 ways to improve your rman script
 
DB security
 DB security DB security
DB security
 
File records on disk
File records on diskFile records on disk
File records on disk
 
Less17 moving data
Less17 moving dataLess17 moving data
Less17 moving data
 
Database Administrator
Database AdministratorDatabase Administrator
Database Administrator
 
Database backup and recovery
Database backup and recoveryDatabase backup and recovery
Database backup and recovery
 
Oracle DBA
Oracle DBAOracle DBA
Oracle DBA
 
Exadata master series_asm_2020
Exadata master series_asm_2020Exadata master series_asm_2020
Exadata master series_asm_2020
 
Backups And Recovery
Backups And RecoveryBackups And Recovery
Backups And Recovery
 
Backup and recovery in oracle
Backup and recovery in oracleBackup and recovery in oracle
Backup and recovery in oracle
 
Les 19 space_db
Les 19 space_dbLes 19 space_db
Les 19 space_db
 
An Overview of Spanner: Google's Globally Distributed Database
An Overview of Spanner: Google's Globally Distributed DatabaseAn Overview of Spanner: Google's Globally Distributed Database
An Overview of Spanner: Google's Globally Distributed Database
 
Database & Database Users
Database & Database UsersDatabase & Database Users
Database & Database Users
 
Oracle archi ppt
Oracle archi pptOracle archi ppt
Oracle archi ppt
 
Db2 recovery IDUG EMEA 2013
Db2 recovery IDUG EMEA 2013Db2 recovery IDUG EMEA 2013
Db2 recovery IDUG EMEA 2013
 
DB2 LUW - Backup and Recovery
DB2 LUW - Backup and RecoveryDB2 LUW - Backup and Recovery
DB2 LUW - Backup and Recovery
 

Viewers also liked

Inside the jvm
Inside the jvmInside the jvm
Inside the jvm
Benjamin Kim
 
Memory: Structures and Processes
Memory: Structures and ProcessesMemory: Structures and Processes
Memory: Structures and Processes
McCusker Alzheimer's Research Foundation
 
Improv Rules for the Workplace. #INBOUND13
Improv Rules for the Workplace.  #INBOUND13Improv Rules for the Workplace.  #INBOUND13
Improv Rules for the Workplace. #INBOUND13
Tim Washer
 
Lecture2 oracle ppt
Lecture2 oracle pptLecture2 oracle ppt
Lecture2 oracle ppt
Hitesh Kumar Markam
 
Strategic marketing ppt @ mba
Strategic marketing ppt @ mbaStrategic marketing ppt @ mba
Strategic marketing ppt @ mba
Babasab Patil
 
Positive attitude ppt
Positive attitude pptPositive attitude ppt
Positive attitude ppt
Muhammad Qasim
 
Marketing Strategy
Marketing StrategyMarketing Strategy
Marketing Strategy
Yodhia Antariksa
 

Viewers also liked (7)

Inside the jvm
Inside the jvmInside the jvm
Inside the jvm
 
Memory: Structures and Processes
Memory: Structures and ProcessesMemory: Structures and Processes
Memory: Structures and Processes
 
Improv Rules for the Workplace. #INBOUND13
Improv Rules for the Workplace.  #INBOUND13Improv Rules for the Workplace.  #INBOUND13
Improv Rules for the Workplace. #INBOUND13
 
Lecture2 oracle ppt
Lecture2 oracle pptLecture2 oracle ppt
Lecture2 oracle ppt
 
Strategic marketing ppt @ mba
Strategic marketing ppt @ mbaStrategic marketing ppt @ mba
Strategic marketing ppt @ mba
 
Positive attitude ppt
Positive attitude pptPositive attitude ppt
Positive attitude ppt
 
Marketing Strategy
Marketing StrategyMarketing Strategy
Marketing Strategy
 

Similar to Memory management in oracle

Memory management in oracle 11g r2
Memory management in oracle 11g r2Memory management in oracle 11g r2
Memory management in oracle 11g r2
Pankaj Mandal
 
Les 13 memory
Les 13 memoryLes 13 memory
Les 13 memory
Femi Adeyemi
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Oracle architecture
Oracle architectureOracle architecture
Oracle architecture
Soumya Das
 
Webcenter application performance tuning guide
Webcenter application performance tuning guideWebcenter application performance tuning guide
Webcenter application performance tuning guide
Vinay Kumar
 
8 tune tusc
8 tune tusc8 tune tusc
8 tune tusc
Anil Pandey
 
Oracle 12 c new-features
Oracle 12 c new-featuresOracle 12 c new-features
Oracle 12 c new-features
Navneet Upneja
 
Huge pages
Huge pagesHuge pages
Huge pages
Mohsen B
 
2713897 oracle-unix-oracle
2713897 oracle-unix-oracle2713897 oracle-unix-oracle
2713897 oracle-unix-oracle
sivacse09
 
How to increase memory_target
How to increase memory_targetHow to increase memory_target
How to increase memory_target
Arun Sharma
 
PostgreSQL Hangout Parameter Tuning
PostgreSQL Hangout Parameter TuningPostgreSQL Hangout Parameter Tuning
PostgreSQL Hangout Parameter Tuning
Ashnikbiz
 
Demystifying Amazon Sagemaker (ACD Kochi)
Demystifying Amazon Sagemaker (ACD Kochi)Demystifying Amazon Sagemaker (ACD Kochi)
Demystifying Amazon Sagemaker (ACD Kochi)
AWS User Group Pune
 
Sap memory management ,workload and performance analysis.pptx
Sap memory management ,workload and performance analysis.pptxSap memory management ,workload and performance analysis.pptx
Sap memory management ,workload and performance analysis.pptx
sweta prakash sahoo
 
Oracle 11g step by step installation on windows
Oracle 11g step by step installation on windowsOracle 11g step by step installation on windows
Oracle 11g step by step installation on windows
Ravi Kumar Lanke
 
Oracle Database Backup
Oracle Database BackupOracle Database Backup
Oracle Database Backup
Handy_Backup
 
515689311-Postgresql-DBA-Architecture.pptx
515689311-Postgresql-DBA-Architecture.pptx515689311-Postgresql-DBA-Architecture.pptx
515689311-Postgresql-DBA-Architecture.pptx
ssuser03ec3c
 
ORACLE 12C-New-Features
ORACLE 12C-New-FeaturesORACLE 12C-New-Features
ORACLE 12C-New-Features
Navneet Upneja
 
Magento e commerce performance optimization
Magento e commerce performance optimizationMagento e commerce performance optimization
Magento e commerce performance optimization
Ranosys Technologies Pte Ltd
 
Open sap cst1_week_2_all_slides
Open sap cst1_week_2_all_slidesOpen sap cst1_week_2_all_slides
Open sap cst1_week_2_all_slides
MD.TARIQUL ALAM RUSSEL
 
Oracle Database 12c features for DBA
Oracle Database 12c features for DBAOracle Database 12c features for DBA
Oracle Database 12c features for DBA
Karan Kukreja
 

Similar to Memory management in oracle (20)

Memory management in oracle 11g r2
Memory management in oracle 11g r2Memory management in oracle 11g r2
Memory management in oracle 11g r2
 
Les 13 memory
Les 13 memoryLes 13 memory
Les 13 memory
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Oracle architecture
Oracle architectureOracle architecture
Oracle architecture
 
Webcenter application performance tuning guide
Webcenter application performance tuning guideWebcenter application performance tuning guide
Webcenter application performance tuning guide
 
8 tune tusc
8 tune tusc8 tune tusc
8 tune tusc
 
Oracle 12 c new-features
Oracle 12 c new-featuresOracle 12 c new-features
Oracle 12 c new-features
 
Huge pages
Huge pagesHuge pages
Huge pages
 
2713897 oracle-unix-oracle
2713897 oracle-unix-oracle2713897 oracle-unix-oracle
2713897 oracle-unix-oracle
 
How to increase memory_target
How to increase memory_targetHow to increase memory_target
How to increase memory_target
 
PostgreSQL Hangout Parameter Tuning
PostgreSQL Hangout Parameter TuningPostgreSQL Hangout Parameter Tuning
PostgreSQL Hangout Parameter Tuning
 
Demystifying Amazon Sagemaker (ACD Kochi)
Demystifying Amazon Sagemaker (ACD Kochi)Demystifying Amazon Sagemaker (ACD Kochi)
Demystifying Amazon Sagemaker (ACD Kochi)
 
Sap memory management ,workload and performance analysis.pptx
Sap memory management ,workload and performance analysis.pptxSap memory management ,workload and performance analysis.pptx
Sap memory management ,workload and performance analysis.pptx
 
Oracle 11g step by step installation on windows
Oracle 11g step by step installation on windowsOracle 11g step by step installation on windows
Oracle 11g step by step installation on windows
 
Oracle Database Backup
Oracle Database BackupOracle Database Backup
Oracle Database Backup
 
515689311-Postgresql-DBA-Architecture.pptx
515689311-Postgresql-DBA-Architecture.pptx515689311-Postgresql-DBA-Architecture.pptx
515689311-Postgresql-DBA-Architecture.pptx
 
ORACLE 12C-New-Features
ORACLE 12C-New-FeaturesORACLE 12C-New-Features
ORACLE 12C-New-Features
 
Magento e commerce performance optimization
Magento e commerce performance optimizationMagento e commerce performance optimization
Magento e commerce performance optimization
 
Open sap cst1_week_2_all_slides
Open sap cst1_week_2_all_slidesOpen sap cst1_week_2_all_slides
Open sap cst1_week_2_all_slides
 
Oracle Database 12c features for DBA
Oracle Database 12c features for DBAOracle Database 12c features for DBA
Oracle Database 12c features for DBA
 

Recently uploaded

Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 

Recently uploaded (20)

Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Artificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic WarfareArtificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic Warfare
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 

Memory management in oracle

  • 1. MEMORY MANAGEMENT IN ORACLE BY DAVIN.J.ABRAHAM 1701310002/M.TECH DB/SRMU
  • 2. BASIC MEMORY STRUCTURES • The basic memory structures associated with Oracle Database include: • Software code areas • Software code areas are portions of memory used to store code that is being run or can be run. Oracle Database code is stored in a software area that is typically at a different location from users' programs—a more exclusive or protected location. • System global area (SGA) • The SGA is a group of shared memory structures, known as SGA components, that contain data and control information for one Oracle Database instance. The SGA is shared by all server and background processes. Examples of data stored in the SGA include cached data blocks and shared SQL areas. • Program global area (PGA) • A PGA is a memory region that contains data and control information for a server process. It is nonshared memory created by Oracle Database when a server process is started. Access to the PGA is exclusive to the server process. There is one PGA for each server process. Background processes also allocate their own PGAs. The total memory used by all individual PGAs is known as the total instance PGA memory, and the collection of individual PGAs is referred to as the total instance PGA, or just instance PGA. You use database initialization parameters to set the size of the instance PGA, not individual PGAs.
  • 3.
  • 4. RECOMMENDATION • Memory management involves maintaining optimal sizes for the Oracle database instance memory structures as demands on the database change. The memory that must be managed is the system global area (SGA) memory and the instance program global area (instance PGA) memory. The instance PGA memory is the collection of memory allocations for all individual PGAs. • Oracle Database supports various memory management methods, which are chosen by initialization parameter settings. Oracle recommends that you enable the automatic memory management method.
  • 5. ABOUT AUTOMATIC MEMORY MANAGEMENT • Oracle has made great strides in simplifying memory management over the last few versions of the database. • Oracle 9i automated PGA management by introducing PGA_AGGREGATE_TARGET parameter. • Oracle 10g continued this trend by automating SGA management using the SGA_TARGET parameter. • Oracle 11g takes this one step further by allowing you to allocate one chunk of memory, which Oracle uses to dynamically manage both the SGA and PGA. • The simplest way to manage instance memory is to allow the Oracle Database instance to automatically manage and tune it for you. • To do so (on most platforms), you set only a target memory size initialization parameter (MEMORY_TARGET) and optionally a maximum memory size initialization parameter (MEMORY_MAX_TARGET). • The instance then tunes to the target memory size, redistributing memory as needed between the system global area (SGA) and the instance program global area (instance PGA). Because the target memory initialization parameter is dynamic, you can change the target memory size at any time without restarting the database. • The maximum memory size serves as an upper limit so that you cannot accidentally set the target memory size too high, and so that enough memory is set aside for the Oracle Database instance in case you do want to increase total instance memory in the future. Because certain SGA components either cannot easily shrink or must remain at a minimum size, the instance also prevents you from setting the target memory size too low. • If you create your database with Database Configuration Assistant (DBCA) and choose the basic installation option, automatic memory management is enabled. If you choose advanced installation, Database Configuration Assistant (DBCA) enables you to select automatic memory management.
  • 6.
  • 7. ORACLE DATABASE MEMORY MANAGEMENT MODES Memory Management Mode For You Set Oracle Database Automatically Tunes Automatic memory management SGA and PGA  Total memory target size for the Oracle instance  (Optional) Maximum memory size for the Oracle instance  Total SGA size  SGA component sizes  Instance PGA size  Individual PGA sizes Automatic shared memory management (Automatic memory management disabled)
  • 8. ENABLING AUTOMATIC MEMORY MANAGEMENT • If you did not enable automatic memory management upon database creation (either by selecting the proper options in DBCA or by setting the appropriate initialization parameters for the CREATE DATABASE SQL statement), you can enable it at a later time. Enabling automatic memory management involves a shutdown and restart of the database. 1. Start SQL*Plus and connect to the database as SYSDBA. 2. Calculate the minimum value for MEMORY_TARGET as follows: • Determine the current sizes of SGA_TARGET and PGA_AGGREGATE_TARGET by entering the following SQL*Plus command: • SHOW PARAMETER TARGET
  • 9. • SQL*Plus displays the values of all initialization parameters with the string TARGET in the parameter name. • NAME TYPE VALUE • ------------------------------ ------------- --------------- • archive_lag_target integer 0 • db_flashback_retention_target integer 1440 • fast_start_io_target integer 0 • fast_start_mttr_target integer 0 • memory_max_target big integer 0 • memory_target big integer 0 • pga_aggregate_target big integer 90M • sga_target big integer 272M a. Run the following query to determine the maximum instance PGA allocated since the database was started: a. select value from v$pgastat where name='maximum PGA allocated'; b. Compute the maximum value between the query result from step 2b and PGA_AGGREGATE_TARGET. Add SGA_TARGET to this value. c. memory_target (m) = sga_target + max(pga_aggregate_target, maximum PGA allocated)
  • 10. For example, if SGA_TARGET is 272M and PGA_AGGREGATE_TARGET is 90M as shown above, and if the maximum PGA allocated is determined to be 120M, then MEMORY_TARGET should be at least 392M (272M + 120M). 3. Choose the value for MEMORY_TARGET that you want to use. 4. This can be the minimum value that you computed in step 2, or you can choose to use a larger value if you have enough physical memory available. 5. For the MEMORY_MAX_TARGET initialization parameter, decide on a maximum amount of memory that you would want to allocate to the database for the foreseeable future. That is, determine the maximum value for the sum of the SGA and instance PGA sizes. This number (n) can be larger than or the same as the MEMORY_TARGET value that you chose in the previous step.
  • 11. 5. Do one of the following: • If you started your Oracle Database instance with a server parameter file, which is the default if you created the database with the Database Configuration Assistant (DBCA), enter the following command: • ALTER SYSTEM SET MEMORY_MAX_TARGET = nM SCOPE = SPFILE; 5. where n is the value that you computed in Step 4. 6. The SCOPE = SPFILE clause sets the value only in the server parameter file, and not for the running instance. You must include this SCOPE clause because MEMORY_MAX_TARGET is not a dynamic initialization parameter. 7. If you started your instance with a text initialization parameter file, manually edit the file so that it contains the following statements: • memory_max_target = nM • memory_target = mM 8. where n is the value that you determined in Step 4, and m is the value that you determined in step 3.
  • 12. Note: • In a text initialization parameter file, if you omit the line for MEMORY_MAX_TARGET and include a value forMEMORY_TARGET, the database automatically sets MEMORY_MAX_TARGET to the value of MEMORY_TARGET. If you omit the line for MEMORY_TARGET and include a value for MEMORY_MAX_TARGET, the MEMORY_TARGET parameter defaults to zero. After startup, you can then dynamically change MEMORY_TARGET to a nonzero value, provided that it does not exceed the value of MEMORY_MAX_TARGET. 9. Shut down and restart the database. If you started your Oracle Database instance with a server parameter file, enter the following commands: ALTER SYSTEM SET MEMORY_TARGET = nM; ALTER SYSTEM SET SGA_TARGET = 0; ALTER SYSTEM SET PGA_AGGREGATE_TARGET = 0; where n is the value that you determined in step 3.
  • 13. Note • The preceding steps instruct you to set SGA_TARGET and PGA_AGGREGATE_TARGET to zero so that the sizes of the SGA and instance PGA are tuned up and down as required, without restrictions. You can omit the statements that set these parameter values to zero and leave either or both of the values as positive numbers. In this case, the values act as minimum values for the sizes of the SGA or instance PGA.