Re: Memory sizing - DBA question

From: Torben Krogh Jeppesen <tkjeppesen_at_vip.cybercity.dk>
Date: 1996/04/06
Message-ID: <4k6mne$cll_at_vip.cybercity.dk>#1/1


utrankar_at_nyc.pipeline.com (Sameer Utrankar) wrote:

>My questions are :
 

>1. All oracle background processes share the same memory ?
All programs will have a private stack area. This is the place where they keep track of procedures and functions called. In the stack area is also included automatic variables that are local to the functions. They probably also have a private heap (allocated using malloc). When talking about the SGA, all background processes as well as shadow processes share the same memory.

>2. Shadow processes also share the same memory as background proceses
>? Is that why shared memory of shadow process is assumed to be 0 ?
Yes, - read above.

>3. When you run a tool - say sqlplus - shared and private memory of
>it is considered only once - regardless of how many users are running
>the same tool - why ?

I cannot answer that one. In my opinion all tools as well as PRO*C-programs have a (private) Program Global Area, the size of which is dependent on the number of simultaneously open cursors, and various other things. Every time you have a shadow process, you have a Program Global Area. Beware that multithreaded server will place some of PGA in SGA, making memory calculations a bit different.

>4. I always thought in any computer system, memory is always used by
>one or more programs. SGA does not figure anywhere in this calculation
>(and is added later separately) - what does that mean ? Which
>process(es) owns SGA ? All background processes ? None ? Why doesn't
>it figure into memory requirement of background processes ?
You can say that all the background processes or none of them own the SGA. It is allocated by SQL*DBA on startup and deallocated by SQL*DBA on shutdown. The background processes and the user shadow processes will attach to the shared memory structures, assuming that they are present.

>On HP machine, using Glance Plus, when I look at memory usage of a
>process, it shows RSS and VSS parts (Resident and Virtual) and VSS is
>always more than RSS. Does VSS part include RSS ? Which one do I look
>at for doing the caculations, similar to tuning book ? VSS or RSS ?
>VSS figures seem to be more close to the book for sqlplus.
I don't know!

I suggest that you read the Oracle7 Server Concepts Manual, chapter 9.

Yours sincerely
Torben Jeppesen, DBA Received on Sat Apr 06 1996 - 00:00:00 CEST

Original text of this message