Unix Technical Forum

Log write batch performance problem DB2 V8 for AIX

This is a discussion on Log write batch performance problem DB2 V8 for AIX within the DB2 forums, part of the Database Server Software category; --> We are runing a critical batchjob in DB2 V8 fp4 for AIX on a p630 with AIX 5.2 The ...


Go Back   Unix Technical Forum > Database Server Software > DB2

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-26-2008, 04:39 PM
Mats Mohlin
 
Posts: n/a
Default Log write batch performance problem DB2 V8 for AIX

We are runing a critical batchjob in DB2 V8 fp4 for AIX on a p630 with
AIX 5.2
The job updates only 6 columns of the 100 columns in a 600 bytes wide
row.
The job is very IO bound because of log writes. We seems to be logging
full rows 600 bytes per updated row.
I thought DB2 should be clever enough to only log the modified columns
??
We also seems to write to the log with a lot of small writes, filemon
-v -O lf output indicates
that we write just 18 KB per IO.
The batchjob updates 290 000 rows (read/update) and it does just 58
commit
We can only reach a rate of 1000 rows/sec and we need to increase this.

I have tried to increase log buffer size, this is our values
DBHEAP 10000 logretain OFF LOGBUFSZ 4000
logprimary 14
logsecond 20 logfilsiz 8000
How can we get DB2 to log less and write more on each log write.

Mats Mohlin IBM Sweden

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 04:40 PM
Anton Versteeg
 
Posts: n/a
Default Re: Log write batch performance problem DB2 V8 for AIX

Mats,
Just wondering:
Is the sequence of your updates the same as the physical sequence of the
rows in the database?
How exactly are you updating? Based on cursor or on key?

Mats Mohlin wrote:

>We are runing a critical batchjob in DB2 V8 fp4 for AIX on a p630 with
>AIX 5.2
>The job updates only 6 columns of the 100 columns in a 600 bytes wide
>row.
>The job is very IO bound because of log writes. We seems to be logging
>full rows 600 bytes per updated row.
>I thought DB2 should be clever enough to only log the modified columns
>??
>We also seems to write to the log with a lot of small writes, filemon
>-v -O lf output indicates
>that we write just 18 KB per IO.
>The batchjob updates 290 000 rows (read/update) and it does just 58
>commit
>We can only reach a rate of 1000 rows/sec and we need to increase this.
>
>I have tried to increase log buffer size, this is our values
> DBHEAP 10000 logretain OFF LOGBUFSZ 4000
>logprimary 14
> logsecond 20 logfilsiz 8000
>How can we get DB2 to log less and write more on each log write.
>
>Mats Mohlin IBM Sweden
>
>
>


--
Anton Versteeg
IBM Certified DB2 Specialist
IBM Netherlands


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 04:41 PM
Mark A
 
Posts: n/a
Default Re: Log write batch performance problem DB2 V8 for AIX

> >We are runing a critical batchjob in DB2 V8 fp4 for AIX on a p630 with
> >AIX 5.2
> >The job updates only 6 columns of the 100 columns in a 600 bytes wide
> >row.
> >The job is very IO bound because of log writes. We seems to be logging
> >full rows 600 bytes per updated row.
> >I thought DB2 should be clever enough to only log the modified columns
> >??
> >We also seems to write to the log with a lot of small writes, filemon
> >-v -O lf output indicates
> >that we write just 18 KB per IO.
> >The batchjob updates 290 000 rows (read/update) and it does just 58
> >commit
> >We can only reach a rate of 1000 rows/sec and we need to increase this.
> >
> >I have tried to increase log buffer size, this is our values
> > DBHEAP 10000 logretain OFF LOGBUFSZ 4000
> >logprimary 14
> > logsecond 20 logfilsiz 8000
> >How can we get DB2 to log less and write more on each log write.
> >
> >Mats Mohlin IBM Sweden
> >

Doesn't DB2 log all data from the changed column to the end of the row? Or
maybe that has changed? I know that is how DB2 for OS/90 worked at one time.

I would do commits more often, perhaps once every 100-500 updates.

As previously mentioned, it is important to process the updates in the same
order as the physical sequence of the table, if possible. This is defined by
the clustering index, or the index used in a reorg if no clustering index is
defined.

Also if the varchar columns are updated (and made larger), make sure you
have enough percent free defined for the table to handle that, otherwise the
row many need to be relocated (very expensive).

Percent free on the indexes is also important if they are changed in the
update statement.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:41 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com