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: Bitmap Header in a Uniform LMT?

RE: Bitmap Header in a Uniform LMT?

From: <Rajesh.Rao_at_jpmchase.com>
Date: Fri, 09 Aug 2002 13:38:40 -0800
Message-ID: <F001.004B1133.20020809133840@fatcity.com>

Thanks a ton Dennis. I will certainly go thru this. It looks more detailed. I also found a much similar analysis at
http://www.performance-insight.com/ora3_back.html

Raj

                                                                                                                      
                    DENNIS WILLIAMS                                                                                   
                    <DWILLIAMS_at_LIFE        To:     Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>        
                    TOUCH.COM>             cc:                                                                        
                    Sent by:               Subject:     RE: Bitmap Header in a Uniform LMT?                           
                    root_at_fatcity.co                                                                                   
                    m                                                                                                 
                                                                                                                      
                                                                                                                      
                    August 09, 2002                                                                                   
                    04:53 PM                                                                                          
                    Please respond                                                                                    
                    to ORACLE-L                                                                                       
                                                                                                                      
                                                                                                                      




Raj - My apologies for being late with a reply. Your latest message prompted
me to recall that Jeremiah Wilton investigated this (or a similar aspect) back in April. I went into Google and typed "LMT bitmap headers" (without the quotes), and it retrieved the discussion. I have inserted it below for your review in case you were not aware of that discussion. Dennis Williams
DBA
Lifetouch, Inc.
dwilliams_at_lifetouch.com


Received: from newsfeed.cts.com (newsfeed.cts.com [209.68.248.164])

           by naude.co.za (8.11.2/8.11.2) with SMTP id g38Lpc327439
Received: from fatcity.UUCP (uucp_at_localhost)
           by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id OAA08313;
           Mon, 8 Apr 2002 14:58:27 -0700 (PDT)
Received: by fatcity.com (26-Feb-2001/v1.0g-b71/bab) via UUCP id 0043EF61; Mon, 08 Apr 2002 13:03:20 -0800
Message-ID: <F001.0043EF61.20020408130320_at_fatcity.com> Date: Mon, 08 Apr 2002 13:03:20 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> X-Comment: Oracle RDBMS Community Forum
X-Sender: Paul.Parker_at_bmwna.com
Sender: root_at_fatcity.com
Reply-To: ORACLE-L_at_fatcity.com
Errors-To: ML-ERRORS_at_fatcity.com
Organization: Fat City Network Services, San Diego, California X-ListServer: v1.0g, build 71; ListGuru (c) 1996-2001 Bruce A. Bergman Precedence: bulk
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit

Following on from my previous note:

Jeremiah,

>From your bitmap control,

You have FF occurring 3 times followed by 3F which is 255, 255, 255, 63 which is
11111111 11111111 11111111 00111111

So, least signficant bit first,

11111111 11111111 11111111 11111100 which is

used, used, ... (30 times) , free, free

This corresponds with the first: 30 (the bit before the first free bit)

Paul

-----Original Message-----
Sent: Monday, April 08, 2002 3:23 PM
To: 'ORACLE-L_at_fatcity.com'

>From the 'Data Management and Storage Internal" notes,

Bitmapped Tablespace File Structure

A new bitmapped tablespace file has the following structure:

File Header                                                             1
block
Bitmapped File Space Header                              1 block
Head portion of of Bitmap Blocks                    N blocks
Useful file blocks                                       U units (A unit is
a number
of blocks)
Tail portion of Bitmap Blocks                            M blocks

If a Unit = B blocks, then the total file size = 1 + 1 + N + U*B + M

Bitmapped File Space Header

...... (lots to type, I can if you really need it)

Bitmap blocks have 2 parts :

Bitmap control structure
Vector Dump

The fields in the bitmap control structure are:

RelFNo:         Relative file number to which the bitmap belongs
BeginBlock:          Which block number does the first bit represent
Flag:                     Zero for permanent files, one for temp files
First:          Where to start looking for the free space (bit before first
free
bit)
Free:                     Number of free slots (bits) in the bitmap (not
the file)

To read the bitmap, take each two-byte pair, least significant bit first. If there are not eight bits, pad to eight bits with zeroes. Hence 0x0F = 15
= 00001111. When written least significant bit first, the bitmap looks like
this
11110000 --> used, used, used, used, free, free, free, free

Scanning for the first free extent will start at the 4th bit.

HTH Paul

-----Original Message-----
Sent: Monday, April 08, 2002 3:44 PM
To: Multiple recipients of list ORACLE-L

Out of curiosity I decided I wanted to look at what composed the extent map in locally-managed tablespaces.

I dumped the first 5 blocks of the tablespace's first datafile with 'alter system dump datafile ...' The results surprised me, as they appeared to consist of almost no data. The LMT in question contains a variety of segments and extents. How is the LMT bitmap organized?

