Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> RE: sorting and pga for non-mts

RE: sorting and pga for non-mts

From: Thapliyal, Deepak <>
Date: Wed, 5 Jul 2000 15:05:10 -0700
Message-Id: <>

thank you sir,

just a clarification, to make sure i understand you here and am on the same page ...

so i have 4gb ram and i allocate shmmax a 4gb

my sga is 2gb(say) .. so when i start up the instance, 2gb of shared memory(one shared seg) will be allocated. so the total shared memory allocation would be 2gb and the remaining would be the os heap

that means the remaining 2gb memory ("heap" memory from the os) will be used for sorts.
In other words the pga for non-mts would consist of this heap memory and would vary in size as per -->

-->the sorts being performed and
-->the sort_area* parameter



-----Original Message-----
From: Steve Adams [] Sent: Wednesday, July 05, 2000 2:27 PM
To: ''; 'Thapliyal, Deepak' Subject: RE: sorting and pga for non-mts

Hi Deepak,

Sort memory resides in the "cursor work heap", which is part of the UGA, which part of the PGA in non-MTS connections. When growing the PGA, Oracle allocates "heap" memory from the operating system, not shared memory. It is allocated progressively in chunks of about 8K, not in one large chunk. In any event, shared memory allocations do not get rounded up to shmmax, as you apparently imagine. So you have nothing to worry about. If fact, for a system with 4G of RAM, a 1M sort area size should be regarded as very small.

Steve Adams

-----Original Message-----
From:	Thapliyal, Deepak []
Sent:	Thursday, July 06, 2000 7:56 AM
To:	Multiple recipients of list ORACLE-L
Subject:	sorting and pga for non-mts

hi dba's

my world has been shattered with horrible thoughts of exactly how pga memory
allocation takes place.

assume u have 4GB ram (your sga is 2gb and u set shmmax to 2gb, remaining free os memory is 2GB)

when a sort occurs .. i know that it will be done in pga..(assume sort requires 1M)

so tell me this .. where is this 1M taken from ?? ... will the pga use the os memory (not shared --> remaining 2GB) or will oracld allocate another shared segment(shmmax) for use by the sort request.

in a nutshell--> does pga use shared memory segments or does it use the remaining os memory(which i think sounds more logical).

the aim is to arrive at a proper sizing of the shmmax parameter. this is for o8i under sol2.6 for non-mts env


Author: Thapliyal, Deepak

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
To REMOVE yourself from this mailing list, send an E-Mail message
to: (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
Received on Wed Jul 05 2000 - 17:05:10 CDT

Original text of this message