Re: V7 Space Allocation

From: Roderick Manalac <rmanalac_at_oracle.COM>
Date: Sat, 14 Aug 1993 08:02:56 GMT
Message-ID: <1993Aug14.080256.14447_at_oracle.us.oracle.com>


srh_at_scammell.ecos.tne.oz.au (Shane Hocking) writes:
|>
|> Environment: SUN Sparc, Oracle RDBMS V7.0.12
|>
|> When using the ' alter table X allocate extent (size Y)' command, I am seeing
|> strange results in the actual size of the extent allocated.
|>
|> For example, If Y = 2222080 (1085 blocks) then a 2222080 extent is allocated
|> but
|> If Y = 2224128 (1086 blocks) then a 2232320 (1090) extent is allocated???.
|>
|> I tried some other values
|>
|> Y value(in blocks) Actually allocated(in blocks)
|> ------- ------------------
|> 1050 1050
|> 1080 1080
|> 1085 1085
|> 1086 1090
|> 1088 1092
|> 1090 1092
|> 1091 1095
|> 1093 1095
|> 1095 1095
|>
|> The behavior occurs when the table is normally extending (through DML
|> operations).
|>
|> Can someone please explain this behavior and perhaps an algorithm to
|> determine exactly what the actual allocation will be.
|>
|> Thanks Shane
|>
|> --

Space allocation is a little bit complicated in Oracle7. Extents are rounded up to the next multiple of 5 Oracle blocks if the size requested is > 5. Also if we have to split an existing free extent because no free extent of the same size is available and the remaining chunk is < 5 Oracle blocks we return the entire extent rather than split it. Therefore, the actual extent size might vary as much as 8 Oracle blocks above from the size requested (4 to do rounding up, and 4 if no exact match is found and we choose not to split a free extent).

All this is done to reduce the chances of fragmentation within a tablespace.

Hope this helps.

Roderick Manalac
Oracle Corporation
[Insert your favorite disclaimer here] Received on Sat Aug 14 1993 - 10:02:56 CEST

Original text of this message