SGA/PGA Sizes ???
I need help!
I have a Windows 2003 Server (w/sp2) with 4GB of RAM & 2 CPUs. Oracle 10.2.0.2 is installed.
ASMM is ENABLED by default (and it still is)
These are my sga/pga settings:
pga_aggregate_target = 1G
sga_max_size = 1504M
sga_target = 1000M
shared_pool_size = 504M
sort_area_size = 262144000 (250M)
large_pool_size = 104M
db_cache_size = 104M
I believe I should DISABLED ASMM, correct? Otherwise, my settings aren't used.
Based on my 4GB, I think Oracle can use 2GB of that.
What should I set the settings above too?
...thanks
First if you use Oracle's automatic memory management feature and provide spfile parameter values for parameters that are automatically managed by Oracle then the provided values are taken as minimum values for these areas. There are other situations where values for parameters like sort_area_size which is limited to 5% of pga_aggregate_target are in fact still referenced.
With a pga_aggregate_target of 1G I do not see any valid reason why you would have a sort_area_size set to 250M. What is the reason for this?
What kind of environment is this: OLTP, DSS, OLAP?
How many concurrent sessions?
Dedicated vs shared server?
Why do you not want to use automatic memory management? What problem have you encountered?
HTH -- Mark D Powell --
Similar Messages
-
Hi all
I Have a server System Configuration with
RAM size: 16GB Ram & Hard disk Size of 1TB.
I Installed Oracle 11g R2 in the server System
I want to Allocate Dedicated Memory for oracle..
How Should i calculate the Memory size of SGA+PGA for good Performance..Pl do not post duplicates - Reg:-SGA & PGA Memory Allocation Size
-
How to recommand sga & pga size for existing database?
Hi All,
In my environment there are 100s of databases running , in few servers we frequently getting the "Unable to allocate the shared memory" during job process. But the server have enough memory to allocate to the databases where ever the memory required.
Now the quesition is how to predict or estimate the required memory of that database?
Thanks903787 wrote:
Hi All,
In my environment there are 100s of databases running , in few servers we frequently getting the "Unable to allocate the shared memory" during job process. But the server have enough memory to allocate to the databases where ever the memory required.
Now the quesition is how to predict or estimate the required memory of that database?
Thanksquery V_$SGA_TARGET_ADVICE -
Hi I installed oracle 11g & create database , now i want to use fully optimize database.
Currently my DB server RAM is 16GB, how should i allocate SGA for this.If i used oracle 11g automatic memeory management feature to allocate SGA+PGA, how should i use them.Currentlymy SGA is set to 4GB, Please adviseHi,
It is depends upon the workload which you have in your organization(future and present situation)
SGA+PGA size will be automatically managed by Oracle. No need to worry about this.
If you need to increase Memory_Max_Size, you can also increase the Memory size in the future.
Thanks -
SGA, PGA & RAM Size?
our DB running in dedicated server mode(FYI).
am defining my SGA size 500MB, which is half the size of DB server 1gb RAM, it does not mean that my instance will not go beyond 500mb, if multiple users are connected & start using Sorts,(SORT_AREA_SIZE =1mb), apart from 500mb, each user whoever using sort area space will be allocated 1mb space in 1gB RAM, is it correct?
since SORT_AREA_SIZE can be modified at session level,each user can set their own sort area size, which may lead to paging, is it correct?
Sorts uses memory from PGA,PGA is not part of SGA,hence how to determine the PGA size?, is there any init.ora parameter for sizing PGA in ORACLE 8.1.7?The size of PGA will depends upon the containts of PGA which are Sort Area, Session Statistics Information, Stack Space, Cursor Information
I am not aware of any parameter to size the PGA.
I will check the documentation and will let you know.
Manu -
Reg:-SGA & PGA Memory Allocation Size
Hi all
I Have a server System Configuration with
RAM size: 16GB Ram & Hard disk Size of 1TB.
I Installed Oracle 11g R2 in the server System
I want to Allocate Dedicated Memory for oracle..
How Should i calculate the Memory size of SGA+PGA for good Performance..Check MOS
*How to calculate the memory used by dedicated and shared servers? [ID 551415.1]* -
Hello Guru,
How do i check what is my SGA and PGA..I am using TOAD..
I need to increase the SGA and PGA size...Please help..
I have a table having 200 million records, all indexes are there for the column..But it hang on in the debugging mode and also compile mode..
So i believe, I need to increase the SGA and PGA size...
Thanks,
Haraprasad...805936 wrote:
Hello Guru,
How do i check what is my SGA and PGA..I am using TOAD..
I need to increase the SGA and PGA size...Please help..
The current size for both SGA and PGA can be shown depending on the version of the db. For 10g, the SGA size is shown by sga_target parameter and PGA size is shown by pga_aggregate_target parameter. For 11g, the parameter memory_target sets them both.
I have a table having 200 million records, all indexes are there for the column..But it hang on in the debugging mode and also compile mode..
So i believe, I need to increase the SGA and PGA size...No, IMO, your believe doesn't hold much base as the evidence that you have used is insufficient. What is the debugging mode or compile mode ? For what purpose you are using these modes? 200 million is not a very large number if you ask me. Tell us your db version and based on it, generate a Statspack or AWR report and post here.
HTH
Aman.... -
SGA/PGA (Memory) in RAC environment.
Guys,
I would like to get your inputs on SGA / PGA settings on a RAC database.. Does LMS/LMON/LMD process use memory which is part of PGA or these process allocate memory at OS level ?
I would like to see the usage of Memory used by a database.
below sql from Mr. Kyte's website i have used. Somehow i am not getting real usage of the system. Any help would be appreciated.
Thanks
select
ssst.sid,
stn.name ,
round(ssst.value/1024/1024,2) memory ,
USERNAME,
COMMAND,
OSUSER,
MACHINE,
TERMINAL,
PROGRAM ,
ssst.STATISTIC#
from v$statname stn,v$sesstat ssst , v$session ses
where stn.STATISTIC# = ssst.STATISTIC# and
ssst.sid = ses.sid and
name like 'session%pga%memory%'
order by 3 asc ;
Edited by: P explorer on Aug 28, 2009 9:56 PMFrom sql script, that get "session pga memory","session pga memory max" each of session in oracle database(on that node)
You'll see
sid: session id
memory:
if "session pga memory" = pga memory in this session now
if "session pga memory max"= maximum pga memory in this session.
program: os program name
More deatails abour v$session http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2088.htm#REFRN30223
If need to know all PGA size in that node
"session pga memory":
select
round(sum(ssst.value)/1024/1024,2) memory
from v$statname stn,v$sesstat ssst , v$session ses
where stn.STATISTIC# = ssst.STATISTIC# and
ssst.sid = ses.sid and
name ='session pga memory';
"session pga memory max":
select
round(sum(ssst.value)/1024/1024,2) memory
from v$statname stn,v$sesstat ssst , v$session ses
where stn.STATISTIC# = ssst.STATISTIC# and
ssst.sid = ses.sid and
name ='session pga memory max';
Or if you need to check PGA memory all nodes (RAC)
COLUMN username FORMAT A20
COLUMN module FORMAT A20
SELECT a.inst_id,
NVL(a.username,'(oracle)') AS username,
a.module,
a.program,
Trunc(b.value/1024) AS memory_kb
FROM gv$session a,
gv$sesstat b,
gv$statname c
WHERE a.sid = b.sid
AND a.inst_id = b.inst_id
AND b.statistic# = c.statistic#
AND b.inst_id = c.inst_id
AND c.name = 'session pga memory'
AND a.program IS NOT NULL
ORDER BY b.value DESC; -
Hi All,
I have a little question, in our database configuration we have set the PGA size to 720 MB. I'm wondering do we need all this memory size?!!
All our applications that connect to the database are using normal select and dml statements no use of varray of bulk collect. So my questions are:
1. When a new session is established, an allocation of 720 MB is done for that session?
2. the swap file usage is around 33% of 33 GB size, If i reduce PGA size to 100MB for example, it will reduce my swap file usage?
Thankx in advance.Hi,
My Operating system is HP-UX ita. B11.23
My database version is 9i RAC (9.2.0.6) 2 Instance
OS Ram Size on each instance 16 GB
My SGA Size is 4 GB
I have no accurate method to size my session, but all of the database objects (Function, packages, ..) is using normal PL/SQL and SQL no use of advanced varray, bulk collect, etc.
Here is the result of my select * from v$pgastat (Inst1)
aggregate PGA target parameter 754974720
aggregate PGA auto target 435566592
global memory bound 37748736
total PGA inuse 270964736
total PGA allocated 310807552
maximum PGA allocated 783979520
total freeable PGA memory 11403264
PGA memory freed back to OS 4.63335E+11
total PGA used for auto workareas 16384
maximum PGA used for auto workareas 83709952
total PGA used for manual workareas 0
maximum PGA used for manual workareas 0
over allocation count 0
bytes processed 4.61963E+12
extra bytes read/written 10748186624
cache hit percentage 99.76
For instance2
aggregate PGA target parameter 754974720
aggregate PGA auto target 435566592
global memory bound 37748736
total PGA inuse 270964736
total PGA allocated 310807552
maximum PGA allocated 783979520
total freeable PGA memory 11403264
PGA memory freed back to OS 4.63335E+11
total PGA used for auto workareas 16384
maximum PGA used for auto workareas 83709952
total PGA used for manual workareas 0
maximum PGA used for manual workareas 0
over allocation count 0
bytes processed 4.61963E+12
extra bytes read/written 10748186624
cache hit percentage 99.76
My main concern is is that i want to eleminate Oracle usage of swap file, What should i do ?
I tried to minimize the use of FULL table scans, physical (Disk) reads and also minimize the number of logical (Buffer) reads by checking the values from select * from v$sql on both instances.
can you help me with more ideas to do?
Thanks in advance. -
Hi all,
My questions is regarding how to set up SGA & PGA target values giving DB server is MS 2003 Enterprise 64 edition sever with 63 GB of RAM. Our DB’s version is 10.2.0.3 and RACed with 2 instances.
Currently our setting for SGA is 23 GB and PGA is 4 GB. I ran the memory advisor it display different optimal values for those two instances (35 GB and 23 GB for SGA, 5 GB and 4 GB for PGA). Guess our db is not well balance loaded.
I would like to know if there is any rule(s) that SGA can’t be more than certain percentage of total RAM for the server.
Thanks a lot in advance.
Have a great weekend!!
ShirleyHi
Here is my approach:
1) consider free physical memory (meassure must be taken with Oracle down)
2) substract a 10% of that amount as a margin
3) if the box is exclusive for Oracle, the remaining amount may be your SGA+PGA limit
4) if not is exclusive, then substract memory required for other services, then you'll get the SGA+PGA limit.
5) Substract your PGA size, giving the SGA figure
For instance
59 Gb - 6 Gb = 53 Gb - 4 Gb = 49 Gb
(63 Gb -4 Gb [estimated OS footprint + IO cache]) = 59 Gb free physical memory
Setting PGA+SGA beyond the free physical memory figure, may lead to swaping and degraded system performance.
Regards
http://oracledisect.blogspot.com -
We use Oracle 11gr2 on win2008R2.
Our member set sga max size by
alter system set sga_max_size scope=spfile; max size to 6GB.
And we restared that OS and DB instance , then
show parameters sga_max_size was 7.6GB
Why is that ?If MEMORY_TARGET is set to a non-zero value:
If SGA_TARGET and PGA_AGGREGATE_TARGET are set, they will be considered the minimum values for the sizes of SGA and the PGA respectively. MEMORY_TARGET values can range from SGA_TARGET + PGA_AGGREGATE_TARGET to MEMORY_MAX_TARGET.
Now check if your memory_target is set.
Read this metalink note as well:
Automatic Memory Management (AMM) on 11g (Doc ID 443746.1) -
SGA, PGA and SHMMAX Setting
If I have set SHMMAX to 8GB (on 64bit linux) value, does that mean that my SGA+PGA values need to remain within 8GB limit? If my SGA size is 6GB and PGA size is 4GB, does that mean that my OS is going to allocate two shared memory segments?
The SHMMAX parameter is used to define the maximum size (in bytes) for a shared memory segment and should be set large enough for the largest SGA size.
http://www.idevelopment.info/data/Oracle/DBA_tips/Linux/LINUX_8.shtml
http://books.google.co.in/books?id=2ImPFP6Yk64C&pg=PA357&lpg=PA357&dq=PGA+is+included+in+SHMMAX&source=bl&ots=On3S7-CEX0&sig=LhOYOO946hrPZh-cIUEzWNiwpRg&hl=en&ei=xyLOTJqaC4yYvAONm7T3Dw&sa=X&oi=book_result&ct=result&resnum=5&ved=0CCwQ6AEwBA#v=onepage&q&f=false
Please close the thread as answered. -
What's the sga max size for a 32bit windows server?
Hi,
I have a 32bit Windows Server with 16G of RAM... What is the SGA max size that I can setup?Depending on your version of Windows and your version of Oracle there are methods to increase the usuable memory available to Oracle including the MS \3GB and \PAE switches and the AWE memory extention feature.
Oracle has notes on the subject:
Windows Memory Configuration: 32-bit and 64-bit 873752.1 plus notes 46053.1 and 46001.1
How to use Very Large Memory, higher than 4Gb on Windows 2003 32 bit #342080.1
HTH -- Mark D Powell -- -
Huge long time direct path read temp, but pga size is enough, one block p3
Hi Gurus,
Can you please kindly provide some points on my below questions. thanks
my env
select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
OS: Linux 4 2.6.39-100.5.1.el5uek
session operation: update a partition which have 4 partitions and total 16G
session trace info:
the session keep at active status and waiting for below wait event for more than 70 hours, and os iostats and cpu are almost idle on most time.
WAIT #8: nam='direct path read temp' ela= 7615 file number=202 first dba=105072 block cnt=1 obj#=104719 tim=1344850223569499
WAIT #8: nam='direct path read temp' ela= 5989 file number=202 first dba=85264 block cnt=1 obj#=104719 tim=1344850392833257
WAIT #8: nam='direct path read temp' ela= 319 file number=202 first dba=85248 block cnt=1 obj#=104719 tim=1344850399563184
WAIT #8: nam='direct path read temp' ela= 358 file number=202 first dba=85232 block cnt=1 obj#=104719 tim=1344850406016899
WAIT #8: nam='direct path read temp' ela= 349 file number=202 first dba=85216 block cnt=1 obj#=104719 tim=1344850413023792
WAIT #8: nam='direct path read temp' ela= 7975 file number=202 first dba=85200 block cnt=1 obj#=104719 tim=1344850419495645
WAIT #8: nam='direct path read temp' ela= 331 file number=202 first dba=85184 block cnt=1 obj#=104719 tim=1344850426233450
WAIT #8: nam='direct path read temp' ela= 2641 file number=202 first dba=82880 block cnt=1 obj#=104719 tim=1344850432699800
pgastat:
NAME VALUE/1024/1024 UNIT
aggregate PGA target parameter 18432 bytes
aggregate PGA auto target 16523.1475 bytes
global memory bound 1024 bytes
total PGA inuse 75.7246094 bytes
total PGA allocated 162.411133 bytes
maximum PGA allocated 514.130859 bytes
total freeable PGA memory 64.625 bytes
PGA memory freed back to OS 40425.1875 bytes
total PGA used for auto workareas 2.75195313 bytes
maximum PGA used for auto workareas 270.407227 bytes
total PGA used for manual workareas 0 bytes
NAME VALUE/1024/1024 UNIT
maximum PGA used for manual workareas 24.5429688 bytes
bytes processed 110558.951 bytes
extra bytes read/written 15021.2559 bytes
Most operation in PGA via query on V$SQL_WORKAREA_ACTIVE
IDX maintainenance (sort)
My questions:
1. why 'direct path read temp' just read one block every time, my understanding is this event can read one block and multiple blocks at one read call, why it keep read one block in my session?
2. my pga size is big enough, why this operation can not be treated with in PGA memory, instead of read block from disk into temp tablespace?
Thanks for you inputs.
Roy951241 wrote:
since the session(which was from hard code application) is completed.First of all, you showed wait events from sql trace in the first post. Is the tracing was disabled in the latest execution?
>
I just generated the AWR for that period, as get long elapsed time SQL as following
Elapsed Time (s) Executions Elapsed Time per Exec (s) %Total %CPU %IO SQL Id
3,075.35 0 85.10 91.03 8.68 duhz2wtduz709
524.11 1 524.11 14.50 99.29 0.30 3cpa9fxny9j35
so I get execution plan as below for these two SQL,
select * from table(dbms_xplan.display_awr('&v_sql_id')); duhz2wtduz709
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | UPDATE STATEMENT | | | | 4 (100)| |
| 1 | UPDATE | WORK_PAY_LINE | | | | |
| 2 | INDEX RANGE SCAN| WORK_PAY_LINE | 1 | 37 | 3 (0)| 00:00:01 |
Note
- automatic DOP: Computed Degree of Parallelism is 1 because of parallel thresholdI am not sure the why elapsed time in AWR is different with time in execution plan. Column "Time" in an execution plan is estimated time. In this execution plan Oracle expects to get 1 row, estimated time is 1 sec.
So, you need to check why estimated cardinality is such low, check statistics on the table WORK_PAY_LINE.
You update 10Gb from 16Gb table via Index Range Scan, it looks inefficient here by two reasons:
1. when a table updated via Index Range Scan optimized index maintenance is used. As a result some amount (significant in your case) of workareas is required. Required size depends on size and number of updated indexes and "global memory bound", 1Gb in your case.
2. if required table buffers will not be found in the cache it will be read from disk by single block reads. If you would use Full Table Scan then buffers for update most likely will be found in the cache because before it read by multiblock reads during Full Table Scan.
Figures from your AWR indicate, that only ~ 9% the session waited for I/O and 91% it worked and used CPU
Elapsed Time (s) Executions Elapsed Time per Exec (s) %Total %CPU %IO SQL Id
3,075.35 0 85.10 91.03 8.68 duhz2wtduz709 This amount of CPU time partially required for UPDATE 10Gb of data, partially for sorting during optimized index maintenance.
I would propose to use Table Full Scan here.
Also you can play around and create fake trigger on update, it will make impossible to use optimized index maintenance, usual index maintenance will be used. As a result you can check the same update with the same execution plan (with Index Range Scan) but without optimized index maintenance and "direct path .. temp" wait events.
Alexander Anokhin
http://alexanderanokhin.wordpress.com/ -
Hi,
I have Fujitsu mid range Server with 16gb RAM and 64 bit Windows Server 2003,10g R2 db installed, current i have SGA size 4gb..
What is SGA max size limit????
One of my report runs in 24 seconds...*will this issue b solved increasing the SGA size upto 10,12 gb?*Yes,
You can also go for a 10046 event tracing...
ACCEPT sid PROMPT 'Enter SID: '
ACCEPT serial PROMPT 'Enter SERIAL#: '
ACCEPT action PROMPT 'Enter TRUE or FALSE: '
EXEC sys.DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION(&sid,&serial,&action);
prompt Trace &action for &sid,&serial
exec DBMS_SYSTEM.SET_EV(10,20,10046,12,”);
Then you can check your dump file and see whcih events are higher......
For Eg. content could be like:
=====================
PARSING IN CURSOR #6 len=107 dep=1 uid=44 oct=6 lid=44 tim=1621758552415 hv=3988607735 ad='902c07a8'
UPDATE rn_lu_lastname_loca set entr_loca_id_plz14 = translate(entr_loca_id_plz14,'_','-') where rowid = :b1
END OF STMT
PARSE #6:c=0,e=981,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=0,tim=1621758552403
BINDS #6:
bind 0: dty=1 mxl=32(18) mal=00 scl=00 pre=00 oacflg=13 oacfl2=1 size=32 offset=0
bfp=10331d748 bln=32 avl=18 flg=09
value="AAAHINAATAAAwTTABV"
WAIT #6: nam='db file sequential read' ela= 12170 p1=6 p2=197843 p3=1
WAIT #6: nam='db file sequential read' ela= 8051 p1=14 p2=261084 p3=1
WAIT #6: nam='db file sequential read' ela= 7165 p1=19 p2=147722 p3=1
WAIT #6: nam='db file sequential read' ela= 9604 p1=19 p2=133999 p3=1
WAIT #6: nam='db file sequential read' ela= 6381 p1=19 p2=133801 p3=1
EXEC #6:c=10000,e=45750,p=5,cr=1,cu=10,mis=0,r=1,dep=1,og=4,tim=1621758598343
FETCH #5:c=0,e=357,p=0,cr=5,cu=0,mis=0,r=0,dep=1,og=4,tim=1621758598896
EXEC #1:c=30000,e=116691,p=36,cr=35,cu=10,mis=0,r=1,dep=0,og=4,tim=1621758599043
WAIT #1: nam='SQL*Net message to client' ela= 5 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message from client' ela= 2283 p1=1413697536 p2=1 p3=0
Lines that start with WAIT
len Length of SQL statement.
dep Recursive depth of the cursor.
uid Schema user id of parsing user.
oct Oracle command type.
lid Privilege user id.
ela Elapsed time. 8i: in 1/1000th of a second, 9i: 1/1'000'000th of a second
tim Timestamp. Pre-Oracle9i, the times recorded by Oracle only have a resolution of 1/100th of a second (10mS). As of Oracle9i some times are available to microsecond accuracy (1/1,000,000th of a second). The timestamp can be used to determine times between points in the trace file. The value is the value in v$timer when the line was written. If there are TIMESTAMPS in the file you can use the difference between 'tim' values to determine an absolute time.
hv Hash id.
ad SQLTEXT address (see v$sqlarea and v$sqltext).
Lines that start with PARSE, EXEC or FETCH
#n n = number of cursor
c cpu time
e elapsed time
p physical reads
cr consistant reads
cu current mode reads
mis miss in cache (?)
r rows processed
dep recursive depth
og optimizer goal
tim time Content
Maybe you are looking for
-
My iPod Touch is messed up!!! Something is REALLY wrong!
Last night, I had no problem at all, whatsoever. This morning, I was on the bus, and it was working fine, UNTIL I arrived at the school. It was slowing down and it froze! That is not my problem. What I am going through is a huge predicament. It comes
-
Configuring Aironet 1040 with WPA2-PSK
I am attempting to configure two Aironet 1040 series wireless access points for the first time and am having some difficulty. This office does not have a RADIUS server so I would like to set them up to use WPA2 with a pre-shared key. However just how
-
Adobe Pro 9 Shared Review Issues
I have run into an issue with a "Shared Review" on a document. I am using Windows 7 Pro SP1; Dell Vostro 260, Processor i3-2120, 8GB RAM, 64 Bit OS. Adobe Pro 9 is the Adobe product that I am using to initiate the review process. The document was on
-
We are using Designer9i and have an existing repository. We need to generate a new repository from the existing repository with the following modifications. 1. For table names, add "NEW_" prior to the table name. 2. Add a new column named with "N_" p
-
How to get list of VMs running under SCVMM using SCORCH activities
hello, I am in learning phase on SCORCH...I wants to know steps required to get list of VMs running under SCVMM using SCORCH activities. Thanks Richa KM