flushed to disk. The log records are written to disk less frequently and more log
records are written each time. Initially, set
LOGBUFSZ
to 128 (or 256) 4 KB pages.
The log buffer area uses space controlled by the
DBHEAP
database parameter, so
consider increasing this parameter also.
Later use the snapshot for applications to check current usage of log spaces by
transactions as presented in Example 9 36.
Example 9 36 Current usage of log space by applications
$db2 update monitor switches using uow on
$db2 get snapshot for applications on sample | grep "UOW log"
UOW log space used (Bytes) = 478
UOW log space used (Bytes) = 21324
UOW log space used (Bytes) = 110865
Before running the application snapshot, the
Unit Of Work
monitor should be
switched on. At the time the snapshot was issued, only three applications were
running on the system. The first transaction used 478 bytes of log space, the
second 21324, and the last used 110865, which is roughly 28 pages more than
the default log buffer size. The snapshot gives only current values from the
moment the command was issued. To get more valuable information about the
usage of log space by transactions, run the snapshot many times.
Example 9 37 shows how to get information about log I/O activity.
Example 9 37 Checking log I/O activity
db2 reset monitor for database sample
# let the transactions run for a while
db2 get snapshot for database on sample > db_snap.txt
egrep i "commit|rollback" db_snap.txt
Commit statements attempted = 23
Rollback statements attempted = 2
Internal commits = 1
Internal rollbacks = 0
Internal rollbacks due to deadlock = 0
grep "Log pages" db_snap.txt
Log pages read = 12
Log pages written = 630
Before running the database snapshot, you may have to reset the monitors. The
values gathered by the snapshot are cumulated since the last monitor reset or
Chapter 9. Testing and tuning
307
footer
Our partners:
PHP: Hypertext Preprocessor Cheap Web Hosting
JSP Web Hosting
Ontario Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Java Hosting
Cheapest Hosting
Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved