SGA_MAX_SIZE and SGA_TARGET

DBAs,
can any one tell me in brief how SGA_MAX_SIZE and SGA_TARGET helps to tune the instance?
i have gone through with vairous link but still confuse.
Regards,
BK

hi BK,
SGA_MAX_SIZE is the maximum sizeof the shared global area (system global area), and SGA_TARGET is set when you want to use ASSM (automatic shared memory management) which is a 10g feature.
You are alos adviced to post oracle version and os.. SGA_TARGET when set, then oracle automatically manages the memory and if not set then you have to set SGA_MAX _SIZE and manually set others memory components accordingly and tune them.
I hope this helps you in a small manner
Thanks and Regards
VD

Similar Messages

  • Difference between SGA_MAX_SIZE and SGA_TARGET

    Difference between SGA_MAX_SIZE and SGA_TARGET

    user8645026 wrote:
    Difference between SGA_MAX_SIZE and SGA_TARGETIs discussed in the database forum, not the forum for which the title is " Community Feedback and Suggestions (Do Not Post Product-Related Questions Here)".
    Is also discussed in the documentation at http://tahiti.oracle.com

  • Issue creating a database: SGA_MAX_SIZE and SGA_TARGET

    Hello:
    While creating a custom database, I am running into issues with the values I specify for SGA_MAX_SIZE and SGA_TARGET.
    The install manual for the product I am creating the database for says that SGA_MAX_SIZE should be >= SGA_TARGET_SIZE. It also wants a minimum of 1Gig for SGA_Target
    The Database Configuration Assistant defaulted to 0.64GB for SGA_TARGET and 0.168 for SGA_MAX_SIZE (This is clearly against the instruction in the installation manual).
    Who is right? Me or the vendor?
    I read some threads that indicate that the vendor may be wrong.
    venki

    Follow the vendor's instructions.
    DBCA has never in its existence made a correct decision yet. It puts all control files and redo logs into one directory.
    It doesn't create multiple members for the log file groups.
    And its memory management is based on a simple algorithm that has nothing to do with any specific reality.
    DBCA is intended for creating a generic database for generic purposes ... and that it does very very well.

  • Increase the SGA_MAX_SIZE and SGA_TARGET parameters

    HI ,
    I am using oracle 10g R2 and windows server 2003 .
    My server is having 8 GB RAM .
    I want to increase the SGA_MAX_SIZE and SGA_TARGET parameters .
    I am using the below command , but getting the error
    SQL> alter system set sga_max_size=2000M scope=spfile ;
    alter system set sga_max_size=2000M scope=spfile
    ERROR at line 1:
    ORA-32001: write to SPFILE requested but no SPFILE specified at startup
    Can someone please help ..

    hi
    connect as sys user and then try...
    first make folder as backup and then copy the old SPFILEorcl to the same folder(backup)
    now you can easily modify the files otherwise you will get error..
    you will find here..
    C:\ORACLE_HOME\database
    SQL>  alter system set sga_max_size=2000M scope=spfile ;
    System altered.OR.
    connect as sys user.
    and do the following...
    1).SQL>create pfile from spfile;
    2).modify the pfile and decrease\increase the size of pools.
    3).shutdown database.
    4). Startup database using created pfile.
    if it start ok then.
    5.) Recreate the Spfile with the created Pfile.
    SQL>create spfile from pfile;sarah

  • Increase SGA_MAX_SIZE and SGA_TARGET

    Hi all,
    I want to increase SGA_MAX_SIZE and SGA_TARGET in 10g. Currently we have
    SQL> sho parameter sga
    NAME TYPE VALUE
    lock_sga boolean FALSE
    pre_page_sga boolean FALSE
    sga_max_size big integer 2384M
    sga_target big integer 2384M
    And we have 16GB RAM in redhat linux 4(32 bit).Oracle 10.2.0.3 DB.
    Because of 32 bit OS, I was not able to increase shmmax more than 4GB.
    In this situation how and how much SGA_MAX_SIZE and SGA_TARGET I can increase?
    Thanks in Advance,
    Sunil

    Hi sunilgln,
    Given the present state of things, you have to take a meassure of how many RAM is used with nothing running but the OS, that will give you the Linux footprint.
    Take note of the amount of physical free memory (using <strong>top</strong> command)
    Later you have to estimate how much swapping are you willing to accept, the SGA you define may be within the ranges of
    FREE MEM*90% and FREE MEM*90+(OS FOOTPRINT*%SWAP MEMORY WILLING TO USE)
    <em>This is a proposal for setting this up, you need to tune and balance load depending on usage.</em>
    Another recommendation, SGA_TARGET is <strong>dynamic</strong>, SGA_MAX_SIZE is not...but you may set SGA_MAX_SIZE to a full allocation and set SGA_TARGET to a percentage that allocation and gradually use it.
    What happens is: the OS will "allocate" a chunk(or chunks) the size given by SGA_MAX_SIZE, but the real usage by the database will be determined by SGA_TARGET.
    Hope this helps you
    Ignacio
    Regards
    http://oracledisect.blogspot.com

  • Sga_max_size and sga_target values

    I have an 11g database on windows with 4GB RAM, I have set the MEMORY_MAX_TARGET and MEMORY_TARGET, what should I do with the pre-existing sga_max_size and sga_target values

    memory_target = sga_target + max(pga_aggregate_target, maximum PGA allocated)
    MEMORY_MAX_TARGET = sum of the SGA and instance PGA sizes.
    For Automatic memory management
    set
    ALTER SYSTEM SET SGA_TARGET = 0;
    ALTER SYSTEM SET PGA_AGGREGATE_TARGET = 0;
    Note:
    In a text initialization parameter file, if you omit the line for MEMORY_MAX_TARGET and include a value for MEMORY_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.
    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.
    Reference

  • SGA_MAX_SIZE and SGA_TARGET how to set minimum for pools

    Hello, we are on 10.2.0.4, Solaris 5.10. We are using ASMM, so SGA_TARGET and SGA_TARGET size are set. Hence, buffer cache, shared pool, large pool and java pool are automatically sized. However, we do not have any minimum values for those. How do I determine what this minimum value should be?
    thank you!

    HI,
    Yes you need size the minimum value for shared pool, buffer cahce tec... else it will start consuming wholeThe documentaion
    states:
    You need not set the size of any of these components explicitly. By default the parameters for these components will appear to have values of zero. Whenever a component needs memory, it can request that it be transferred from another component by way of the internal automatic tuning mechanism. This transfer of memory occurs transparently, without user intervention.Can you please explain how would it start consuming the entire SGA?

  • SGA_MAX_SIZE  and  SGA_TARGET  in Oracle 10G

    We have the following H/W with Solaris 9
    SPARC-IV 16 CPUs
    32GB RAM
    128GB swap
    What is the optimal size of sga_target and sga_max_size that can be configured for a heavy batch processing oracle server. Nothing runs except oracle in the above server.
    We have currently 3GB SGA size , however our heavy queries are very slow.
    We have huge updates on tables with more than 200Millions rows.
    Do we need to have JAVA_POOL if the java stored procedure are NOT used.
    However we are connecting to this database using JDBC also.
    Moreover ASM is enabled in this server.
    You expert suggetions are always welcome.

    That's not a question that can be answered easily. It depends very much on where the time is going. Three main targets:
    Writing the log file - which is largely about use of disks, not memory.
    Reading data - lots of single block reads suggest looking at a bigger cache
    Reading and writing temp because of large sorts/hash joins - pga configuration
    One difficulty with TEMP is that the I/Os are often asynchronous, so a session can do a lot of TEMP I/O without recording much time - which means it can cause a problem elsewhere without suffering a problem itself.
    You didn't mention the pga_aggregate_size - which is an important consideration in 10g and can be more important than the sga sizing in DSS and batch-like processing. Between them, the SGA and PGA_aggregate_target should probably account for a very large fraction of your memory - but (since you are on Solaris) make sure you look into large memory pages and intimate shared memory, otherwise you may need to leave a lot of memory available for the O/S memory management mechanisms.
    As far as the java pool is concerned, check v$sgastat for pools which constantly show free memory, and reclaim any large free volumes.
    Bottom line - if you've got the memory in the box, you might as well use it in the best possible place; but at the moment we don't have enough information to tell us where it would be most useful.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk

  • Relative size of sga_max_size and sga_target to the physical memory

    Dear Experts,
    I have installed oracle 10.2.0.4 on AIX 5.3 with 32 GB of physical memory.
    Let us say other applications on the server consume 10 GB of physical memory.
    Now how should i plan the size of SGA_TARGET and SGA_MAX_SIZE on the same.

    As per Oracle® Database Performance Tuning Guide 10g Release 2 (10.2):
    You must then divide the resulting memory between the SGA and the PGA.
    For OLTP systems, the PGA memory typically accounts for a small fraction of the total memory available (for example, 20%), leaving 80% for the SGA.
    For DSS systems running large, memory-intensive queries, PGA memory can typically use up to 70% of that total (up to 2.2 GB in this example).
    Good initial values for the parameter PGA_AGGREGATE_TARGET might be:
    For OLTP: PGA_AGGREGATE_TARGET = (total_mem * 80%) * 20%
    For DSS: PGA_AGGREGATE_TARGET = (total_mem * 80%) * 50%
    where total_mem is the total amount of physical memory available on the system.
    (http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14211/memory.htm#i49320)

  • Sga_max_size vs sga_target

    Whats the difference between SGA_MAX_SIZE and SGA_TARGET? I am bit confused.
    As per Oracle® Database Reference 10g Release 1 (10.1)
    SGA_MAX_SIZE specifies the maximum size of the SGA for the lifetime of the instance
    Then why SGA_TARGET is used.
    I am missing something here. Kindly clarify.
    Thanks in Advance
    SID.

    Max_size is what the SGA can grow to if it has to.
    SGA_Target is what you'd like the SGA to be.
    Then why SGA_TARGET is used.
    Because you might want to dynamically grow your SGA, above the target. Suppose someone gives you a transportable tablespace and it comes from a 4K-blocksize database, and you're using 8K blocks. You have to 'alter system set db_4k_cache_size=something', but if you try that when your TARGET already equals your MAX_SIZE, you'll be told there's no room to grow the SGA, so the only way to achieve what you want is to shrink some other part of the SGA or to set the parameter in your init.ora and bounce. Either could be problematic on a production box. That's just one example: remember that 'SGA_TARGET' is indeed only a target: Oracle is allowed to exceed the target if thinks the workload makes it necessary to do so.
    So the difference between MAX_SIZE and TARGET is 'slack space': memory that's not in use, but could be if you (or Oracle) determined a need for it.
    On a lot of operating systems, this difference is paged out and thus doesn't mean you're wasting real, physical memory.
    But on others (and I think this is true of Windows and Linux), you would indeed be 'consuming' that memory difference -which would thus amount to wasted physical memory.

  • SGA_MAX_SIZE != SGA_TARGET when?

    Just curious... under what circumstances, when using ASMM, would I not want SGA_TARGET to equal SGA_MAX_TARGET?
    Bob

    Just to clarify things up,
    Oracle will allocate SGA size equal to SGA_MAX_SIZE from system initially.
    SGA_TARGE can be smaller than SGA_MAX_SIZE because they are buffer caches, such as KEEP, RECYCLE, and other block sizes, not affected by SGA_TARGET.
    See the result below,
    SYS@etest> show sga
    Total System Global Area  264241152 bytes
    Fixed Size                  1301408 bytes
    Variable Size             216540256 bytes
    Database Buffers           46137344 bytes
    Redo Buffers                 262144 bytes
    SYS@etest> show parameter sga
    NAME                                 TYPE        VALUE
    lock_sga                             boolean     FALSE
    pre_page_sga                         boolean     TRUE
    sga_max_size                         big integer 252M
    sga_target                           big integer 200MOracle SGA size is 264241152/1024/1024=252M equal to SGA_MAX_SIZE while SGA_TARGET is 200M
    Since I don't have other buffers set, Where the 50M goes ?
    SYS@etest> select * from v$sgainfo
      2  /
    NAME                                  BYTES RES
    Fixed SGA Size                      1301408 No
    Redo Buffers                         262144 No
    Buffer Cache Size                  46137344 Yes
    Shared Pool Size                  150994944 Yes
    Large Pool Size                     4194304 Yes
    Java Pool Size                      4194304 Yes
    Streams Pool Size                         0 Yes
    Granule Size                        4194304 No
    Maximum SGA Size                  264241152 No
    Startup overhead in Shared Pool    37748736 No
    Free SGA Memory Available 54525952
    11 rows selected.It went to Free SGA Memory Available. Hence you can dynamically increase SGA_TARGET without reboot instance.

  • SGA_MAX_SIZE and shmmax values

    All,
    My environment is
    Oralce - 10.2.0.4.0
    Two node RAC environment
    Red hat Enterprise Linux 5 64 bit operating system
    RAM size - 64 GB
    shmmax - 4294967295 (one byte less than 4 GB)
    SGA_MAX_SIZE = 3808M
    SGA_TARGET = 3808M
    PGA_AGGREGATE_TARGET=1000M
    When I run the ADDM, it is telling that SGA was inadequately sized, increase the sga_target to 4760M. It says that 33% impact.
    In my case, I need to increase SGA_MAX_SIZE.
    I may be wrong, but from google, i assume that SGA_MAX_ZIZE can't be more than shmmax. Is it true?
    If I have to increase the shmax, is it fine to increase to 5 GB based on ADDM recommendataion. Are there any harm to increase the shmmax to 20GB are so for safer side?
    Any relation beween shmmax and RAM size?
    If I have to alter the SGA_MAX_SIZE in RAC, I need to bounce the database or i can do one instance at a time right. If I am going with one node at a time, since it is a production, what will happen to the connections in that node when i am restarting that particular instance? I have a TAF policy of "Basic".
    is it like all the select statements will be moved to survival node whereas insert, update and delete transactions will be broken?
    Awaiting your help..

    Always it is recommended to keep "shmmax" half the size of physical memory.
    First you need to increase shmmax and then increase the SGA_MAX_SIZE as per ADDM.
    See the below doc for all your answers answers.
    http://download.oracle.com/docs/cd/B19306_01/install.102/b15668/toc.htm#BGBDFIGF
    Hope this solves your issue.
    Regards,
    Satishbabu Gunukula
    hthttp://www.oracleracexpert.com
    Click here for solution - [ORA-19755 Error during recovery/DB startup|http://www.oracleracexpert.com/2009/09/ora-19755-could-not-open-change.html]
    Click here to learn [Block corruption and recovery|http://www.oracleracexpert.com/2009/08/block-corruption-and-recovery.html]
    Click here to learn [Transportable tablespace export and import |http://www.oracleracexpert.com/2009/09/transportable-tablespace-export-and.html]
    Edited by: Satishbabu Gunukula on Sep 23, 2009 2:43 PM

  • Log Buffer and SGA_target

    Hello,
    What should be the best sizing for an Oracle db 10g, windows server 2003, 4gb ram + 2 processors, process over 5 mills records a day, using sqlldr, many pls, etc.
    Now it has 100m log_buffer and sga_target 612m, but it´s very low and per each second generates log files, till 2 -3 log files per second, the size of each file is 5m.
    Please help, I would like it to generate log files per each hour. Please let me know the combination of parameters that I would have to change.
    Thanks in advance,
    Juan Angel

    Mark,
    I installed the DB, in fact, I am not a DBA, I am in charge of the revenue assurance department for a Telco company, I do not know that much about setting up a DB, I used to be an oracle analyst only.
    How do I resize them?, the manual says about improving the checkpointing, there are two parameters of checkpointing: log_checkpoint_interval=0 seconds, and log_checkpoint_timeout=1800 seconds, 30 minutes, down some parameters of the spfile:
    __db_cache_size = 343932928
    __java_pool_size = 8388608
    __large_pool_size = 20971520
    __shared_pool_size = 134217728
    background_dump_dest = D:\ORACLE\PRODUCT\10.1.0\ADMIN\RA\BDUMP
    compatible = 10.1.0.2.0
    control_files = ('D:\ORACLE\PRODUCT\10.1.0\RA\U02\ORADATA\RA\CONTROLFILE\O1_MF_1K9O0R7F_.CTL', 'D:\ORACLE\PRODUCT\10.1.0\RA\U03\ORADATA\RA\CONTROLFILE\O1_MF_1K9O0R9V_.CTL')
    core_dump_dest = D:\ORACLE\PRODUCT\10.1.0\ADMIN\RA\CDUMP
    db_block_size = 8192
    db_create_file_dest = D:\oracle\product\10.1.0\ra\u01\oradata
    db_create_online_log_dest_1 = D:\oracle\product\10.1.0\ra\u02\oradata
    db_create_online_log_dest_2 = D:\oracle\product\10.1.0\ra\u03\oradata
    db_domain = 'megatel.hn'
    db_file_multiblock_read_count = 8
    db_name = ra
    db_recovery_file_dest = D:\oracle\product\10.1.0\ra\flash_recovery_area
    db_recovery_file_dest_size = 30536091648
    dispatchers = '(protocol=TCP)'
    job_queue_processes = 10
    log_archive_dest_1 = 'LOCATION=D:\oracle\product\10.1.0\ra\flash_recovery_area'
    log_archive_format = 'ARC%S_%R.%T'
    log_buffer = 100000256
    open_cursors = 300
    pga_aggregate_target = 203423744
    processes = 150
    remote_login_passwordfile = EXCLUSIVE
    sga_target = 612368384
    sort_area_size = 65536
    undo_management = AUTO
    undo_tablespace = UNDOTBS1
    user_dump_dest = D:\ORACLE\PRODUCT\10.1.0\ADMIN\RA\UDUMP
    I appreciate your helping me.
    Juan Angel

  • Setting sga_max_size and memory_target

    what happens when i set
    sga_max_size = 4500
    memory_target = 5000M
    memory_max_target=5000M
    sga_target=0
    can / will oracle use more than 4.5GB for sga ?
    can pga grow more than 500M ?
    startup;
    ORACLE instance started.
    Total System Global Area 4710043648 bytes
    Fixed Size 2234376 bytes
    Variable Size 3925870584 bytes
    Database Buffers 771751936 bytes
    Redo Buffers 10186752 byt

    user9198889 wrote:
    g777 wrote:
    hi
    DB and OS version would be nice to see...
    look here
    http://www.dba-oracle.com/oracle11g/oracle_11g_memory_target_parameter.htm
    SGA_MAX_SIZE & SGA_TARGET
    linux 5.5
    db 11.2.0.2 rac GI 11.2.0.2thanks for the links,
    "When using AMM (by setting memory_target, and/or sga_target, the values for the “traditional” pool parameters (db_cache_size, shared_pool_size, &c) are not ignored. Rather, they will specify the minimum size that Oracle will always maintain for each sub-area in the SGA.
    so that means PGA wont grow more than 500MB and SGA be set to minimum of 4.5GB?
    actually if you carefully read the above comment it doesnt mentiond sga_max_size it only says traditional pools such as db_cache_size etc...
    does this also include sga_max_size?
    I had a look at the other link to a thread but the question is slightly diffrent, they are discussing relation of sga_target to memory_target, I am intrested to know about sga_nax_size inrelation to memory_target

  • SGA_MAX_SIZE and AMM

    Hi, all,
    I've been testing using AMM in our newly-upgraded 11gR2 databases. All databases (Prod and non-Prod) are running 11.2.0.3 on AIX 5.3 (64-bit).
    I noticed that despite me explicitly setting the following to 0:
    alter system set db_cache_size = 0 scope=spfile;
    alter system set log_buffer = 0 scope=spfile;
    alter system set pga_aggregate_target = 0 scope=spfile;
    alter system set sga_max_size = 0 scope=spfile;
    alter system set sga_target = 0 scope=spfile;
    alter system set shared_pool_size = 0 scope=spfile;
    alter system set shared_pool_reserved_size = 0 scope=spfile;
    And allowing Oracle 'full control' how it manages all parts of the memory (SGA and PGA)
    -- The 'big' database
    alter system set memory_max_target = 24G scope=spfile;
    alter system set memory_target = 24G scope=spfile;
    -- The 'small' database
    alter system set memory_max_target = 3G scope=spfile;
    alter system set memory_target = 3G scope=spfile;
    I bounce both databases and things seem to come up OK. The only exception is that sga_max_size seems to be set to a specific value:
    For the 'big' database, it's 16Gb (2/3rds of the total memory_target)
    For the 'small' database, it's 1536Mb (1/2 of the total memory_target)
    I don't really understand why this is happening. I've double-checked my SPFILE, I've queried v$spparameter and I've read MOS 443746.1
    +"If MEMORY_TARGET is set to a non-zero value:+
    +If neither is set, they will be auto-tuned without any minimum or default values. We will have a policy of distributing the total memory set by MEMORY_TARGET parameter in a fixed ratio to the the SGA and PGA during initialization. The policy is to give 60% to the SGA and 40% to the PGA at startup."+
    BUT I presume that sga_max_size works in the same way that it did when we weren't using AMM - it's the upper limit of the SGA. Not ideal, to be honest, as I can definitely see times when the SGA needs a LOT of buffer cache in Production (and, therefore, lots of SGA)
    I do see this in the alert.logs whenever I restart the system:
    Using parameter settings in server-side spfile /opt/oracle/product/11.2.0.3/db/dbs/spfilebigdb.ora
    System parameters with non-default values:
    processes                = 600
    sessions                 = 928
    timed_statistics         = TRUE
    resource_limit           = TRUE
    event                    = "10262 trace name context forever, level 160000"
    sga_max_size             = 16G
    So it's suggesting that it's querying the SPFILE and determining that sga_max_size should be set. But I've double-double-checked and that isn't the case.
    Now, I know I can get around this by explicitly setting sga_max_size at memory_target. But I was wondering if anyone else had seen this before too?
    Mark

    Another workaround is to remove the memory components entirely from the SPFILE (instead of having them set to 0, don't have them in the file at all). This seems to also set the sga_max_size to the memory_target - which is expected behaviour given the MOS note.

Maybe you are looking for

  • Starting problems

    I have a satelite L300 series laptop and i am having a problem starting it. It comes on and its says to launch the repair (recommended)  or start normally which ever one i choose it goes to launch the repair and after an hour or so its comes with thi

  • The "Import Bookmarks" won't work if there's no backup dates... What to do?

    I just swapped-out my desktop PC's, and I have lost ALL of my Firefox Bookmarks :( I have been thru all of the "Import and restore" help guides, but unfortunately any earlier restore dates are just not offered to me... only the 1 date after I did the

  • Audio Preview - like in Mac OS X Finder

    I like to add on this side (http://www.royalrichmanrecordings.de/#8) a audio snippet to each cover. The best would be to do it, like Mac OS X handels audio in the preview if navigate in FInder. See the attached picture. It´s not neccesary to look lik

  • Got the dreaded "sync session failed to start"

    OS 10.6.8,  iPhone 4, OS 5.01,  iTunes 10.5.1 (42). Woke up this AM to find my iPhone battery completely drained (never happened and have no idea why). Charged up to halfway and did a sync. Sync session failed to start. Used my regular user, etc. Had

  • "Slow" Leopard with bonus mouse issues!

    I have a Mac Mini at work, and ever since upgrading it to Snow Leopard, it's been driving me insane. I haven't had time to deal with it, so I've gotten used to all the annoying performance issues I'm having. Simply put, Snow Leopard is super slow, or