Consultor Eletrônico



Kbase 16637: 8.2A Variable Database Blocksize
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
8.2A Variable Database Blocksize


Progress V8.2 includes a new feature that enhances database
performance, Database Variable-block Size. At creation of a database,
you will now have the ability to specify a database block size that is
a multiple of 1024 Bytes. Specifically, 1024, 2048, 4096 and
8192 Bytes.

Previous to v8.2, Progress only created Databases with a blocksize
of 1024Bytes (1k), regardless of the File System blocksize. The fact
that File Systems have different block sizes, added value the value of
creating a progress database with a database blocksize the same
as the File System blocksize. By default, progress creates
a database with a 1k blocksize. The following lists the default
File Systems and their system blocksize.

OS Blocksize V7 DB Blocksize
----------------------------------------
UNIX (most) 1024bytes (1k) 1024Bytes (1k)
NT 4096 (4k) 4096Bytes (4k)
VMS 512 (.5k) 1024Bytes (1k)
DOS 1024 (1k) 1024Bytes (1k)
SEQUENT 2048 (2k) 2048Bytes (2k)

CREATING A MULTI-VOLUME DATABASES:

prostrct create <dbname> <dbname.st> -blocksize <num>

where -blocksize <num>

1024
2048
4096
8192

-blocksize must be the last argument on the command line.

CREATING A SINGLE VOLUME DATABASES:

prodb <dbname> $DLC/empty1
..... empty2
..... empty4
..... empty8

procopy $DLC/empty1 <dbname>
... empty2 <dbname>
... empty4 <dbname>
... empty8 <dbname>

DATABASE BUFFERS (-B) AND VARIABLE BLOCKSIZE DATABASES

The -B parameter is used to define the number of database blocks to
be loaded in the database buffer pool at startup of the database
broker. If your database was created with the default blocksize of
1k, (prior to Version 8.2) the database buffer pool (-B) will be
in 1k increments. If a database has been created with a blocksize
of 2k, 4k or 8k, then the database buffer pool (-B) will be in the
increments of 2k, 4k or 8k, respectively. You can display this from
the promon utility in R&D,option 1, option 14 Shared Memory Segments.
The following, lists Shared memory segment sizes from different
Database block sizes on an HP-UX 10.10. Note the segment size is
slightly larger than the blocksize multiplied by the (-B 1000).
The point here is to be aware that the amount of memory increases
(-B) parallel to the size of the database blocksize.

Example: proserve <dbname> -B 1000

Shared Memory Alloc. x (-B) = Segment Size

DB Blocksize(bytes) Shared Memory Alloc(bytes) Segment Size(bytes)
----------------------------------------------------
1024 1380 1413120
2048 2432 2490368
4096 4540 4648960
8192 8756 8966144

DISADVANTAGES:

1. There is no conversion utility available to convert from one
database blocksize to another. You must DUMP and LOAD the database
into a new structure.

2. You cannot use the procopy or prorest command to a database of
a different blocksize. You will receive the following error:

Source and Target databases should have same blocksize: 1024, 4096

3. Your database will use more disk space moving to a variable length
blocksize. For example, converting a database with 100 records
from a 1k to an 8k blocksize produces the following results:

1k blocksize : 100rec/32rec per block = 3.125(or 4blks) x 1k = 4k
8k blocksize : 100rec/64rec per block = 1.563(or 2blks) x 8k = 16k

ADVANTAGES:

1. It has been increasingly noticed that a larger blocksize than
1k are becoming available on many OS platforms. There are
performance improvements in moving to blocksizes that are equal to
or a multiple of the underlying filesystem's block size.

2. There are underlying physical differences between 1k, 2k, 4k and
8k database blocksizes. The record manager will manage 64 records
per block with an 8k blocksize database and 32 records per block
with a 1k, 2k and 4k blocksize database. Thus reducing the amount
of i/o required to access records both through an index and
sequentially.

Progress Software Technical Support Note # 16637