Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Server Process Memory Usage

Re: Server Process Memory Usage

From: kyle hailey <nospam_khailey_at_fr.oracle.com>
Date: 1997/10/22
Message-ID: <344DE809.4949@fr.oracle.com>#1/1

There are no standard tools for looking at the correct real process size not including shared pages. From a post on comp.unix.programmer. The example was done on Dec OSF but Sun gives the same type of results:     

        I'm looking for a program(s) that can give the real process size as opposed to reporting the real process size plus all the shared pages. A typical problem is that 'ps' includes the shared memory pages that a process
uses and sometimes the shared text pages as well as data pages that are shared
until they are written to. I realize that this is a very port specific question, but I would be happy with any port specific programs available out
there.

        A real life example. Taking a typical oracle background process Digital UNIX 'ps' reports a process size of 15M. Killing the process we get a
gain of ~400K on the machine.  

$ ps aux | egrep 'ID|28020'
USER PID %CPU %MEM VSZ RSS TTY S STARTED TIME COMMAND
ora732 28020 0.0 0.4 15.3M 464K ?? S Oct 06 2:52.37 ora_pmon_V732
web 26018 0.0 0.1 1.57M 136K ttypf S + 10:50:28 0:00.01 egrep
ID|28020
$ mapinfo 28020
started at 00.27:59.591
user time 00.00:17.096 o
system time 00.00:09.068
user/system at 00.00:26.165
Pid: 28020 Ppid: 1 Gid: 28020 Sid: 28020 state: S nice: 0 prio 19 wait_chan 0xfffffc0004b7e221 Memory usage/layout
Size: 16064512 RSS 573440

NR Address              Size       Off         Prot  
0   0x10000            8192           0      
READ                              
1   0x7fe000           8192           0      
READ|WRITE                        
2   0x11ffe0000        131072         0      
READ|WRITE|EXEC                   
3   0x120000000        8388608        0      
READ|EXEC                         
4   0x120800000        2056192        8388608    
READ|EXEC                     
     
5   0x140000000        425984         0      
READ|WRITE                        
6   0x140068000        212992         0      
READ|WRITE|EXEC                   
7   0x400000000        4833280        0       READ|WRITE         
  

By looking at ipcs ans "size oracle" its easy to make some assumptions on the
output of mapinfo:
$ size oracle

text            data    bss      
10444800        425984  83200    

$ ipcs -mb
Shared Memory:
T      ID     KEY      MODE         OWNER    GROUP     SEGSZ  
m       8 68918791  --rw-r-----    ora732      dba       784  
m       9 136027655 --rw-r-----    ora732      dba   4833280  
  
So off the cuff, I'd interpret the data as:  
                 NR Address              Size       Off         Prot  
                 0   0x10000            8192           0       READ  
shm 784 or 1 memory page =>8192 
                 1   0x7fe000           8192           0      
READ|WRITE  
                 2   0x11ffe0000        131072         0      
READ|WRITE|EXEC  
text 1           3   0x120000000        8388608        0      
READ|EXEC  
text 2           4   0x120800000        2056192        8388608
READ|EXEC
text 1 + text 2 = 10444800 = text of oracle executable data 425984 5 0x140000000 425984 0 READ|WRITE
                 6   0x140068000        212992         0      
READ|WRITE|EXEC  
shm   4833280    7   0x400000000        4833280        0      
READ|WRITE    So basically the only pages that really belong to the process are the pages
with "READ|WRITE|EXEC"
leaving a real process size of something like $ bc
131072+212992
344064
or in other words the 300-400K that I calculate from killing the process.  

Chris Connor wrote:
>
> In article <343d0a44.146492975_at_news.bctel.net>, matts_at_xxxnifcosynergy.com (Matt Southcott) writes:
> > Could someone please tell me the usual amount of memory used
> >per connection to an Oracle database running on a SUN box. At this
> >time each connection is reserving 30m and using 44m just for a
> >connection. I think that this is a little steep. Is there anyway to
> >reduce the usage I can't seem to find any documentation on this
> >anywhere here.
> >
> >Matt
> >
> >matts_at_direct.ca
>
> I also wondered about this and found that the amount of memory
> per connection is related to the SGA size. Just do a "show sga"
> from "sqldba" to verify this...
>
> Chris
>
> --
> Chris Connor(cconnor_at_rsa.hisd.harris.com)
 

-- 
Kyle Hailey
Oracle Support France

[ What's Oracle got to do with it? These opinion's don't neccessarily
reflect my employer. ]
Received on Wed Oct 22 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US