onstat -d/-D DBSpaces and Chunks

The onstat -d command provides a two-part output. The first part identifies all known DBSpaces in the instance;
the second part identifies the chunks associated with each of the DBSpaces in the first part.
The onstat -D command is similar to the output of onstat -d with the exception that the size, free and bpages
in the chunk section are replaced by the number of reads and writes that have occurred against the particular chunk.

DBSpace Detail Definitions

Heading

Description

Format

See Also

address

The in-memory address of the DBSpace structure.

Hex

number

The ordinal number of the DBSpace, assigned in the order the space was created.

Dec

onstat -D

flags

Describes the status of the DBSpace using the following hexadecimal values:

0x01

No mirror

0x02

Mirror

0x04

Down/disable mirror chunks

0x08

Newly mirrored

0x10

BLOBSpace

0x20

BLOBSpace on removable media

0x40

BLOBSpace on optical media

0x80

BLOBSpace has been dropped

0x100

BLOBSpace is optical stage blob

0x200

Space is being physically recovered

0x400

Space has been physically recovered

0x800

Space is being logically recovered

0x1000

A table in the DBSpace has been dropped

0x2000

Temp DBSpace

0x4000

BLOBSpace is being archived.

0x8000

Smart BLOBSpace

0x10000

Either physical or logical log changed

0x20000

Dbspace or chunk tables have changed

0x40000

Dbspace or blobspace contains large chunk

0x80000

Chunk in this dbspace has been renamed

0x100000

Temporary dbspace used by only by shared disk secondary server. It is one of the dbspaces listed in the SDS_TEMPDBS configuration parameter on the SD secondary server.

0x200000

Temporary dbspace for the SD secondary server. This is listed in the DBSPACETEMP configuration parameter on the shared disk secondary server.

0x00400000

The dbspace was externally backed up.

The latter flags are not available in earlier engines

Hex

fchunk

The number of the first chunk belonging to this DBSpace.

Dec

nchunks

The total number of chunks that make up this DBSpace.

Dec

flags

Describes the type of DBSpace using the following coded values:
Position 1:

A The dbspace is auto-expandable, i.e.
SP_AUTOEXPAND is enabled
AND
(
the dbspace is configured with a create size
OR
extend size that is not zero.
)

Str

owner

The owner of the DBSpace.

Str

name

The name of the DBSpace as assigned by the administrator.

Str

Dbspace Summary Definitions

Label

Description

active

The total number of DBSpaces that have been created for this instance.

total

The total number of DBSpaces that OnLine is dynamically configured to manage at this time.

Chunk Detail Definitions

Heading

Description

Format

address

The in-memory address of the chunk structure.

Hex

chk

The ordinal number of the chunk relative to its creation.

Dec

dbs

The DBSpace number with which this chunk is associated.

Dec

offset

The offset (in pages) into the chunk where OnLine will begin writing.

Pages

size

The size of the chunk in pages.

Pages

free

The number of unused (free) pages remaining in the chunk.

Pages

bpages

If this is a BLOB chunk, the approximate number of BLOB pages in use (hence, the tilda).

Dec

flags

Describes the status of the chunk using the following coded values:
Position 1:

P Primary chunk
M Mirror chunk

Position 2:

O OnLine
D Down
I Inconsistent
N Renamed and either Down or Inconsistent
R Recovery
X Newly Mirrored

Position 3:

- Data DBSpace
B BLOB DBSpace
S Smart BLOBSpace

Position 4:

B DBSpace with chunks larger than 2GB

Position 5:

E Identifies the chunk as extendable

Position 6:

For cooked file chunks
C On AIX the concurrent I/O option is enabled
D The direct I/O option is enabled

Str

pathname

The full pathname of the chunk.

Str

Chunk Summary Definitions

Label

Description

active

The total number of chunks that have been created for this instance.

maximum

The maximum number of chunks that this version of OnLine is able to handle.

Chunk I/O Detail Definitions

Column Heading

Column Description

Format

address

The in-memory address of the chunk structure.

Hex

chk

The ordinal number of the chunk relative to its creation.

Dec

dbs

The DBSpace number with which this chunk is associated.

Dec

offset

The offset (in pages) into the chunk where OnLine will begin writing.

Pages

page Rd

The number of pages read from this chunk since the last boot or onstat -z.

Dec

page Wr

The number of pages written to this chunk since the last boot or onstat -z.

Dec

pathname

The full pathname of the chunk.

Str

Chunk I/O Summary Definitions

Label

Description

active

The total number of chunks that have been created for this instance.

maximum

The maximum number of chunks that this version of OnLine is able to handle.

Notes

Fragment elimination and parallelism is performed at the DBSpace level.

DBSpace numbers and chunk numbers are automatically assigned and are reused if one happens to be dropped.

When looking for down chunks, it is easiest to 'grep' for the letters 'PD' rather than try to pick 'PD' out of a
list of 'PO's, since the two values tend to look very similar.

There are two types of chunks, primary and mirrored.

Primary does not refer to the first chunk for a DBSpace; rather, it is a way to refer a chunk that is not the
actual mirror.

Pathnames for chunks should be links to the device file. This will provide for greater flexibility, should a
disaster recovery situation occur.

The initial 53 pages of the first chunk for a DBSpace are used for 2 reserved pages, 1 chunk free list page
and 50 pages for the TBLSpace partition.

The second and follow-on chunks for a DBSpace will initially have an overhead of 3 pages: 2 reserved pages
and 1 chunk free list page.

Different versions of Informix Dynamic Server are designed to handle different maximum numbers of
chunks; the current maximum is 32K
If a chunk contains the MetaData for a Smart BLOBSpace, the offset listed will indicate: Metadata
The onstat -D only displays the page-read and page-write information for the first 50 chunks in each space.

Monitoring and Tuning

If mirroring is being performed, the primary and mirror chunks should be on different controllers.

It is important to ensure that your temporary DBSpaces are actually labelled as temporary. You should see a 'T'
in the second position of the second flags column of the DBSpace section.