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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Temporary Tablespace Design

RE: Temporary Tablespace Design

From: Hallas, John <HallasJ_at_logicae.com>
Date: Wed, 18 Apr 2001 09:27:37 -0700
Message-ID: <F001.002EBF96.20010418091522@fatcity.com>

FOR YOUR INFORMATION ESIS and EPFAL are now part of Logica. The Internet email addresses of the staff has changed to the following - lastnameinitial_at_logica.com eg SMITHK_at_logica.com. Emails using the old format will continue to be delivered until 30th June 2001.

Tim,
You are confirming my original understanding. However Kirti stated that based on your figures if a sort was used then malloc would be called 4 times to get from 512000 to 2048000. I do not know the answer for certain but Kirti's view seems logical because sort_area_size is the MAX size and it is very likely that only the retained is allocated initially and then increased in increments up to sort_area_retained_size. Any bigger and the sort is done to the temporary tablespace.

John

                -----Original Message-----
                From:   Tim Sawmiller [mailto:sawmillert_at_state.mi.us]
                Sent:   18 April 2001 17:26
                To:     Multiple recipients of list ORACLE-L
                Subject:        RE: Temporary Tablespace Design

                Well, not quite.  SORT_AREA_SIZE specifies the maximum
amount, in bytes, of memory to use for a sort. After the sort is complete and all that remains to do is to return the rows, the memory is released down to the size specified by SORT_AREA_RETAINED_SIZE. After the last row is returned, all memory is freed. Temporary disk is used for the intermediate sort runs only if the SORT_AREA_SIZE isn't large enough to handle the sort in memory. The SORT_AREA_RETAINED_SIZE controls the size of the read buffer which is used to maintain a portion of the sort in memory. Myself, I use 2048000 for SORT_AREA_SIZE, and 512000 for SORT_AREA_RETAINED_SIZE.
                >>> Alex.Hillman_at_usmint.treas.gov 04/18/01 11:36AM >>>
                I think you are not correct. First - Oracle allocates memory
for sorting as
                needed by 8K chunks up to sort_area_size. Second if your
sort_area_size is
                large enough to do sort in memory and your
sort_area_retained_size <
                sort_area_size oracle will dump sorted data into temporary
tablespace and
                then read from this tablespace. So it is a tradeoff between
late memory
                release and temporary tablespace I/O.

                Alex Hillman

                -----Original Message-----
                Sent: Wednesday, April 18, 2001 10:40 AM
                To: Multiple recipients of list ORACLE-L


                Hi John,
                As you mentioned, it depends on a number of factors. I
believe I replied to
                a question about improving performance of index building
after an import.
                Anyway, here is the reasoning behind why I said that....
When Oracle begins
                sorting, it starts with the memory equal to
sort_area_retained_size value
                and may eventually acquire memory equal to sort_area_size.
This involves at
                OS level, malloc (and may be some other) memory mgmt
routine(s). After the
                sort phase is complete, Oracle will trigger memory
de-allocation and the OS
                will go at work again. If there are servile sessions
performing sorts, there
                can be an increased OS level memory mgmt activity (while
attaining
                sort_area_size and releasing it back to
sort_area_retained_size) . But if
                the server has *enough* memory keeping
sort_area_retained_size equal to
                sort_area_size may actually help. I also assume that these
days most
                installations have ample memory. And that the advice of
using 50% (which I
                had heard of) of sort area size for sort area retained size
should always be
                viewed in light of one's requirements and resource
availability. But I can't
                stop wondering... how come it was 50% and not 10% or 20%..
so it's all
                relative.  I have been using what I suggested, for a number
of years now
                with no problems or complaints. 

                Cheers !

                - Kirti Deshpande 
                  Verizon Information Services
                   http://www.superpages.com 


> -----Original Message-----
> From: Hallas, John [SMTP:HallasJ_at_logicae.com]
> Sent: Wednesday, April 18, 2001 6:21 AM
> To: Multiple recipients of list ORACLE-L
> Subject: RE: Temporary Tablespace Design
>
>
> Kirti Deshpande writes
>
> "Also, keep SORT_AREA_RETAINED_SIZE the same as
SORT_AREA_SIZE. As the
> former will be used while fetching data after sort phase
is completed."
>
> I thought best advice was to make the retained size
smaller (50%?) of
> sort_area_size to allow initial sort memory to be released
after the first
> part of the sort is managed and only the merge phase of a
disk sort is
> left
> to do.
>
> I appreciate that a lot depends on the amount of memory
available and the
> number of concurrent processes that may be performing
sorts but surely the
> aim is to free memory up as soon as possible down to the
> sort_area_retained_size
>
> Thanks
>
> John
>
> (PS I do apologise for the rubbish at the top of this mail
but it is
> inserted after I have sent the mail into our mail gateway)
>
>

This e-mail and any files transmitted with it, are confidential to Logica and are intended solely for the use of the individual or entity to whom they are addressed.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Hallas, John
  INET: HallasJ_at_logicae.com

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: ListGuru_at_fatcity.com (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
also send the HELP command for other information (like subscribing).
Received on Wed Apr 18 2001 - 11:27:37 CDT

Original text of this message

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