Start dump data blocks tsn: 1 file#: 2 minblk 1 maxblk 1 Block 1 (file header) not dumped: use dump file header command

Start dump data blocks tsn: 1 file#: 2 minblk 2 maxblk 2 frmt: 0x02 chkval: 0x0000 type: 0x1d=KTFB Bitmapped File Space Header File Space Header Block:
Header Control:
RelFno: 2, Unit: 8192, Size: 524352, Flag: 1 Initial Area: 3, Tail: 524292, First: 30, Free: 34

Start dump data blocks tsn: 1 file#: 2 minblk 3 maxblk 3 frmt: 0x02 chkval: 0x0000 type: 0x1e=KTFB Bitmapped File Space Bitmap File Space Bitmap Block:
BitMap Control:
RelFno: 2, BeginBlock: 5, Flag: 0, First: 30, Free: 128994

FFFFFF3F00000000 0000000000000000 0000000000000000 0000000000000000
0000000000000000 0000000000000000 0000000000000000 0000000000000000
0000000000000000 0000000000000000 0000000000000000 0000000000000000
... all zeros

Start dump data blocks tsn: 1 file#: 2 minblk 4 maxblk 4 frmt: 0x02 chkval: 0x0000 type: 0x1e=KTFB Bitmapped File Space Bitmap File Space Bitmap Block:
BitMap Control:
RelFno: 2, BeginBlock: 1056964613, Flag: 0, First: 0, Free: 129024

0000000000000000 0000000000000000 0000000000000000 0000000000000000
0000000000000000 0000000000000000 0000000000000000 0000000000000000
0000000000000000 0000000000000000 0000000000000000 0000000000000000
... all zeros

FWIW: SQL> select count (*) from dba_extents where file_id = 2;

  COUNT(*)


        30

SQL> select extent_management from dba_data_files df, dba_tablespaces ts where df.tablespace_name = ts.tablespace_name and file_id = 2;

EXTENT_MAN



LOCAL
--
Jeremiah Wilton
http://www.speakeasy.net/~jwilton

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Jeremiah Wilton
  INET: jwilton_at_speakeasy.net

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------

-----Original Message-----
Sent: Friday, August 09, 2002 3:33 PM
To: Multiple recipients of list ORACLE-L



Getting no responses on this, I created a test 9.0 database on my NT 4.0
workstation, with a block size of 4K. My observations are :

While creating a LMT with uniform extents of size 16K, the minimum datafile
size has to be 25K. With uniform extents of size 32K, the datafile size has
to be more than 41K, and with uniform extents of size 64K, the minimum
datafile size is 73K. Thus, the size of the datafile should be atleast 2
blocks more than the uniform extent size.

SQL> create tablespace mult
  2  datafile 'd:\mult7.dbf' size 10M,
  3           'd:\mult2.dbf' size 41K,
  4           'd:\mult3.dbf' size 73K,
  5           'd:\mult4.dbf' size 128K,
  6           'd:\mult5.dbf' size 1024K,
  7           'd:\mult6.dbf' size 2048K
  8  extent management local uniform size 32K
  9  /

Tablespace created.

SQL>  select * from dba_free_space where tablespace_name='MULT';

TABLESPACE_NAME         FILE_ID   BLOCK_ID      BYTES
-------------------- ---------- ---------- ---------- ----------
------------
MULT                          9         17   10420224       2544
MULT                         10          4      32768          8
MULT                         11          4      65536         16
MULT                         12         17      65536         16
MULT                         13         17     983040        240
MULT                         14         17    2031616        496

6 rows selected.

And right now, I have the answer to all my questions. Also, I strongly
recommend visiting http://www.performance-insight.com/ora3_back.html and
look at the topics on locally managed tablespaces. I was impressed. That
was what helped me get to the right answers.

Regards
Raj








                    Rajesh

                    Rao/CHASE_at_CHA        To:     Multiple recipients of
list
ORACLE-L <ORACLE-L_at_fatcity.com>
                    SE                   cc:

                    Sent by:             Subject:     Bitmap Header in a
Uniform LMT?
                    root_at_fatcity.

                    com





                    August 09,

                    2002 02:28 PM

                    Please

                    respond to

                    ORACLE-L









I asked this question the other day, but got no replies. I make one more
attempt and rephrase the question. A curious mind wants to know " Assuming
a block size of 2K, what would be the size of the bitmap header if I create
a uniform LMT with datafiles of size 32K, 64K, 100K, 1M and 64M?"

Metalink has not given me any definite answer as yet, and the notes there
have confused moi.

Regards
Raj


--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  INET: Rajesh.Rao_at_jpmchase.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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: DENNIS WILLIAMS
  INET: DWILLIAMS_at_LIFETOUCH.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).




-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: Rajesh.Rao_at_jpmchase.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 Fri Aug 09 2002 - 16:38:40 CDT

Original text of this message

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