Kbase P19116: Should the bi blocksize be the same as the ai blocksize ?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  15/08/2008 |
|
Status: Verified
GOAL:
Should the bi blocksize be the same as the ai blocksize ?
GOAL:
How to change the bi blocksize?
GOAL:
How to change the bi clustersize ?
GOAL:
How to change the ai blocksize?
GOAL:
Can I rollforward after changing the aiblocksize ?
GOAL:
What is the recommended ai and bi blocksize?
FIX:
1.) Increasing the BI Block Size
The database engine reads and writes information to the BI file in blocks. Increasing the size of these blocks allows the engine to read and write more data at one time. This can reduce I/O rates on disks where the BI files are located.
The default BI block size (8KB) is sufficient for applications with low transaction rates. However, if performance monitoring indicates that BI writes are a performance bottleneck and your platform's I/O subsystem can take advantage of larger writes, increasing the BI block size might improve performance, by keeping the cluster size small particularly on non-Enterprise database licenses.
Follow these steps to change the before-image bi block size:
a.) Use the PROSHUT command or the PROMON Shutdown a Database option to shut down the database.
b.) Enter the following command to change the bi block size:
$ proutil db-name -C truncate bi -biblocksize <size>
Example: $ proutil db-name -C truncate bi -biblocksize 16
Where:
<size> = the new BI blocksize is specified in in kilobytes of {1, 2, 4, 8, 16}
If you specify 0, Progress uses the default size (8K) for your operating system platform.
The minimum value allowed is the size of the database block.
(default 8 KB)
- You can also change the BI cluster size with this command at the same time. For more information, see the "Increasing the BI Cluster Size" section below.
- If after-imaging is enabled, you also need to consider the -aiblocksize if you change the BI cluster size and block size. Otherwise you are likely to suffer a bi bottleneck performance hit. For information, see the "Increasing the AI Block Size" section below.
- For detailed information on this command, please refer to the Database Administration Guide and Reference.
2.) Increasing the BI Cluster Size
The BI file(s) is/are organized into a cluster chain on disk. As the database engine writes data to the BI file, these clusters fill up. When a cluster fills, the database engine must ensure that all modified database buffer blocks referenced by notes in that cluster are written to disk. This is known as a checkpoint. Checkpointing reduces recovery time and lets the engine reuse BI disk space. Raising the BI cluster size increases the interval between these checkpoints.
Raising the BI cluster size can reduce the I/O overhead of writing modified database buffers to disk. It also lets you defer writes and collect more changes before writing a block; this lets you write multiple changes with the same write.
Larger cluster sizes generally increase performance by increasing the duration of checkpoints allowing more time for modified database blocks to be written to disk in an orderly fashion by the page writers. Duration for the last 8 checkpoints are displayed in promon's Checkpoints display. If they are at least a minute long, you don't need to change the clustersize. If they are shorter than 1 (one) minute, you should increase the cluster size. If you have the Workgroup database, keep the cluster size small. 512 k or less will be better than large cluster sizes because there will not be any page writers to write modified database blocks to disk.
A Bigger bi clustersize will mean:
Initial increased disk space usage for the BI file. This can be offset by growing the bi file clusters before starting the database with the:
$ proutil dbname -C bigrow <n>
- For detailed information on this command, please refer to the Database Administration Guide and Reference
Longer checkpoint times - as there is more information to consider when we reach the end of the cluster. This can be offset by running Asynchronous Page W.riters that are available with an Enterprise Database license.
$ proapw dbname
- For detailed information on this command, please refer to the Database Administration Guide and Reference
Follow these steps to change the before-image bi cluster size:
a.) Use the PROSHUT command or the PROMON Shutdown a Database option to shut down the database.
b.) Enter the following command to change the BI cluster size:
$ proutil db-name -C truncate bi -bi <size>
Example: $ proutil db-name -C truncate bi -bi 16384
Where:
<size> = the new BI cluster size is specified in in kilobytes. The number must be a multiple of 16 in the range 16 to 262128 (16K-256MB)
(default 512BK, Cluster sizes from 512 to 16384 are common.)
- For detailed information on this command, please refer to the Database Administration Guide and Reference.
- You can also change the BI block size with this command at the same time, by specifying both sizes at the same time:
Example: $ proutil db-name -C truncate bi -bi 16384 -biblocksize 16
- If after-imaging is enabled, you do not need to consider the after-image cluster size, there is no concept of "aiclustersize" in the Progress database as ai notes are contiguous and there is no reason to ever "re-use" ai clusters.
3.) Increasing the AI Block Size
As with before-imaging, the database engine reads and writes information to the AI file in blocks. Increasing the size of AI blocks lets the engine read and write more AI data at one time. This can reduce I/O rates on disks where the AI files are located. In general, the default AI block size (8KB) is sufficient for systems with low transaction rates. However, if performance monitoring indicates that AI writes are a performance bottleneck and your platform's I/O subsystem can take advantage of larger writes, increasing the AI block size might improve performance, particularly if you have Fathom Replication enabled on the database. A larger AI block size might also improve performance for roll-forward recovery processing.
Follow these steps to change the after-image ai block size:
a.) Use the PROSHUT command or the PROMON Shutdown a Database option to shut down the database.
As after-imaging is enabled, disable it by entering the following command:
$ rfutil db-name -C aimage end
b.) Truncate the BI file to bring the database and BI files up to date and eliminate any need for database recovery. To do this, enter the following command:
$ rfutil db-name -C truncate bi- [ -bi size | -biblocksize size ]
Typically, if you change the AI block size, you should also change the BI block size. If you have not already, you might want to use this command to do so. For more information on the BI block size, see the "Increasing the BI Block Size" section.
c.) Change the AI block size by entering the following command:
$ rfutil db-name -C aimage truncate -aiblocksize <size> [ -a aifilename ]
Where:
<size> = the new AI read and write blocksize is specified in kilobytes of {0, 1, 2, 4, 8, and 16}.
If you specify 0, Progress uses the default size (8K) for your operating system platform.
The minimum value allowed is the size of the database block.
(default 8 KB)
d.) Perform a full backup of the database or use the "rfutil mark backedup" cmd depending on your After-Imaging strategy.
NOTE: You must perform this step because backups and AI files created before you change the AI block size are no longer valid with the new AI block .size. In effect, you will need to re-baseline your replicated database from this point onwards.
e.) Enable after-imaging (again) by entering the following command:
$ rfutil dbname -C aimage begin
f.) Restart the database and continue processing..