Analysis sga/pga growth
Hi,
We using oracle version 11.2.0.1 on AIX 6 and we using OEM.
I am asked to gather last one week stats (high level and lower level in a day)for tablespace,SGA,PGA and resource_limit ,open_cursor parameter.
How to collect it.Is there any query to find it ?
Thanks,
922884 wrote:
Hi,
Thanks for your repsonse.
Architect asking that.
Can i use DBA_HIST_SGA ,DBA_HIST_SGAstat for sga and DBA_HIST_TBSPC_SPACE_USAGE ,DBA_HIST_TABLESPACE_STAT for tablespace.
could you tell for resource_limit and open_cursor.How to collect those values ?
ThanksWhen you start with the wrong question, no matter how good an answer you get, it won't matter very much.
Do you realize that OPEN_CURSOR is a per session limit?
Similar Messages
-
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 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 -
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 -
SGA, PGA and... little extra?
Will oracle process use some extra "non oracle" memory for OS related stuff?
Mean, not considering SGA, I connect a database process and I see:
SQL> select p.program,
2 p.spid, pm.category, pm.allocated/1024 allocated, pm.used/1024 used, pm.max_allocated/1024 max_allocated
3 from V$PROCESS p, V$PROCESS_MEMORY pm
4 where p.pid = pm.pid
5 and p.spid =2650;
Max
Allocated Usedd allocated
PROGRAM SPID CATEGORY Kb Kb Kb
oracle@uxlabhost11 2650 SQL 14 9 42
oracle@uxlabhost11 2650 PL/SQL 56 34 57
oracle@uxlabhost11 2650 Other 1501 1501That's allocated PGA after having connected and done nothing else
So it somehow allocated 1.4 Mb upon start-up...
Now question is. Do oracle processes use OS memory which cannot be considered as SGA or PGA?
Reason being my trying to estimate memory needs for a database server. Many I've read correct formula should be SGA + max allocated PGA + some_extra_just_in_case...
Is there an estimate on how much that "some_extra_just_in_case" would be per process?
If OS dependent, I'm implementing on RHEL 6...
thanksSo, I've used pmap...
Got 257 enties in the form "4096K rw-s- /dev/shm/"
since we are using AMM , that should do for PGA and SGA ... some 1052672 Kb, which process is attached to...
yet pmap then continues to display other entries....
0000002a95557000 4K r-x-- /opt/oracle/product/11g/lib/libodm11.so
0000002a95558000 1024K ----- /opt/oracle/product/11g/lib/libodm11.so
0000002a95658000 4K rw--- /opt/oracle/product/11g/lib/libodm11.so
0000002a95659000 4K rw--- [ anon ]
0000002a9565a000 392K r-x-- /opt/oracle/product/11g/lib/libcell11.so
0000002a956bc000 1024K ----- /opt/oracle/product/11g/lib/libcell11.so
0000002a957bc000 40K rw--- /opt/oracle/product/11g/lib/libcell11.so
0000002a957c6000 4K rw--- [ anon ]
0000002a957c7000 864K r-x-- /opt/oracle/product/11g/lib/libskgxp11.so
.. TRUNCATED...
0000003fb810a000 64K rw--- [ anon ]
0000003fbbd00000 84K r-x-- /lib64/libnsl-2.3.4.so
0000003fbbd15000 1020K ----- /lib64/libnsl-2.3.4.so
0000003fbbe14000 4K r---- /lib64/libnsl-2.3.4.so
0000003fbbe15000 4K rw--- /lib64/libnsl-2.3.4.so
0000003fbbe16000 8K rw--- [ anon ]
0000007fbffde000 136K rwx-- [ stack ]
ffffffffff600000 4K r-x-- [ anon ]
total 1276452KNotice "total 1276452K"
So you saying non SGA/PGA would be 1276452 - 1052672?
That would be too much... yet if pmap another process, almost all flags (hex column) but [ stack ] are the same....
So how to tell which of those are shared and which are "exclusive" to the process, i.e: The "some extra just in case" mem...
thanks -
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
-
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]* -
Hi to All,
Exist a method in order to optimize SGA & PGA, installing a DB in Oracle DB 10g?
Best Regards
GaetanoAutomatic Shared Memory Management(ASMM)
Requirements:
SGA_TARGET >0
STATISTICS_LEVEL=TYPICAL or ALL.
The below mentioned parameters are auto-tuned by oracle.
SHARED POOL
LARGE POOL
JAVA POOL
DB CACHE
Refer to Note:295626.1 from Metalink.(SGA)
Refer to Note:223730.1 from metalink (PGA) -
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?
...thanksFirst 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 -- -
Hi all;
i wanna learn something about sga and pga... I have r11 instance on linux and db version is 10.2.0.3...Let say my sga=5 Gb and pga is=3gb...my server has 20gb ram...when i look my usage by top command and i see that:
Mem: 20550320k total, 20491732k used why linux allocate all those area?
i have 20 Gb ram and sga+pga=8 soo which oracle process use 12 Gb?
and advicer gives me adivice about SGA... it offers 10 Gb SGA... if i rise my sga what is my benefit? what it would change?
thanks alotHi hussien;
Thanks for again answers and help
You need to identify what other processes are running on this node. For example, if you have CM running on the database tier node, then it is expected to find more memory allocated. You can simply stop all the services on the server and start it one by one, and each time and keep an eye on the allocated memory.Its my mistake, coz i talked wiht my client and they said me they are working on this machine and thatswhy i had this memory usage.. sory for this mistake again (but your post helped me alot,coz i asked them what they are doing for a now ,and they gave me that answer :),thanks for leading)
Since you are on 10g, I would suggest you also go through the following document.
Note: 295626.1 - How To Use Automatic Shared Memory Management (ASMM) In Oracle10g
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=295626.1
If you still have any queries, please feel free to post it here.Thanks for note.. i am reading it and its soo usefull for me, thanks for sharing your knowledge here wiht us hussein..
you are an oracle angle :)
regards
Helios
Edited by: helios on 12.May.2009 06:58 -
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. -
All about PnL[Profit and Loss] and SGA[Sales Growth analysis]
hello SDN.
I have just joined a consumer goods MNC as an executive trainee working on SAP BI.
My current profile is on SGA loading and PnL loading.
Can anyone tell me more about SGA and PnL.
I do not want the SAP technical points.
I need the core business explanation for these topics.
Why are they needed and what role they play at the management level, etc...
Waiting for the reply eagerly
ThanksHi,
I think u r asking more on functional analysis, Management uses Sales Growth Analysis (also called Top Line analysis) to know the growth rate in their Revenues, it shows their Market share and customer retention and new customers added, whether their promotional campaigns worked or not? like this it helps the management.
Coming to Profit and loss analysis or also called as Bottom line analysis, it shows their efficiency in optimum utilization of resources, increase or decrease in operating expenses etc.
based on the above two analysis, the scenarios may be like this:
Revenues increased, but profit come down, what r the reasons?
Revenues decreased, but profits increased, reasons?
etc.
this may be useful
Thanks
Ganesh -
Kernel para and sga,pga sizing
Hello,
OS-HP-UX(configured to use high sga /no restrictions)
Current database is running without any issue
Due to increase in physical ram i plan to increase sga and pga(ram is increase about 3 times)
My question:
1)should i also increase sga and pga in same propotion (3 times then existing)
or use 70% ROT formula
2)whatever figure i arrive by analysis for increasing sga,do i need to change kernel parameters also
(does i requre to change kernel parameter every time ram and sga is increased)
Please suggest
Thanks880991 wrote:
Ok some questions based on your reply:
1)then how any gain in upgrading memory above 4 GB if shmmax cannot be more then 4 GB (32 bit OS),then
SGA also cannot be > 4GB (As per documents SHMMAX should be > SGA)Because the SGA doesn't have to be in one segment. Which version of Oracle are you looking at? It makes a difference!
http://kevinclosson.wordpress.com/2009/07/27/little-things-doth-crabby-make-part-x-posts-about-linux-hugepages-makes-some-crabby-it-seems/
>
2)I read if Operating system is linux can use SGA above 4GB,in fact one of friend told they implemented SGA
4GB on linux configuring VLM/Huge pages,so in that case ( VLM ) needs to set SHMMAX > 4GB (as per memory ROT) of VLM take cares of SGA > 4GB even if SHMMAX is not setintrestingly my friend also mentioned that in there server VLM is set and shmmax is set < 4 GB and SGA > 4GB
still it works without problem when checking SGA usage in dyanamic views its shown as using above 4 GB
,it contradicts what i read in documents,how this is working ,anyone have idea?[url http://download.oracle.com/docs/cd/B28359_01/server.111/b32009/appi_vlm.htm]No contradiction.
Also VLM implementation is restricted to Linux or it can be on set on Unix as well and if its set do all components
of SGA benefit or only buffer cache?
ThanksIt varies, some unix are quite different than others. Specific answers can only be given to specific configurations. I really have to wonder when you are asking about hp-ux and 32 bit. -
With an XE limitation of 1GB for the PGA and SGA, how would one best preserve this limitation?
In other words, how would one minimise the PGA and SGA usage via ones interface with Oracle?
For instance, in a SQL query I was building I could either (The query has multiple aggregates on multiple tables in a 'one to many' join relationship):
1) Use WITH clauses
2) Use inline views
3) Use standard views
4) Use temporary tables
5) Maybe more possibilities
Without much of an insite into how Oracle 'works' it's difficult to gauge which of these is less 'resource hungry'.
Possibly there is a reference on how to use the PGA & SGA efficiently?
Or possibly a more definitive explanation on what's actually stored in these memory areas (rather than just 'prorgam' and 'system' data).
Regards all,SGA is used in 2 main areas: parsing the SQL and avoiding disk reads by having stuff in memory. There is one SGA for all of XE instance.
PGA is used heavily for sorting, hash joining and 'working stuff'. The PGA is created for each Dedicated Server process. Much of the PGA is inside the SGA for Shared Server processes
SGA: (There are exceptions to each of these 'Rules Of Thumb' or 'ROT' statements)
Good coding technique will allow reuse of SQL and avoid as much as possible reparsing;
Use bind variables;
Do not create SQL on the fly;
Avoid dynamic SQL (concat strings to create SQL on the fly);
Forget about tweakiing the buffer cache as it is mainly a performance thing that you can't do much about in XE;
WITH clause is nice as it may reduce the count of subqueries;
Leave it with 'automatic memory management' (again a perf hit, but it will attempt to optimize mem availability);
Don't reinvent - Use the features that are loaded as they will likely get statements out faster, releasing memory faster;
Stored Views may (often do) grab unneeded table data. When joining to stored views, see whether they can be replaced by cleaner code;
Do not create SQL on the fly.
PGA:
Use shared server when feasible (at risk of performance hit);
Global Temp Tables go into PGA, watch the use;
Maximize reuabale SQL, minimze all other languages (remote or in DB) including PL/SQL;
Watch for PGA wasters such as UNION vs the better UNION ALL, and unneeded sorts;
PGA is 'swapped out' to Temporary tablespace. Make sure temp tablespace big enough ... it's not counted in the 4GB disk;
Avoid using COMMIT except at end of transaction. Avoid COMMIT in loops. Make sure undo tablespace is big enough ... it's not counted in the 4GB disk ;
Did I mention it's not a good idea to create SQL on the fly? -
Oracle Concepts: Query on SQL Processing (execution in SGA/PGA)
Hi,
I need some clarity on my understanding, suppose there is a query:
SELECT t1.c1, t1.c2
FROM t1, t2
WHERE t1.c3 = t2.c1
ORDER BY t1.c1;User A submits above query and following steps are executed:
Syntax Check -in PGA
Semantic Check -in PGA
Shared Pool Check (unsuccessful) -in SGA
Optimization (Hard Parse) -in SGA
Row Source Generation (Hard Parse) -in SGA
Execution - in SGA?User B submits same query and following steps are executed:
Syntax Check -in PGA
Semantic Check -in PGA
Shared Pool Check (successful) -in SGA
(Soft Parse)
Execution - in SGA?First question (General):
I thought Execution happens in SGA, but sorting, hashing, and/or merging bitmaps happens in PGA (temporary segment) so is it a sub-part of Execution that happens in user's PGA?
Second question (For user B):
Once Shared Pool Check is successful, and plan/data-sets are already in SGA, so sorting, hashing, and/or merging bitmaps will happen on these data-sets in user B's PGA again?
Regards,
Ankit Rathi
http://oraclenbeyond.blogspot.inOnB wrote:
Hi,
I need some clarity on my understanding, suppose there is a query:
SELECT t1.c1, t1.c2
FROM t1, t2
WHERE t1.c3 = t2.c1
ORDER BY t1.c1;User A submits above query and following steps are executed:
Syntax Check -in PGA
Semantic Check -in PGA
Shared Pool Check (unsuccessful) -in SGA
Optimization (Hard Parse) -in SGA
Row Source Generation (Hard Parse) -in SGA
Execution - in SGA?User B submits same query and following steps are executed:
Syntax Check -in PGA
Semantic Check -in PGA
Shared Pool Check (successful) -in SGA
(Soft Parse)
Execution - in SGA?First question (General):
I thought Execution happens in SGA, but sorting, hashing, and/or merging bitmaps happens in PGA (temporary segment) so is it a sub-part of Execution that happens in user's PGA?The execution happens in the SGA(Buffer cache) but any kinds of such processing like sorting is session specific and that's why it happens in the PGA of that user.
>
Second question (For user B):
Once Shared Pool Check is successful, and plan/data-sets are already in SGA, so sorting, hashing, and/or merging bitmaps will happen on these data-sets in user B's PGA again?Yes.
That said, can you post a link that confirms that the syntax/semantics check happen in the PGA? AFAIK it's not really a part of the PGA because oracle's code itself would store the grammar and would do it .
Aman....
Maybe you are looking for
-
Good day sir, please i just got an iPAD 4 and I have bee having a serious difficulties performing some operations on it of which was told it is possible one of which is to create a microsoft word documents on my iPAD the second is attaching a file t
-
Ajax cfc issue -- indeterminent error msg
I have one ajax cfc app that works fine. This app uses the file name from the browse button on the file input object that is passed to my proxy.cfc, which in turn, queries the attachments table in my db to see if this file has already been uploaded
-
Problem saving outline pattern on spreadsheet
Hi All, I've recently downloaded IWork 08 trial software, and have set up a spreadsheet, but I don't seem able to save the outline of the cells. I drag the cursor, select my cell borders, but as soon as I click, the lines vanish and the sheet prints
-
Hyper-V on Windows 8.1 - RDP
Hi, I've built up a few VMs which all talk to each other via an internal network. One of these is a DC and the rest of the servers point to this server for DNS. With this setup how can I RDP from my host into any of the client VMs? Do I need to do a
-
UCE + Extension Mobility without using CUE
Hi all, Im trying to set up extension mobility without using a CUE module. I have the configuration set up correctly, but im having all sorts of issues with the url services. Can anyone offer any insight / requests for information that might help wor