The Note of OS-Level Memory Sources for DBA (from Metalink)
1. Note:2060096.6 Monitoring Memory Use
- describe couple of Unix commands which DBA may need to use frequently, such as ipcs, ps, pstat, vmstat, sar, and top
2. Note:174555.1 UNIX: Determining the Size of an Oracle Process
- ps, ipcs, pmap ? which one is good for presenting accurate statistics? It’s pmap.
- HOW MUCH MEMORY IS ORACLE ACTUALLY USING? Issue,
- select sum(value) from (select value, n.name|| ‘(’||s.statistic#||’)’ , sid
from v$sesstat s , v$statname n
where s.statistic# = n.statistic#
and n.name like ‘%ga memory%’
order by value); - do heapdump to diagnose memory problem, such as memory leak.
- (script of “Dispaly Usage of UGA and PGA for all sessions, including background process”)
- referene book: Oracle Expert one-on-one chapter 2: Architechture
3. Note:17094.1 Unix Virtual Memory, Paging & Swapping explained
- The physical memory in Unix is devided to three uses: OS Kernel, I/O subsystem, and Page Pool.
- Unix process is devided into two portions: Text and Data.
- a UNIX process is divided into six segments: text, stack, heap, BSS, initialized data, and shared
memory. - desribed usage of ps, pstat, vmstat, sar
- This is a very good recource to know Unix memory internal use (and with Oracle).
4. Note:15566.1 Unix Semaphores and Shared Memory Explained
- Oracle has 3 different possible models for the SGA - one-segment, contiguous multi-segment, and non-contiguous multi-segment.
- The entire SGA must fit into shared memory, so the total amount of shared memory allocated under any model will be equal to the size of the SGA.
- SHMMAX > size of SGA
- SHMMAX - kernel parameter controlling maximum size of one shared memory
segment
SHMMNI - kernel parameter controlling maximum number of shared memory segments
in the system
SHMSEG - kernel parameter controlling maximum number of shared memory segments
a process can attach
SEMMNS - kernel parameter controlling maximum number of semphores in
the system
SEMMNI - kernel parameter controlling maximum number of semaphore
sets. Semphores in Unix are allocated in sets of 1 to SEMMSL.
SEMMSL - kernel parameter controlling maximum number of semaphores in a
semphore set.
SHMLBA - kernel parameter controlling alignment of shared memory
segments; all segments must be attached at multiples of this value.
Typically, non-tunable.
5. Note:68281.1 DETERMINING WHICH INSTANCE OWNS WHICH SHARED MEMORY & SEMAPHORE SEGMENTS
- This is helpful when in recovery situations where the instance may not have released the shared memory or semaphores on database shutdown.
- It’s helpful to remove share memory segments and semaphore segments
6. Note:153961.1 Semaphores and Shared Memory - An Overview
- Semaphores and shared memory are two very distinct sets of Operating System resources. Semaphores are a system resource that Oracle utilizes for interprocess communication and they occupy a relatively small memory space, while shared memory is utilized to contain the SGA and can garner a large portion of physical memory.
- The most common circumstance in which these errors occur is during the creation of a new database.
- the list of Semaphores related error
- Semaphore related troubleshooting: Note:115235.1 ,
Last 3 posts in OraclePoint
- Upgrade Oracle Database from 10g to 11g with Data Pump - July 28th, 2010
- My Practical Approach to Create Domain Index - May 11th, 2010
- How to Verify Memory Leaks on Unix - May 10th, 2010
Popularity: 5% [?]
Tags:none
















February 12th, 2008 at 3:31 am
Nice Site! Thanks!