SGA in memory

I've made an application in VB that works against an Oracle Spatial db. Running the program takes extremely long time, and I'm trying to speed up the whole application. Therefor I've tested locking the SGA in the memory instead of reading from disk. This didn't work at all, even though I have 100 Mb available physical memory and the SGA only takes 55 Mb (according to the 'Show sga').
I've also tried altering the initialization parameters 'db_block_buffers' and 'log_buffer', without any success.
What am I doing wrong? Any tips or hints?
Thanks, Pelle

Hi Pelle,
I would recommend executing the Oracle
Spatial query from SQL*Plus to see
the spatial performance impact in your
application.
Please see the technical white paper on
technet under products/spatial for
performance enhancement tips.
Some critical tips for Oracle 8.1.6 is
use a fixed index and also to analyze
the spatial index table. These items are
discussed in the performance white paper.
You may also want to try the Spatial Index Advisor which is part of OEM to help tune your spatial indexes. The performance white paper discusses how to use the Spatial Index Advisor effectively.
Hope this helps. Thanks.
Dan

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 PM

    From 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;

  • 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]*

  • Data pump and SGA, system memory in window 2003

    Hi Experts,
    I have a question for oracle 10g data pump. Based on oracle document,
    all data pump ".dmp" and ".log" files are created on the Oracle server, not the client machine.
    That means data pump need to used oracle server SGA or other system memory. is it true?
    Or data pump must be support by oracle server memory?
    we use oracle 10 G R4 in 32 bit window 2003 with memory issue. So we take care this point.
    at the present, we use exp to do exp job. we DB size is 280 G. SGA is 2G in window.
    for testing, i can saw data pump message in alert file. I does not saw taht a export job broken DB and data replication job.
    Does any experts have this point experience?
    Thanks,
    JIM

    Hi Jim,
    user589812 wrote:
    I have a question for oracle 10g data pump. Based on oracle document,
    all data pump ".dmp" and ".log" files are created on the Oracle server, not the client machine.Yes, they are but you can always give a shared location on to another server.
    That means data pump need to used oracle server SGA or other system memory. is it true?
    Or data pump must be support by oracle server memory?Irrespective, the SGA is used for Conventional Export. You can reduce the overhead to some extent by a Direct Export (direct=y), but still the server resources will be in use.
    we use oracle 10 G R4 in 32 bit window 2003 with memory issue. So we take care this point.If you have windiows enterprise edition, why don't you enable PAE to use more memory on provided you have memory beyond 3GB on the server.
    at the present, we use exp to do exp job. we DB size is 280 G. SGA is 2G in window.With respect to the size of the database, your SGA is too small.
    Hope it helps.
    Regards
    Z.K.

  • Memory used by oracle 11g processes on solaris 10

    I am running oracle 11.1.0.7 on solaris 10. The database uses some 280M virtual memory size for each oracle backup or user process. See the SZ column in output of ps -efl below.
    I just wonder how come oracle that much of memory for each process. Is that something we can control through some system/database parameters or is that the way oracle 11g on solaris works?
    oracle@taut $ ps -efl|grep cttrain6
    F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
    0 S oracle 2490 1 0 40 20 ? 284111 ? 12:23:37 ? 0:01 ora_q001_cttrain6
    0 S oracle 9698 1 0 40 20 ? 283837 ? 13:37:51 ? 0:00 ora_w000_cttrain6
    0 S oracle 2147 1 0 40 20 ? 285464 ? 12:18:11 ? 0:15 ora_lgwr_cttrain6
    0 S oracle 2135 1 0 40 20 ? 283878 ? 12:18:09 ? 0:17 ora_dia0_cttrain6
    0 S oracle 9979 11472 0 50 20 ? 211 ? 13:40:24 pts/2 0:00 grep cttrain6
    0 S oracle 2157 1 0 40 20 ? 283942 ? 12:18:13 ? 0:47 ora_mmnl_cttrain6
    0 S oracle 2129 1 0 40 20 ? 283830 ? 12:18:09 ? 0:06 ora_diag_cttrain6
    0 S root 2159 1 0 40 20 ? 263214 ? 12:18:13 ? 3:52 ora_dism_cttrain6
    0 S oracle 9565 1 0 40 20 ? 283861 ? 13:35:18 ? 0:00 oraclecttrain6 (LOCAL=NO)
    0 S oracle 2482 1 0 40 20 ? 283837 ? 12:22:55 ? 0:01 ora_q000_cttrain6
    0 S oracle 2884 1 0 40 20 ? 283830 ? 12:27:46 ? 0:01 ora_smco_cttrain6
    0 S oracle 2153 1 0 40 20 ? 283846 ? 12:18:12 ? 0:01 ora_reco_cttrain6
    0 S oracle 2464 1 0 40 20 ? 284150 ? 12:22:42 ? 0:01 ora_fbda_cttrain6
    0 S oracle 2123 1 0 40 20 ? 284270 ? 12:18:08 ? 0:14 ora_pmon_cttrain6
    0 S oracle 2454 1 0 40 20 ? 285190 ? 12:22:34 ? 0:01 ora_arc1_cttrain6
    0 S oracle 2145 1 0 40 20 ? 284792 ? 12:18:11 ? 0:06 ora_dbw3_cttrain6
    0 S oracle 2141 1 0 40 20 ? 284792 ? 12:18:10 ? 0:08 ora_dbw1_cttrain6
    0 S oracle 2149 1 0 40 20 ? 284112 ? 12:18:11 ? 0:25 ora_ckpt_cttrain6
    0 S oracle 9513 1 0 40 20 ? 283885 ? 13:34:18 ? 0:02 oraclecttrain6 (LOCAL=NO)
    0 S oracle 2125 1 0 0 RT ? 283830 ? 12:18:08 ? 0:07 ora_vktm_cttrain6
    0 S oracle 2143 1 0 40 20 ? 284792 ? 12:18:10 ? 0:04 ora_dbw2_cttrain6
    0 S oracle 2459 1 0 40 20 ? 285198 ? 12:22:35 ? 0:01 ora_arc3_cttrain6
    0 S oracle 2451 1 0 40 20 ? 285190 ? 12:22:33 ? 0:01 ora_arc0_cttrain6
    0 S oracle 2131 1 0 40 20 ? 283838 ? 12:18:09 ? 0:02 ora_dbrm_cttrain6
    0 S oracle 2139 1 0 40 20 ? 284872 ? 12:18:10 ? 0:03 ora_dbw0_cttrain6
    0 S oracle 2466 1 0 40 20 ? 283830 ? 12:22:44 ? 0:01 ora_qmnc_cttrain6
    0 S oracle 2151 1 0 40 20 ? 283974 ? 12:18:12 ? 0:05 ora_smon_cttrain6
    0 S oracle 2457 1 0 40 20 ? 285198 ? 12:22:34 ? 0:01 ora_arc2_cttrain6
    0 S oracle 2133 1 0 40 20 ? 283830 ? 12:18:09 ? 0:02 ora_psp0_cttrain6
    0 S oracle 2155 1 0 40 20 ? 284656 ? 12:18:12 ? 0:11 ora_mmon_cttrain6
    0 S oracle 2137 1 0 40 20 ? 283830 ? 12:18:09 ? 0:02 ora_mman_cttrain6

    user567271 wrote:
    I am running oracle 11.1.0.7 on solaris 10. The database uses some 280M virtual memory size for each oracle backup or user process. See the SZ column in output of ps -efl below.
    I just wonder how come oracle that much of memory for each process. Is that something we can control through some system/database parameters or is that the way oracle 11g on solaris works?As you have already said, it is "virtual" memory. This is not real, "physical" memory. Solaris has a virtual memory sub-system layer in it, as do almost all other modern operating systems. Google "operating system virtual memory" to find out more on what virtual memory is and how it works.
    In terms of your question, virtual memory means that not all of a process's memory space needs to be in physical memory for it to run and execute. The process virtual memory space is broken up into equal sized pages, and only those pages currently being referenced (used) are mapped and read into physical memory pages. Thus the virtual size of a process is irrelevant to how much physical memory is being used. Look at the RSS column (ps -ely) for the physical memory used by each process - Resident Set Size.
    Furthermore, an Oracle shadow server process (oracle) uses a large segment of shared memory for the SGA. This shared memory only exists once in physical memory, and is shared amongst all the shadow server processes. But it is mapped into the address space of each process, and so appears and is counted in the virtual and physical memory of each process.
    So each reported virtual size (SZ) of each oracle process is also counting the mapped shared memory pages in each process, and so counting the same pages multiple times across all the oracle processes. You need to subtract the size of the SGA shared memory from the virtual size of each oracle process to determine the private, local memory per shadow process.
    If you want a further breakdown of the memory map of each process, look at the manual pages for pmap (man pmap), which will break it down by text, private data, zero initialized, shared and other types. By subtracting the shared size from the resident size you can get a true view of the private, local memory per oracle shadow server process.
    John

  • Oracle consumes 100% memory on Solaris 10

    Hi,
    Our database (Oracle 10g, R2) is running is running on Solaris, When I use the unix command prstat -a, it shows that, 100% Memomry utilized. Below are the details.
    PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
    12934 oracle 2573M 2559M sleep 59 0 0:00:00 0.1% oracle/1
    5914 sirsi 4912K 4664K sleep 59 0 0:00:29 0.0% prstat/1
    12937 oracle 4896K 4592K cpu3 49 0 0:00:00 0.0% prstat/1
    833 oracle 2572M 2558M sleep 59 0 0:01:05 0.0% oracle/1
    114 root 7464K 6632K sleep 59 0 0:01:20 0.0% picld/12
    829 oracle 2573M 2559M sleep 59 0 0:01:04 0.0% oracle/1
    823 oracle 2574M 2560M sleep 59 0 0:00:46 0.0% oracle/11
    811 oracle 2573M 2559M sleep 59 0 0:00:43 0.0% oracle/1
    146 root 2288K 1312K sleep 59 0 0:00:22 0.0% in.mpathd/1
    831 oracle 2576M 2562M sleep 59 0 0:00:24 0.0% oracle/1
    639 root 3664K 2392K sleep 59 0 0:00:00 0.0% snmpXdmid/2
    700 nobody 7520K 3752K sleep 59 0 0:00:00 0.0% httpd/1
    701 nobody 7520K 3752K sleep 59 0 0:00:00 0.0% httpd/1
    637 root 3080K 2048K sleep 59 0 0:00:00 0.0% dmispd/1
    472 root 5232K 2320K sleep 59 0 0:00:00 0.0% dtlogin/1
    720 root 2912K 2400K sleep 59 0 0:00:01 0.0% vold/5
    629 root 2376K 1664K sleep 59 0 0:00:00 0.0% snmpdx/1
    702 nobody 7520K 3736K sleep 59 0 0:00:00 0.0% httpd/1
    378 root 3928K 1784K sleep 59 0 0:00:00 0.0% sshd/1
    699 nobody 7520K 3704K sleep 59 0 0:00:00 0.0% httpd/1
    697 root 9384K 6520K sleep 59 0 0:00:01 0.0% snmpd/1
    695 root 7360K 5376K sleep 59 0 0:00:04 0.0% httpd/1
    375 root 12M 8088K sleep 59 0 0:00:01 0.0% fmd/15
    354 root 3728K 2040K sleep 59 0 0:00:00 0.0% syslogd/13
    415 root 2016K 1440K sleep 59 0 0:00:00 0.0% smcboot/1
    416 root 2008K 1016K sleep 59 0 0:00:00 0.0% smcboot/1
    338 root 4736K 1296K sleep 59 0 0:00:00 0.0% automountd/2
    340 root 5080K 2384K sleep 59 0 0:00:00 0.0% automountd/3
    263 daemon 2384K 1760K sleep 60 -20 0:00:00 0.0% lockd/2
    256 root 1280K 936K sleep 59 0 0:00:00 0.0% utmpd/1
    395 root 7592K 2560K sleep 59 0 0:00:02 0.0% sendmail/1
    273 root 2232K 1496K sleep 59 0 0:00:00 0.0% ttymon/1
    254 root 2072K 1224K sleep 59 0 0:00:00 0.0% sf880drd/1
    417 root 2008K 1016K sleep 59 0 0:00:00 0.0% smcboot/1
    272 root 5152K 4016K sleep 59 0 0:00:02 0.0% inetd/4
    206 root 1232K 536K sleep 59 0 0:00:00 0.0% efdaemon/1
    394 smmsp 7568K 1904K sleep 59 0 0:00:00 0.0% sendmail/1
    128 root 2904K 2056K sleep 59 0 0:00:00 0.0% devfsadm/6
    241 daemon 2640K 1528K sleep 59 0 0:00:00 0.0% rpcbind/1
    245 daemon 2672K 1992K sleep 59 0 0:00:00 0.0% statd/1
    251 root 2000K 1248K sleep 59 0 0:00:00 0.0% sac/1
    123 root 3992K 3008K sleep 59 0 0:00:07 0.0% nscd/26
    NPROC USERNAME SIZE RSS MEMORY TIME CPU
    24 oracle 48G 48G 100% 0:04:48 0.1%
    10 sirsi 1101M 35M 0.1% 0:00:32 0.0%
    37 root 148M 97M 0.2% 0:02:18 0.0%
    10 nobody 73M 36M 0.1% 0:00:00 0.0%
    1 smmsp 7568K 1904K 0.0% 0:00:00 0.0%
    4 daemon 12M 7920K 0.0% 0:00:00 0.0%
    Total: 86 processes, 260 lwps, load averages: 0.02, 0.02, 0.02
    Can anyone suggest why Oracle consumes 100% Memory? and how do we resolve this?.
    Regards,
    Sabdar Syed.

    Many Unix tools add to each dedicated server process memory the SGA size because under Unix each dedicated server is attaching the SGA shared memory segment to its process address space: so these Unix tools are not so reliable for Oracle.
    To check the Oracle memory usage, it is generally more recommendded to use the V$ views such as V$SGASTAT and V$PGASTAT.

  • Oracle memory

    The Oracle 10g database on AIX installation document asks to pre-check the server, it should have at least 1Gig memory. My question is that at least 1Gig is only oracle itself that will take away at least 1Gig from my total memory of the box? So SGA and PGA are included in this amount of oracle itself or extra usage of the memory?
    For example, the box has 4Gig memory, I see 58% is used, that means oracle itself takes about 1Gig and sga_max=1Gig + pga_aggregate_target=0.5Gig, is this correct?

    Dear Betty,
    The Oracle will eat up your shared pool size in the server mostly as shared memory.
    So if you want to calculate the Oracle memory parameters for the server consider:
    Total Server Memory = SGA_MAX_SIZE + PGA_SIZE + DEDICATED_USER_CONNECTIONS + OTHER_SERVER_APP
    The DEDICATED_USER_CONNECTIONS will appear if your users are set to dedicated mode on their tnsnames. If so, you should consider this additional space that Oracle will request to server in order to create this user connections.
    The AIX processes memory is not that easy to see what is really occupied, what is free, what is cached and how many users can connect to the server. You should use pmap to map the process private area, shared area and calculate how much is used, shared and free.
    The other thing is that the SGA should be pinned on RAM, so the database will take up all the space when going up and your server will avoid the 'allocating new pages' issues. So you should set up the sga_lock=true parameter if you want to lock the SGA into memory.
    Cheers,
    Ricardo Rodriguez

  • 5 GB  SGA on 8GB RAM  HP Server 64Bit

    Hi all
    Recently three months we installed Oracle 10g Database on HP Server (having 4 XEON Processors) with Windows 2003 (64 Bit) OS and we have 8GB RAM.
    We wished to have 5500M as the SGA Target but we could not configure more that 3800M on that machine as after that it would error and the database would not get start.
    error messages would be like - Out of memory
    OR
    ???? (not recollecting)
    Now we are running with only 3500M as sga_target and not utilizing the full available RAM with us. Of course we are using in addition 1500M for pga_aggregate_target without any problem. Even if we increase pga_aggregate_target to 3000M there is no problem but that is not desired to us. We wish to increase sga_target.
    We are getting excellent response timings on 3500M sga_target but as human nature would be , we wish to be more greedy and use the full available RAM with us i.e 8GB out of which we can safely use 7GB for Oracle instance. While deducting 1500M for pga_aggregate_target we would like to use 5500M for sga_target.
    Any help is appreciated.
    Suresh Bansal

    Excerpt from oracle docs.
    Benefits of Automatic Shared Memory Management
    Automatic Shared Memory Management simplifies the configuration of the SGA. Before Oracle Database 10G, buffer cache, shared pool, java pool, and large pool need to be manually specified for the database. Under sizing can lead to poor performance and out-of-memory errors (ORA-4031), while over sizing can waste memory. This feature enables you to specify a total memory amount to be used for all SGA Components (buffer cache, shared pool, java pool, and large pool). The Oracle database periodically redistributes memory between these components according to workload requirements. Before Oracle Database 10G, the user did not have exact control over the total size of the SGA since memory was allocated by Oracle for the fixed SGA, and for other internal metadata allocations over and above the total size of the user specified SGA parameters. The new SGA size parameter SGA_TARGET now includes all the memory in the SGA, including all the automatically sized components, manually sized components, and any internal allocations during startup.
    Configuring Automatic Shared Memory Management
    Automatic Shared Memory Management can be configured by using the SGA_TARGET initialization parameter. If you specify a non-zero value for SGA_TARGET, the following four memory pools are automatically sized:
    * Database buffer cache (Default pool)
    * Shared pool
    * Large pool
    * Java pool
    If you set SGA_TARGET to 0, Automatic Shared Memory Management is disabled. The default value of SGA_TARGET is 0.
    The individual parameters used before Oracle 10G releases to specify the sizes of the automatically sized components have not been made obsolete. The initialization parameters that size these pools (DB_CACHE_SIZE, SHARED_POOL_SIZE, LARGE_POOL_SIZE, and JAVA_POOL_SIZE) are now referred to as auto-tuned SGA parameters.
    The following buffers are now referred to as manually sized components:
    * Log buffer
    * Other buffer caches (KEEP/RECYCLE, other block sizes)
    * Streams pool (new in Oracle Database 10g)
    * Fixed SGA and other internal allocations
    Note: STATISTICS_LEVEL must be set to TYPICAL (default) or ALL to use Automatic Shared Memory Management.
    Jaffar

  • SGA+PGA Size allocation

    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

  • SHARED MEMORY 문제(ORA-7329, ORA-7331, ORA-7279)

    제품 : ORACLE SERVER
    작성날짜 : 2004-07-22
    SHARED MEMORY 문제(ORA-7329, ORA-7331, ORA-7279)
    ================================================
    PURPOSE
    다음은 shared memory 문제가 발생하는 경우(ora-7329,ora-7331,
    ora-7279) 에 대해서 알아본다.
    Explanation
    1. 왜 Problem 이 생기나?
    * Oracle 은 Process와 SGA(System Global Area) 간의
    Communication를 위해 Shared Memory와 Semaphore 를 사용한다.
    Oracle Instance 가 뜰 때 SGA를 Create하기 위해 Main Memory의
    임의의 부분을 할당하는데 이 때 Shared Memory 나 Semaphore 가
    적절하지 않으면 이에 관련한 Error가 발생한다.
    2. 해결 방안
    SGA는 Shared Memory 안에 생기므로 Shared Memory 는 각 Process에게
    사용 가능해야 한다.
    Shared memory 와 Semaphore parameter 는
    - SHMMAX = 1개의 shared memory segment 의 maximum size,
    SGA 크기 이상
    - SHMMIN = 1개의 shared memory segment 의 minimum size, 1 byte
    - SHMMNI = shared memory identifier의 숫자, 100 이상
    - SHMSEG = 1개의 process에 attach되는 shared memory segment의
    maximum 갯수, 10 이상
    - SEMMNS = system의 semaphore 갯수, 200 이상
    - SEMMNI = 시스템에서 identifier를 setting하는 semaphore 수,
    70 이상
    - SEMMSL = semaphore set 당 최대 semaphore 갯수,
    initSID.ora 의 processes 값 이상
    * 추천하는 Semaphore와 Shared Memory Parameter
    Operating System Shared Memory Parameters Semaphore
    ================================================================
    Sun OS
    SHMSIZE = 32768 SEMMNS = 200
    SHMMNI = 50 SEMMNI = 50
    Solaris
    SHMMAX = 8388608 SEMMNS = 200
    SHMSEG = 20 SEMMSL = 50
    SHMMNI = 100 SEMMNI = 70
    HP/UX
    SHMMAX = 0x4000000(64Mb) SEMMNS = 128
    SHMSEG = 12 SEMMNI = 10
    Digital Unix (DEC Alpha OSF/1)
    SHMMAX = 4194304 SEMMNS = 60
    SHMSEG = 32 SEMMSL = 25
    Ultrix Use System Default     SEMNS SEMMSL = 5
    AT&T Unix
              SHMMAX = RAM-Dependant     SEMMNS = 200
    8 or 16Mb RAM
              SHMMAX = 5 Mb     For All RAM
    32 Mb RAM
              SHMMAX = 8 Mb Values
    64 Mb RAM
              SHMMAX = 16 Mb
    128 Mb RAM
              SHMMAX = 32 Mb
    256 Mb RAM
              SHMMAX = 64 Mb
    512 Mb RAM
              SHMMAX = 128 Mb
    1024 Mb RAM
              SHMMAX = 256 Mb
    2048 Mb RAM
              SHMMAX = 512 Mb
              SHMSEG = 6 for all RAM Values
              SHMMIN = 1 for all RAM Values
    Dynix/PTX
              SHMMAX = 11010048 SEMMNS = 200
              SHMSEG = 20 SEMMSL = 85
    Other Parameter     NOFILES = 128
    DG/UX
              SHMMAX = 4194304 SEMMNS = 200
              SHMSEG = 15
    Shared Memory 와 Semaphore Parameter는 OS 의 Kernel Configuration
    화일에 반드시 지정되어야 하며, File의 위치는 OS마다 차이가 있다.
    현재의 Shared Memory 와 Semaphore Configuration 을 알기 위해서는
    다음의 Command를 이용한다.
    $ sysdef |more
    * HP-UX (relevant sections only) 에서의 예:
    Semaphore 관련 Parameters
    - maximum value for semaphores(semaem)= 16384
    - Semaphore map(semmap)= 4098
    - number of semaphore identifiers(semmni) = 4096
    - total number of semaphores in the system(semmns) = 8192
    - number of semaphore undo structures(semmnu) = 1536
    - semaphore undo entries per process(semume) = 512
    - semaphore maximum value(semvmx) = 32767
    Shared Memory 관련 Parameters
    - maximum shared memory segment size in bytes(shmmax) = 536870912
    - minimum shared memory segment size in bytes(shmmin) = 1
    - maximum shared memory segments in system (shmmni) = 512
    - maximum shared memory segments per process(shmseg) = 512
    NOTE: SHMMAX는 현 system에 8개의 instance가 수행될 수 있는
    충분한 값이다.
    * Shared memory 또는 semaphore parameters 를 변경하기 위해서는 ...
    1. Oracle Instance를 Shutdown 한다.
    2. OS의 Kernel Configuration File이 있는 곳으로 간다.
    3. System Utility 또는 Editor를 이용해서 필요한 값을 바꾼다.
    System Utility는 다음과 같다
    | OS |     Utility     |
    | HP/UX | SAM     |
    | SCO     |     SYSADMSH |
    | AIX     |     SMIT     |
    | Solaris |     ADMINTOOL |
    4. Kernel 을 Reconfigure 한다.
    5. System을 Reboot 한다.
    6. Oracle Instance를 startup시킨다.
    [ 예제 ] Solaris 2.3/2.4 parameters and commands:
    1. SQLDBA 에서 :
    SQLDBA> shutdown
    SQLDBA> exit
    2. Superuser(root)로 login 하고 :
    # cd /etc
    3. /etc/system file 에 다음을 추가 한다:
    set shmsys:shminfo_shmmax=8388608
    set shmsys:shminfo_shmmin=1
    set shmsys:shminfo_shmmni=100
    set shmsys:shminfo_shmseg=20
    set semsys:seminfo_semmns=200
    set semsys:seminfo_semmni=70
    4. Kernel을 reconfigure 한다:
    # touch /reconfigure
    5. Machine 을 reboot 한다:
    #init 6
    6. SQLDBA 에서 :
    SQLDBA> startup
    SQLDBA> exit
    Oracle의 init<SID>.ora 파라미터 화일에는 SGA에 영향을 주는
    Parameter들이 있다. OS의 Shared Momory와 Semaphore Parameter에
    연결된 이 Parameter의 setting은 System과 Oracle의 Performance에
    중요한 영향을 미친다.
    Reference Documents
    <Note:1011658.6>

    system does not seem to using memory correctly, lots of swapping on an 8GB real memory system.We could start (for example) with this question - How big is your SGA or how much of 8GB RAM takes your SGA?
    The doc says to set /etc/system to:
    shmsys:shminfo_shmmax project.max-shm-memory 4294967296
    but infers that this is not used.From documentation:
    In Solaris 10, you are not required to make changes to the /etc/system file to implement the System V IPC. Solaris 10 uses the resource control facility for its implementation. However, Oracle recommends that you set both resource control and /etc/system/ parameters. Operating system parameters not replaced by resource controls continue to affect performance and security on Solaris 10 systems.
    Then, the doc states to set a project shared mem value of 2GB:
    # projmod -sK "project.max-shm-memory=(privileged,2G,deny)" group.dba
    Why is this number different?It's an example how "To set the maximum shared memory size to 2 GB"
    By setting to to 2G as documented oracle did not work at all Docs says:
    On Solaris 10, verify that the kernel parameters shown in the following table are set to values greater than or equal to the recommended value shown.
    If your SGA was greater than 2G I'm nor wondering why "oracle did not work at all".
    So for 4GB SGA (for example) you need allow allocation of 4G of shared memory.
    Note: shmsys:shminfo_shmmax != project.max-shm-memory. "project.max-shm-memory" is replacement of "shmsys:shminfo_shmmax" but function of these parameters differs.
    "project.max-shm-memory resource control limits the total amount of shared memory of one project, whereas previously, the shmsys:shminfo_shmmax parameter limited the size of a single shared memory segment."
    Relevant link to Sun docs: http://docs.sun.com/app/docs/doc/819-2724/chapter1-33

  • Unable to decrease SGA on 10g

    Hello Gurus
    I have an Oracle 10g database on Solaris machine . following are the results of show SGA
    Total System Global Area 1191182336 bytes
    Fixed Size 2028080 bytes
    Variable Size 355208656 bytes
    Database Buffers 819200000 bytes
    Redo Buffers 14745600 bytes
    I want to decrease the SGA to 600 mb only but when i gave
    SQL> alter system set sga_max_size=600m;
    alter system set sga_max_size=600m
    ERROR at line 1:
    ORA-02095: specified initialization parameter cannot be modified
    then i decide to make changes in init.ora file . i put
    sga_max_size = 600m
    but that too of no use i got
    Specified value of sga_max_size is too small, bumping to 1103101952
    in alert log file
    please suggest what i'm doing wrong and what should be the proper way to do it
    thanks

    Hi,
    sga_max_size = 600m
    but that too of no use i got
    Specified value of sga_max_size is too small, bumping to 1103101952
    in alert log fileHow do you expect to reduce your SGA to 600 MB if only your buffer cache is 800 MB big?
    To reduce the SGA_MAX_SIZE to 600MB you need to reduce the size of all SGA internal memory areas to use 600 MB or less (I'm talking about the sum of all this areas, no each one):
    - The shared pool
    - The large pool
    - The Java pool
    - The buffer cache
    - The Streams pool
    - The Log Buffer
    All this memory areas together are the SGA.
    Regards,
    Francisco Munoz Alvarez
    www.oraclenz.com

  • Help on 10g 64 bit --Sizing SGA and sysctl.conf

    Dear Sir,
    I have an oracle10g installed on a 64 bit OS and want to allocate 8GB to SGA and want to confirm if i am using the right settings
    My sysctl.conf settings are :
    cat /etc/sysctl.conf
    # Kernel sysctl configuration file for Red Hat Linux
    # For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
    # sysctl.conf(5) for more details.
    # Controls IP packet forwarding
    net.ipv4.ip_forward = 0
    # Controls source route verification
    net.ipv4.conf.default.rp_filter = 1
    # Do not accept source routing
    net.ipv4.conf.default.accept_source_route = 0
    # Controls the System Request debugging functionality of the kernel
    kernel.sysrq = 0
    # Controls whether core dumps will append the PID to the core filename
    # Useful for debugging multi-threaded applications
    kernel.core_uses_pid = 1
    # Controls the use of TCP syncookies
    net.ipv4.tcp_syncookies = 1
    # Controls the maximum size of a message, in bytes
    kernel.msgmnb = 65536
    # Controls the default maxmimum size of a mesage queue
    kernel.msgmax = 65536
    kernel.shmmax = 8589934592
    kernel.shmmni = 4096
    kernel.shmall = 2097152
    kernel.sem = 3000 32000 100 128
    net.core.rmem_default=262144
    net.core.rmem_max=262144
    net.core.wmem_default=262144
    net.core.wmem_max=262144
    My init Settings are :
    *._DB_BLOCK_LRU_LATCHES=16
    *._spin_count=7000
    *.archive_lag_target=1800
    *.audit_sys_operations=TRUE
    *.BACKGROUND_DUMP_DEST='/redf/DB/dbf/dump'
    *.circuits=10000
    *.COMPATIBLE='10.2.0.4'
    *.CONTROL_FILES='/redf/DB/dbf/cntl1/DB_cntl1_01.ctl','/redf/DB/dbf/cntl2/DB_cntl2_02.ctl','/redf/DB/dbf/cntl3/DB_cntl3_03.ctl'
    *.CORE_DUMP_DEST='/redf/DB/dbf/dump'
    *.cursor_sharing='FORCE'
    *.DB_BLOCK_SIZE=8192
    *.DB_CACHE_SIZE=1024M
    *.db_file_multiblock_read_count=64
    *.db_file_name_convert='/redf/DB/dbf','/redf/DB/dbf'
    *.DB_NAME='DB'
    *.db_writer_processes=8
    *.dispatchers='(PROTOCOL=TCP)(DISPATCHERS=10)'
    *.FAST_START_MTTR_TARGET=300
    *.INSTANCE_NAME='DB'
    *.JAVA_POOL_SIZE=64M
    *.JOB_QUEUE_PROCESSES=1
    *.large_pool_size=150M
    *.LOCAL_LISTENER='(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=XX.XX.XX.XXX)(PORT=1521)))'
    *.LOG_ARCHIVE_DEST_1='LOCATION=/redf/DB/arch'
    *.LOG_ARCHIVE_DEST_2='LOCATION=/orabackup/redf/DB/arch_new'
    *.log_archive_dest_state_2='ENABLE'
    *.log_archive_format='DB%t_%r_%s.arc'
    *.log_archive_max_processes=2
    *.log_archive_min_succeed_dest=1
    *.LOG_ARCHIVE_START=TRUE
    *.log_buffer=50000000
    *.MAX_DISPATCHERS=40
    *.max_shared_servers=40
    *.O7_DICTIONARY_ACCESSIBILITY=FALSE
    *.open_cursors=10000
    *.optimizer_index_cost_adj=20
    *.parallel_adaptive_multi_user=TRUE
    *.parallel_automatic_tuning=TRUE
    *.parallel_max_servers=20
    *.parallel_min_servers=2
    *.processes=4000
    *.QUERY_REWRITE_ENABLED='TRUE'
    *.QUERY_REWRITE_INTEGRITY='ENFORCED'
    *.recovery_parallelism=5
    *.recyclebin='OFF'
    *.remote_archive_enable='TRUE'
    *.REMOTE_LOGIN_PASSWORDFILE='EXCLUSIVE'
    *.remote_os_authent=FALSE
    *.resource_limit=TRUE
    *.session_cached_cursors=200
    *.sessions=4000
    *.SGA_MAX_SIZE=8000M
    *.SGA_TARGET=6500M
    *.shared_pool_size=1024M
    *.shared_servers=10
    *.sort_area_size=10485760
    *.sql92_security=TRUE
    *.standby_archive_dest='/redf/DB/arch'
    *.standby_file_management='AUTO'
    *.statistics_level='TYPICAL'
    *.timed_statistics=TRUE
    *.UNDO_MANAGEMENT='AUTO'
    *.undo_retention=1800
    *.undo_tablespace='UNDOTBS'
    *.USER_DUMP_DEST='/redf/DB/dbf/dump'
    Want to confirm is this a proper tuend settings as per memory provided ?
    I am aware that it also depends on my appication behaviour , but i just want to check whether the above settings would suffice for a 16GB RAM machine and 64 bit oracle10g
    Also let me know if any other setttings apart from this are required , i choose to use SGA Target .Further my application is read intensive . Your suggestions will be highly appreciated.
    Thanx

    Hi,
    I suggest you to increase the value kernel.shmmax = 8589934592 of this parameter in sysctl.conf to kernel.shmmax = 1288490188
    Later if you want to increase the size of SGA then you need to modify the kernel.shmmax = 8589934592 value. In general practice we keep kernel.shmmax value little greater then the value of SGA.
    Refer MOS tech note:
    *ORA-27102 Database Will Not Start With SHMMAX Set To 8589934592 (8GB) [ID 461519.1]*
    *Linux Big SGA, Large Memory, VLM - White Paper [ID 260152.1]*
    thanks,
    X A H E E R
    Edited by: ora_tech on Dec 26, 2010 10:14 AM

  • SGA size shown incorrectly

    Hi All,
    My OS: Solaris 5
    DB Version: 11.2.0.1.0
    I set db pga_aggregat_target and sga_max_size parameter from command prompt using scop=spfile and restart the database
    After that when i logon to OEM when i check the SGA and PGA size it show me the previous setting
    Can anyone help over the same

    Vikas Kohli wrote:
    But when i check SGA in memory advisors section it shows me size as 960M but from command prompt i set it to 20GPost
    SQL> Show parameter sga
    SQL> show parameter pga
    When last time agent was uploaded successfully? Might its not up to date
    $emctl upload agent
    $emctl status agent
    Thanks.

  • Solaris is using more memory than other node

    Hi, experts
    I running Oracle RAC , with 6 instances per node in Oracle RAC 10.2.0.3.0 Solaris 5.10 x86-64 32 Gb RAM and 4 processors core 2 dual
    Each instance is configured with
    dbprd1 = 2.5 gb
    dbprd2 = 2.5 gb
    dbprd3 = 2.5 gb
    dbprd4 = 1.5 gb
    dbprep1 = 500
    dbprep2 = 500
    TOTAL = 10G
    But, when I use the top command, I get the follow
    [oracle@oraoltppub01:backup]$ top | grep "Memory"
    Memory: 32G phys mem, 14G free mem, 68G swap, 68G free swap
    [oracle@oraoltppub02:dbprd4]$ top | grep "Memory"
    Memory: 32G phys mem, 1334M free mem, 68G total swap, 68G free swap
    On server oraoltppub01 I have 14Gb free of memory, but on server oraoltppu02 I have 1334Mb free of memory
    Why is happening ?
    The follow parameters is setting for both servers.
    * Parmetros para o banco de dados ORACLE ###
    * IPC shared memory
    set noexec_user_stack=1
    set shmsys:shminfo_shmmin=1
    set shmsys:shminfo_shmmax=25769803776
    set shmsys:shminfo_shmmni=256
    set shmsys:shminfo_shmseg=2000
    * IPC semaphores
    set semsys:seminfo_semmap=256
    set semsys:seminfo_semmni=4096
    set semsys:seminfo_semmns=4096
    set semsys:seminfo_semmnu=4096
    set semsys:seminfo_semume=64
    set semsys:seminfo_semmsl=256
    set semsys:seminfo_semopm=100
    set semsys:seminfo_semvmx=32767
    set semsys:seminfo_semaem=16384
    * IPC message
    set msgsys:msginfo_msgmap=2048
    set msgsys:msginfo_msgmax=8192
    set msgsys:msginfo_msgmnb=16384
    set msgsys:msginfo_msgmni=50
    set msgsys:msginfo_msgssz=32
    set msgsys:msginfo_msgtql=2048
    set msgsys:msginfo_msgseg=32767
    #set noexec_user_stack=1
    #set udp:xmit_hiwat=65536
    #set udp:udp_recv_hiwat=65536
    #set udp:xmit_hiwat=65536
    #set udp:udp_recv_hiwat=65536
    Do I need to do some kernel configuration?

    Memory is not fixed for Oracle. You do not assign x GB of RAM to Oracle and the database will only use that much and no more.
    The Oracle database engine consists of a number of processes. Each of these need a data segment. Each data segment (private process memory) can grow and shrink. And these data segments do not form part of the x GB of RAM that was assigned to Oracle's SGA (shared memory).
    The number of these processes differ from instance to instance. There are management processes that Oracle will run from time to time. There is a job processing pool, a shared server processing pool and a parallel query processing pool. These can also grow and shrink. And on an instance running several jobs (and one that uses PQ processing), there will be more running processes than on another instances. Thus more private process memory will be used and less free server memory will be available on that server.
    A single dedicated server process (created by the Listener to service a client connection) can also consume all available server memory - by running poorly designed and written PL/SQL bulk processing code that results in the private process memory of that dedicated process to continually grow. Hopefully this is not the case - but the fact is that a single server process can consume all available free server memory and more.
    As the number of processes differ from RAC instance to RAC instance, it is the norm to see different amounts of memory utilisation on RAC nodes. Memory utilisation depends on the processing that RAC instance is currently doing.

  • Virtual Memory Paging

    Oracle 10.2.0.4g Windows Server 2003 EE (16GB Physical RAM)
    Virtual Memory:
    Initial Size:16.4GB
    Maximum Size: 20GB
    I create ADDM report and:
    FINDING 1: 100% impact (50400 seconds)
    Significant virtual memory paging was detected on the host operating system.
    RECOMMENDATION 1: Host Configuration, 100% benefit (50400 seconds)
    ACTION: Host operating system was experiencing significant paging but no
    particular root cause could be detected. Investigate processes that
    do not belong to this instance running on the host that are consuming
    significant amount of virtual memory. Also consider adding more
    physical memory to the host.
    When users don't work in Task Manager I see:
    Oracle.exe
    Mem usage: 1.3GB
    Page Fault: 2.4GB

    user10921739 wrote:
    Oracle 10.2.0.4g Windows Server 2003 EE (16GB Physical RAM)
    Virtual Memory:
    Initial Size:16.4GB
    Maximum Size: 20GBWhat is the size of the SGA? Not sure if Windows support pinning the SGA in memory - but for performance it's quite important that the SGA not be swapped to disk. If you can pin the SGA in memory, then I suggest you try it.
    What else is running on the box? If only Oracle then there should not be that much swapping - unless there are conflicts between the memory requirements for SGA and PGA, resulting in an increase in page swapping. 16GB RAM provides a fair amount of memory flexibility and swapping should be minimal.
    If the box is used for other stuff and Oracle - not the best of ideas. For performance, Oracle is best serviced by a dedicated server. (also true of most other server software - mix these at own risk)
    When users don't work in Task Manager I see:
    Oracle.exe
    Mem usage: 1.3GB
    Page Fault: 2.4GBAre those soft or hard faults? Hard faults are a problem as this means having to swap a page in from swap space in order to satisfy the request. Soft faults means a page has moved in memory - this does not require an expensive disk I/O to swap the page into memory from swap space.

Maybe you are looking for