ALTER SYSTEM SET DB_CACHE_SIZE

Tuning de Banco, Tuning de SQL, Ferramentas de tuning
Post Reply
carlaestevao80
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 18
Joined: Fri, 05 May 2006 8:48 am
Location: Lisboa

Ola DBAS,
Administer a BD in RAC 10gr1.
When doing the following operation in the BD init -

Select all

ALTER SYSTEM SET DB_CACHE_SIZE
does not qualquer error type.
returns that it has been duly altered, however even though it is restart on the BD the value is not attributed in any of the instances.
Does anyone give me a help?

Thanks: Wink:
Trevisolli
Moderador
Moderador
Posts: 2016
Joined: Wed, 12 Jan 2005 3:25 pm
Location: Araraquara - SP
Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Carla, good morning.

I found this documentation on the Internet, regarding dynamic reconfiguration.
I hope it helps her.

Source: http://www.dba-oracle.com/art_builder_9i_dyn1.htm
How Oracle9i Supports Dynamic Reconfiguration
Feb 25, 2003
Donald Burleson


In My Opinion, The Single Most Important New Feature of Oracle9i Is The Ability To Dynamically Modify Almost All Of Oracle's Performance Parameters. This LETS An Oracle Professional Dynamically Reconfigure The Oracle Instance While It's Running, Whether in Reaction to Current Performance Dempending Performance Demand. Because Everything Within The System Global Area (SGA) -The Ram Used by An Instance of Oracle-Can Now Be Modified Dynamically, It's Critical For You To Understand How To Monitor Your Oracle Database. When You Learn to Recognize Trends and Patterns Within Your System, You Can Proactively Reconfigure The Database In AntiCipation Of Regular Resource Needs.
with respect to ongoing database tuning activities, an oracle expert will generally look at two areas: normally scheduled reconfiguration to support regularly scheduled changes in processing requirements, and trend-based dynamic reconfiguration made in response to Information Gained from Statspack. Let's examine How Oracle Supports Both of theese Activities.

Scheduled Reconfiguration

Consider an Oracle Database That Runs In Online Transaction Processing (OLTP) MODE DURING THE DAY AND IN DECISTER Support Mode at Night. Theese Two Tasks Have Very Different Requirements for Optimal Performance. For this Type of Database, The Oracle DBA CAN Schedule The Oracle Instance to The Most Appropriate Configuration for the Current Type of Processing.

You'll Generally Use One of Two Tools for Scheduling Dynamic Reconfiguration. The Most Common Approach is to use UNIX Cron Job that Launches to Shell Script to Schedule to Periodic Reconfiguration. You Could Also Use The Oracle DBMS_JOB Utility. Either Of Theese Tools Will Allow You To Schedule Configuration Change.

In Listing A You'll Find A Unix Script That Can Be Used to Reconfigure Oracle for Decision Support Processing. Note That the Script Makes Changes to The Shared_Pool, DB_Cache_Size, and PGA_AGGregate_Target Parameters to Accommodate Data Warehouse Activity. The similar Script Could Then Be Run In The Morning To Change The Database Configuration Back To Oltp Mode.

Listing A:

Select all

 
#!/bin/ksh 
 
# First, we must set the environment . . . . 
ORACLE_SID=$1 
export ORACLE_SID 
ORACLE_HOME=`cat /etc/oratab|grep ^$ORACLE_SID:|cut -f2 -d':'` 
#ORACLE_HOME=`cat /var/opt/oracle/oratab|grep ^$ORACLE_SID:|cut -f2 -d':'` 
export ORACLE_HOME 
PATH=$ORACLE_HOME/bin:$PATH 
export PATH 
 
$ORACLE_HOME/bin/sqlplus –s /nologin<<! 
connect system/manager as sysdba; 
alter system set db_cache_size=1500m; 
alter system set shared_pool_size=500m; 
alter system set pga_aggregate_target=4000m; 
exit 
!
Trend-based Dynamic Reconfiguration
When Performing Trend-Based Dynamic Reconfiguration, You'll Collect Historical Date About The Oracle Database and Use This Information To Proactively Reconfigure The Database, Perhaps By Using The DBMS_Job Package To Fire Ad-Hoc Changes Or by Scheduling Regular Reconfiguration Using One of the Methods I Discussed. This is analogous to just-in-time manufacturing-where goods appear on the manufacturing floor at just the time they are needed in the assembly process-in that an oracle dba can anticipate processing needs and teaching that the sgga resources are delivered in time to Accommodate Processing Tasks.

