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.

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

  • 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.

  • 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

    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

  • 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 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 & SGA_TARGET

    If anyone can explain to me the relationship of these 2 parameters? Chapter 8 Database Concepts doesn't clearly define how and if they are used in tandem.
    Matt

    Let me simplify it a bit ...
    From the links I provided:
    SGA_MAX_SIZE has a default. Therefore it does not need to be set.
    SGA_TARGET has a default. it does not need to be set. The default is 0, meaning NOTHING is automatically handled.
    In the Reference manual description for SGA_TARGET, it provides a link to the Concepts manual. That link is there to provide more detailed information, so we follow it ...
    The SGA_MAX_SIZE and SGA_TARGET are in the table of contents of the Concepts manual. Following that, we find
    It is significant that SGA_TARGET includes the entire memory for the SGA, in contrast to earlier releases in which memory for the internal and fixed SGA was added to the sum of the configured SGA memory parameters. Thus, SGA_TARGET gives you precise control over the size of the shared memory region allocated by the database. If SGA_TARGET is set to a value greater than SGA_MAX_SIZE at startup, then the latter is bumped up to accommodate SGA_TARGET.
    Note:
    Do not dynamically set or unset the SGA_TARGET parameter. This should be set only at startup.
    There is a lot of additional supporting information in the Concepts manual as well.
    Message was edited by: Hans Forbrich
    Corrected the interpretation of SGA_TARGET default.

  • Need Clarification on sga_target and sga_max_size

    HI,
    I need some clarification in SGA_TARGET and SGA_MAX_SIZE.
    I have the parameter like below.
    SGA_MAX_SIZE=10G
    SGA_TARGET=9G
    And I spread the 9G to all components like (DB_CACHE,SHARE_POOL etc.,).
    My doubt, Incase db need the memory more than 9GB, Whether it automatically take the extra 1G from sga_max_size
    or we have to change the sga_target to 10G.

    Unless and untill, we set the sga_taget=10G, The extra 1G(from sga_max_size) is not used.
    Am i correct?No - its wrong. Any change in the value of SGA_TARGET affects only the sizes of the auto-tuned components. If you increases its value then increased memory will be distributed in only among the components controlled. So, yes 1GB will be used, because have sga_max_size=10G. If you decrease the value then reduced memory is taken back by the auto-tuning policy from one or more of the auto-tuned components.
    If SGA_MAX_SIZE is greater than SGA_TARGET, you can increase SGA_TARGET without restarting the instance. Otherwise, you'd need to shutdown and restart the instance if you wanted to increase SGA_TARGET.
    Regards
    Girish Sharma

  • Setting SGA_MAX_SIZE without setting SGA_TARGET

    RDBMS Version: 10.2.0.4
    OS : Solart 5.10
    We are currently facing some performance issues in one of our DBs.
    This DB has SGA Components individually set. For eg: DB_CACHE_SIZE is set to 2gb.
    I've noticed that
    SGA_MAX_SIZE = 6GB
    SGA_TARGET = Not setShould we set both SGA_TARGET, SGA_MAX_SIZE to take advantage of 10gR2's Automatice shared Memory Management?

    sga_max_size sets the maximum value for sga_target.see MOSC Notes 295626.1, 396940.1, 270065.1 and 256913.1.
    SGA_TARGET parameter is new with Oracle 10g. It specifies the total amaount of SGA memory available to an instance. Setting this parameter makes Oracle distribute the available memory among various components - such as shared pool (for SQL and PL/SQL), Java pool, large_pool and buffer cache - as required. This new feature is called Automatic Shared Memory Management. With ASMM, the parameters java_pool_size, shared_pool_size, large_pool_size and db_cache_size need not be specified explicitely anymore. sga_target cannot be higher than sga_max_size.
    SGA_MAX_SIZE != SGA_TARGET when?
    http://www.orafaq.com/wiki/Sga_target
    Thanks

  • Diffrence Between SGA_TARGET and SGA_MAX_SIZE

    Can Any one explain me what is the diference between
    SGA_TARGET and SGA_MAX_SIZE
    Thanks In Advance.

    sga_max_size -- This parameter sets the hard limit up to which sga_target can dynamically adjust sizes. At database start time, Oracle will allocate sga_max_size in RAM (or set sga_max_size to the sum of the existing pool sizes), so in order not to waste RAM it may be a good idea to have sga_max_size and sga_target at the same value, but there may be times when you want to have the capability to adjust for peak loads. By setting this parameter higher than sga_target, you allow dynamic adjustment of the sga_target parameter.
    sga_target -- This parameter is new in Oracle Database 10g and reflects the total size of memory footprint a SGA can consume. It includes in its boundaries the fixed SGA and other internal allocations, the (redo) log buffers, the shared pool, Java pool, streams pool, buffer cache, keep/recycle caches, and if they are specified, the non-standard block size caches.

Maybe you are looking for

  • Encoder 2014 crashing with OpenGL error - please advise

    I did some research and split my 40-minute sequence (AVCHD 1080p 30fps) into chunks... did fine until the last one which was only 7:56 long - another successful export - Vimeo 1080p with MQR selected as suggested in the forum was longer. Up until thi

  • Is there any version of Oracle BPEL Process Manager 10.1.2.0.2  for Solaris

    Hi Thank you for reading my post Is there any version of Oracle BPEL Process Manager 10.1.2.0.2 for Solaris X86 available or under development? Does any one tried the sparc version on x86? Thanks

  • Here or There? To buy a Mac Pro

    I need to replace my work computer with a new Mac Pro when I move from Bay Area to Australia, I know the power if different, but can I buy  computere here? Or would it be better to wait until I get there....does Apple make a power converter so the co

  • Hold button non-functional

    Hi, I have a second-gen iPod that's never given me much trouble before. A few days ago, though, the hold button stuck. I can move it to "hold", but even if I physically move the button to the side, it won't come off hold. It prevents me from using th

  • BB Curve 8900 Wont Turn on

    My Battery was competely discharged over the weekend and i've had my 8900 plugged in with the USB charger since 10 am  (EST) this morning. The device will still not switch on... ... All i see is the RED LED lit. Tried.. removing the battery for a sol