Consultor Eletrônico



Kbase P24981: What value should -B be set to?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   2/2/2011
Status: Verified

GOAL:

What value should -B be set to?

GOAL:

How to calculate -B

GOAL:

What is the formula to calculate how to increase -B?

GOAL:

How to verify if I need to increase my -B

GOAL:

How to monitor Buffer Hits to improve performance

FACT(s) (Environment):

All Supported Operating Systems
Progress/OpenEdge Product Family

FIX:

Increasing the buffer size decreases the amount of database record I/O by increasing the number of buffers available in memory. This increases memory usage. Increase the -B parameter to use more memory to reduce I/O. Decrease the -B parameter if memory is limited or if database buffer I/O causes paging.
The -B multiplied by the database blocksize gives a rough estimate of memory usage for the database.

As a rule of thumb you can start with 10% the size of your DB.

Example:
If you have 2 GB DB that has a -blocksize of 1024 you can set the -B to use 0.2 GB of RAM around 200 MB, each buffer uses 1 KB (determined by -blocksize), so -B 200000 will be around 10% of the total size of the DB.
If you have 2 GB DB with a -blocksize of 8192 then -B would be set to 200,000/8 = 25,000 because the -blocksize is 8 times bigger.
-B 25000 * -blocksize 8192 is proximately 200 MB.
To determine the efficiency of database buffer activity, check the Buffer Hits field of the PROMON Activity option.

Example:
OpenEdge MONITOR Release 10
Database: /db/sports
1. User Control
2. Locking and Waiting Statistics
3. Block Access
4. Record Locking Table
5. Activity
6. Shared Resources
7. Database Status
8. Shut Down Database
R&D. Advanced options
T. Transactions Control
L. Resolve Limbo Transactions
C. Coordinator Information
M. Modify Defaults
Q. Quit
Enter your selection: 5
________________________________________________

Activity - Sampled at 01/20/06 19:07 for 0:00:34.
Event Total Per Sec Event Total Per Sec
Commits 0 0.0 Undos 0 0.0
Record Updates 0 0.0 Record Reads 31 0.9
Record Creates 0 0.0 Record Deletes 0 0.0
DB Writes 2 0.1 DB Reads 18 0.5
BI Writes 1 0.0 &nbsp.; BI Reads 15 0.4
AI Writes 0 0.0
Record Locks 0 0.0 Record Waits 0 0.0
Checkpoints 0 0.0 Buffs Flushed 0 0.0
Rec Lock Waits 0 % BI Buf Waits 0 % AI Buf Waits 0 %
Writes by APW 0 % Writes by BIW 0 % Writes by AIW 0 %
Buffer Hits 79 %
DB Size 1386 K BI Size 2168 K AI Size 0 K
FR chain 116 blocks RM chain 3 blocks
Shared Memory 958464 Segments 1
0 Servers, 0 Users (0 Local, 0 Remote, 0 Batch),0 Apws
For best performance, increase the Blocks in Database Buffers (-B) parameter until the buffer hits percentage is higher than 95 percent.
Note that the larger the -B, the more of the database can be read into the buffers, but do not set -B so high that there is no available memory left and result in the system paging because of no free memory. .