If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Reorg table/index worst performance ever

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-30-12, 07:26
Revu Revu is offline
Registered User
 
Join Date: Jan 2012
Posts: 18
Reorg table/index worst performance ever

Hi!

We are getting performance issues about reorging huge tables in our database.

Details:
  • Db2 9.7
  • 4 TB database.
  • + 100GB Physical memory.
  • Nice disk write and read ratios
  • 20% CPU use.

Last weekend after feeling ourselves unable to rebuild the biggest tables, we tried to reorg a 1GB table in a 2,3TB tablespace, it was working hard for 2 hours to reorg that simple table.

It seems that there is a db2 bottleneck but we dont know how to find it.

Could anyone help us? how can i improve directly the reorg performance? How can i know if there is any memory bottleneck?

Thanks in advance for ur help.

Revu.
Reply With Quote
  #2 (permalink)  
Old 01-30-12, 07:49
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
what is the exact reorg syntax you used? How many rows in the table? Enough temp-space with the required pagesize?
how about db2diag output? numer of logfiles? numer of indexes?
Nice read/write ratios? And the individual disks? Not 1 getting all the I/O?
Reply With Quote
  #3 (permalink)  
Old 01-30-12, 09:01
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
that's why partitioning is invented so one would not have to reorg/runstats entire huge table.
__________________
DB2 v9.5 ESE on AIX v6.1/ v9./10 on z/OS
Reply With Quote
  #4 (permalink)  
Old 01-30-12, 09:10
Revu Revu is offline
Registered User
 
Join Date: Jan 2012
Posts: 18
First of all:

We have already tried to rebuild/reorg another 20 tables (between 1 GB and 100GB sized) and the performance has became as bad as the first one.

That's a bit suspicious, it seems like it was a bottleneck during our reorg operations.

---

what is the exact reorg syntax you used?
offline reorg without using tempspace, using longlobdata option.

All the sap applications were stopped while data was in movement.



How many rows in the table?

14KK

Enough temp-space with the required pagesize?

Yes. There were enough space but we havent used tempspace option

how about db2diag output?

Nothing

numer of logfiles?

Logretaint recovery, 256 logfiles, about 200GB of total log transaction capacity

numer of indexes?

3

Nice read/write ratios?

There were no finding reported during the last storage review (2 weeks ago).

And the individual disks? Not 1 getting all the I/O?

there are 7 different disks, 1 container per disk for each tablespace.Tablespaces are DMS.

All the containers's i/o were similar.




Thanks a lot for u quick answer=)
Reply With Quote
  #5 (permalink)  
Old 01-30-12, 09:12
fengsun2 fengsun2 is offline
Registered User
 
Join Date: Nov 2011
Posts: 124
Do you reorg table offline? There are four phases in a offline table reorgnization.
sort ,build ,replace , index_recreate .
Have you used db2pd or other monitor tools to see the runing time for each phase?
Reply With Quote
  #6 (permalink)  
Old 01-30-12, 09:13
Revu Revu is offline
Registered User
 
Join Date: Jan 2012
Posts: 18
Quote:
Originally Posted by MarkhamDBA View Post
that's why partitioning is invented so one would not have to reorg/runstats entire huge table.
Im in agreement with you, but is impossible to fight against SAP developers...
Reply With Quote
  #7 (permalink)  
Old 01-30-12, 09:16
Revu Revu is offline
Registered User
 
Join Date: Jan 2012
Posts: 18
Quote:
Originally Posted by fengsun2 View Post
Do you reorg table offline? There are four phases in a offline table reorgnization.
sort ,build ,replace , index_recreate .
Have you used db2pd or other monitor tools to see the runing time for each phase?
Yes, we have db2pd'ed all the 4 phases.

There were no difference between them, all of them were reeeeeally slow.

Thx.
Reply With Quote
  #8 (permalink)  
Old 01-30-12, 09:18
fengsun2 fengsun2 is offline
Registered User
 
Join Date: Nov 2011
Posts: 124
and what the io capacity is (10M/s、50M/s or 100M/s ?) when the table reorgnization is runing...
Reply With Quote
  #9 (permalink)  
Old 01-30-12, 09:19
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
longlobdata :Long field and LOB data are to be reorganized.
this has nothing todo with/without tempspace as I can read
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #10 (permalink)  
Old 01-30-12, 09:24
Revu Revu is offline
Registered User
 
Join Date: Jan 2012
Posts: 18
Quote:
Originally Posted by Revu View Post
Yes, we have db2pd'ed all the 4 phases.

There were no difference between them, all of them were reeeeeally slow.

Thx.
Perhaps the "build" phase was the slowest one.

If we split the time spent to reorg the table we could seen something like these

sort 15%
build 35%
replace 20%
index_recreate 30%
Reply With Quote
  #11 (permalink)  
Old 01-30-12, 09:26
Revu Revu is offline
Registered User
 
Join Date: Jan 2012
Posts: 18
Quote:
Originally Posted by przytula_guy View Post
longlobdata :Long field and LOB data are to be reorganized.
this has nothing todo with/without tempspace as I can read
przytula_guy, are you saying that's impossible to reorg longlobdata without using tempspace, or are you suggesting that this could be the bottleneck?

thanks a lot!!!
Reply With Quote
  #12 (permalink)  
Old 01-30-12, 09:42
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
the option is to force the reorg of long data (if any)
for offline reorg the tempspace is always used, and the tbspace for this can be specified : use tablespacename
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #13 (permalink)  
Old 01-30-12, 09:59
Revu Revu is offline
Registered User
 
Join Date: Jan 2012
Posts: 18
Thanks for your answer, but i dont understand you.

Are you trying to say that we need to force the use of tempspace?

Is there any bottleneck using the longlobdata without specifing the temporary tablespace?

Is there a lot of wasted time moving the lobs?

Last edited by Revu; 01-30-12 at 10:07.
Reply With Quote
  #14 (permalink)  
Old 01-31-12, 03:19
Revu Revu is offline
Registered User
 
Join Date: Jan 2012
Posts: 18
I just need to know any way of monitoring my database in order to find the bottleneck.

Which are the memory pools affected by tables and indexes reorganizations?

Is there any relationship between reorgs and prefetchsize? and util_heap_size? and num_io_servers?

Thx for ur help.
Reply With Quote
  #15 (permalink)  
Old 01-31-12, 04:04
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
how about reading some doc in
REORG INDEXES/TABLE
and developerswork ...
instead of requesting "spoon feeding"
try first to understand what db2 is doing and request specific questions instead of ..
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On