LOGBUFSZ

Gopalan Venkatramani

LOGBUFSZ


Hi all - My production database snapshot shows me this,

 

db2 get snapshot for database on CMSDB | grep "Log pages"
Log pages read = 7124
Log pages written = 78773292

I know its something to do with LOGBUFSZ . Have anyone did certain steps and succeeded bringing the read to 0 ?

I never did this tuning and I consider all these snapshot is old school are much better than new generations MON ppl lol. 

Kindly assist...

 

Log buffer size (4KB) (LOGBUFSZ) = 2160
Log file size (4KB) (LOGFILSIZ) = 49152
Number of primary log files (LOGPRIMARY) = 240
Number of secondary log files (LOGSECOND) = 12

Regards

Glenn

DB2 LUW

Ian Bjorhovde

LOGBUFSZ
(in response to Gopalan Venkatramani)
Glenn,

Log pages read is incremented in 2 cases:

1 - When a transaction is rolled back, and DB2 has to read the log pages from disk to undo it.
2 - When CUR_COMMIT is enabled, and a transaction is trying to read the committed version of the row, and the log record(s) are no longer in the log buffer.


Increasing LOGBUFSZ can help with the second case, but you can’t prevent the first case - unless you don’t allow applications to perform ROLLBACK ;-)

Your goal should be to minimize log pages read, but achieving a value of zero may not be possible.  You have very few log pages read (relative to number of pages written), which is what you want to see.  Are you having an issue with logging on the system right now?


Ian Bjorhovde
IBM Gold Consultant



On Sep 25, 2017, 1:51 PM -0700, Gopalan Venkatramani <[login to unmask email]>, wrote:
>
> Hi all - My production database snapshot shows me this,
>
> db2 get snapshot for database on CMSDB | grep "Log pages"
> Log pages read = 7124
> Log pages written = 78773292
> I know its something to do with LOGBUFSZ . Have anyone did certain steps and succeeded bringing the read to 0 ?
> I never did this tuning and I consider all these snapshot is old school are much better than new generations MON ppl lol.
> Kindly assist...
>
> Log buffer size (4KB) (LOGBUFSZ) = 2160
> Log file size (4KB) (LOGFILSIZ) = 49152
> Number of primary log files (LOGPRIMARY) = 240
> Number of secondary log files (LOGSECOND) = 12
> Regards
> Glenn
> DB2 LUW
>
> Site Links: View post online   View mailing list online   Start new thread via email   Unsubscribe from this mailing list   Manage your subscription
>
> This email has been sent to: [login to unmask email]
> Setup a data refresh task in less time than it takes to make a cup of coffee + save up to 90% in CPU
> ESAi's BCV5 & XDM fast data refresh & Test Data Mgmt products will make you a hero to users. See
> http://www.ESAIGroup.com/idug
>
> Use of this email content is governed by the terms of service at:
> http://www.idug.org/p/cm/ld/fid=2

Gopalan Venkatramani

RE: LOGBUFSZ
(in response to Ian Bjorhovde)

Ian - Thanks for the details. I wasn't aware the 1st point. Thats a good piece of information :) But what do you mean if there is a problem in logging in the system. If you mean by the transaction log I don't see any issues in the transaction logging part of DB. Since this is happening in Prod i am little worried. 

 Glenn

DB2 LUW