You can use Statspack to Track Signatures for Important Metrics and Reveal Patterns To Predict The Resources That Your Oracle Servers Will Need. Metric Signatures Are Usually Collected By Hour Of The Day And By Day Of The Week, Making It Easy To Discover These Patterns. For example, consider The Hour of the Day Plot of the Data Buffer Hit Ratio (BHR) That Appears in Figure A.


Figure A
]
This bhr plot shows the recurring shortage of buffer blocks.



Notice That the Repeating Signature Sems To Indicate A Shortage Of Data Buffer Blocks Between The Hours Of 2:00 AM And Again Between 8 : 00 and 9:00 PM Once You Know This, You Can Schedule Tasks To Reallocate Ram To The Date Buffers During Theese Time Periods To Alleviate The Problem.

You can also plot the date bhr by day of the week, as you can see in figure b. from the graph, you can see problems on monday and friday, indicating that you need to incire The DB_Cache_Size for Those Days to Correct The Problem.



Figure B

The Daily BHR plot can Illustrate Problems Over Longer Cycle.


Trend-Based Information is a Gold Mine For The Oracle DBA Because It Can Be Used To Reveal Previously Unseen Performance Trends Within An Oracle Database. In My Next Article, I'vê taken Closer Look At The Metrics Used by Savvy Oracle Professionals To Determine How To Dynamically Tune Thir Oracle9I Databases.
carlaestevao80
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 18
Joined: Fri, 05 May 2006 8:48 am
Location: Lisboa

Thanks for the information.
But my doubt persists.
I do the command as sysdba:
alter system set db_cache_size = 640m scope = spfile
and returned success response.
I do restart in the database and when I do show parameter db_cache_size, and returned exactly the same value that was previously.

EC


gilbertoca
Rank: DBA Sênior
Rank: DBA Sênior
Posts: 372
Joined: Tue, 24 Jan 2006 3:33 pm
Location: Palmas - TO
Contact:

Are you using the SGA_TARGET parameter?
If this is the case (using SGA), the db_chache_size parameter does not have much relevance http://download.oracle.com/docs/cd/B193 ... #sthref187 only establishing the minimum memory pool.
Very important link: http://www.oracle.com/technology/pub/ar ... 0gdba.html

Select all

 
gilberto@ti-des05:~> source .oracleDB 
gilberto@ti-des05:~> sqlplus gilberto@migra 
 
SQL*Plus: Release 10.1.0.2.0 - Production on Qua Out 24 10:16:48 2007 
 
Copyright (c) 1982, 2004, Oracle.  All rights reserved. 
 
Enter password: 
 
Connected to: 
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production 
With the Partitioning, OLAP and Data Mining options 
 
gilberto@ALFA> show parameter db_cach 
 
NAME                                 TYPE        VALUE 
------------------------------------ ----------- ------------------------------ 
db_cache_advice                      string      ON 
db_cache_size                        big integer 32M 
gilberto@ALFA> show parameter sga_ 
 
NAME                                 TYPE        VALUE 
------------------------------------ ----------- ------------------------------ 
sga_max_size                         big integer 1728M 
sga_target                           big integer 1728M 
gilberto@ALFA>                              
Gilberto
carlaestevao80
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 18
Joined: Fri, 05 May 2006 8:48 am
Location: Lisboa


holy,

I have sga_target with the value 0.
So in this case the db_cache_size is relevant, but I can not change it: Cry:

CE

gilbertoca
Rank: DBA Sênior
Rank: DBA Sênior
Posts: 372
Joined: Tue, 24 Jan 2006 3:33 pm
Location: Palmas - TO
Contact:

Check the db_block_size parameter. DB_CACHE_SIZE needs to be a multiple of this parameter.
another thing, you have knowledge that db_cache_size + shared_pool_size + large_pool_size can not exceed SGA_MAX_SIZE?

What prevents you from using automatic memory management?

Gilberto
carlaestevao80
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 18
Joined: Fri, 05 May 2006 8:48 am
Location: Lisboa


Hello,

First of all, thanks for the tip.
By the way, what do I need to do to set up automatic memory management?

CE

gilbertoca
Rank: DBA Sênior
Rank: DBA Sênior
Posts: 372
Joined: Tue, 24 Jan 2006 3:33 pm
Location: Palmas - TO
Contact:

Good morning Carla!

This document http://www.oracle.com/technology/pub/ar ... 0gdba.html , answers everything.

But let's summarize. There are two ways to do it: one through - I find it easier and the other setting the SGA_TARGET parameter.

to do manually, set the parameter, you add the values ??of the other parameters in question, for example:

Select all

 
SHARED_POOL_SIZE=256M 
DB_CACHE_SIZE=512M 
LARGE_POOL_SIZE=256M 
LOG_BUFFER=16M 
sga_target = 256 m + 512m + 256 m + 16m + 16 m (Fixed SGA
Overhead [is a recommendation!]) = 1056 m

This to arrive at a value for the SGA_TARGET (which can be found by the Query: Select Sum (Value) from V $ SGA;). Then adjust the parameters above for zero value (0).
So it is like this:

Select all

 
alter system set sga_target=1056M; 
alter system set db_cache_size = 0; 
alter system set shared_pool_size = 0; 
alter system set large_pool_size = 0; 
alter system set java_pool_size = 0; 
Gilberto
carlaestevao80
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 18
Joined: Fri, 05 May 2006 8:48 am
Location: Lisboa


Hi,

In this case, no longer need to worry about the other parameters is not it?
Great help ...
Thanks :)

CE

gilbertoca
Rank: DBA Sênior
Rank: DBA Sênior
Posts: 372
Joined: Tue, 24 Jan 2006 3:33 pm
Location: Palmas - TO
Contact:

In this case, no longer need to worry about the other parameters is not it?
That's right!
Now your concern is to adjust the SGA_TARGET parameter to a suitable value for your bank. But this is already easier!

until,

Gilberto
carlaestevao80
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 18
Joined: Fri, 05 May 2006 8:48 am
Location: Lisboa


Hello,
I tried to do what I suggested but it does not.
When you try to put SGA_TARGET at 0, there was no problem, however the db_cache_size can not be at 0, because I have the db_block_size to 8192.
How can I do this situation?
Continued without being able to increase db_cache_size :(

CE

gilbertoca
Rank: DBA Sênior
Rank: DBA Sênior
Posts: 372
Joined: Tue, 24 Jan 2006 3:33 pm
Location: Palmas - TO
Contact:

carlaesterevao80 wrote:
Hello,
I tried to do what I suggested but it does not.
When you try to put SGA_TARGET at 0 there was no problem
Carla, I think you did not read the links that I passed! Not even what I talked about activating automatic memory management.

Where did you see or read about putting sga_target at 0?
Carlaestevao80 wrote:
, however the db_cache_size can not be at 0, because I have db_block_size to 8192.
How can I do this situation?
Continued unable to increase db_cache_size :( [99]
CE
elidias7
Rank: Analista Sênior
Rank: Analista Sênior
Posts: 153
Joined: Thu, 01 Nov 2007 2:53 pm
Location: Osasco
Eli Dias
Oracle Certified Professional

Carla.

You tried to change the parameters in this way .......

Example

* SQL> Alter System SET DB_CACHE_SIZE = 30M SCOPE = BOTH;
You add the desired value

SQL> ALTER SYSTEM SET DB_KEEP_CACHE_SIZE = 8M SCOPE = BOTH;

SQL> ALTER SYSTEM SET DB_RECYCLE_CACHE_SIZE = 5M SCOPE = BOT;

The other thing, this story of you have placed SGA = 0 it was strange, you probably changed the parameters of the SGA processes

I hope I have helped!
carlaestevao80
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 18
Joined: Fri, 05 May 2006 8:48 am
Location: Lisboa

Good morning,
I deceived myself when writing in the post I did not try to put SGA_TARGET to 0.

I tried to put in the amount of the sum of the parameters that indicated. And then when you try to put the db_cache_size at 0 it's q gave error.

I apologize for the confusion :(

CE
elidias7
Rank: Analista Sênior
Rank: Analista Sênior
Posts: 153
Joined: Thu, 01 Nov 2007 2:53 pm
Location: Osasco
Eli Dias
Oracle Certified Professional

But then.

Did you manage to change anyway?
carlaestevao80
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 18
Joined: Fri, 05 May 2006 8:48 am
Location: Lisboa


Hi,
So far I have not been able to change the value at all :(

CE

gilbertoca
Rank: DBA Sênior
Rank: DBA Sênior
Posts: 372
Joined: Tue, 24 Jan 2006 3:33 pm
Location: Palmas - TO
Contact:

carlaesterevao80 wrote:
Hi,
So far I have not been able to change the value at all :(

color]


Carla This is difficult to help her! You do not give us any information about this procedure. If there was a mistake, as the bank behaved, if the alert log Says something if Enterprise Manager shows different alerts, etc.

Gilberto
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests