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 > tracking down %cpu usage spent on locking

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-10-06, 19:30
hariza hariza is offline
Registered User
 
Join Date: Jan 2003
Location: australia
Posts: 17
tracking down %cpu usage spent on locking

Hi Guys,


I was wondering what would be the best way to collect some data/statistics without impacting the system where I can generate a report showing the amount of cpu consume/spent only to satisfy locking requests. I'm working on a Websphere/DB2 environmemt and I found that most of the critical apps are using isolation level REPEATABLE_READ. I'm sure this is causing performance issues apart from forcing db2 to consume more memory and cpu to hold those locks longer due the isolation level. Any ideas would be highly appreciated.

Thanks.

harbry
Reply With Quote
  #2 (permalink)  
Old 08-10-06, 20:40
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
I doubt that CPU time is significant for the locking, but lock wait time and elapsed time would definitely be factors. You can see both of these in a snapshot for dynamic SQL.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 08-13-06, 18:51
hariza hariza is offline
Registered User
 
Join Date: Jan 2003
Location: australia
Posts: 17
I suppose if the elapse time is extended cpu and resources also be use/kept for longer. Once I noticed for one thread that the locks held according to our monitor was 750,000 locks. In the database server at the moment what you can see is only %CPU User comsuption. There is not %WAITS %SYSTEM comsuption shown by nmon.
Reply With Quote
  #4 (permalink)  
Old 08-13-06, 19:01
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
nmon will not help you on this. If you do a DB2 snapshot for dynamic SQL, you can see how much elapsed time each SQL statement consumed in lock-wait time, elapsed time, CPU time, etc. DB2 does not consume a significant amount of CPU time when a SQL statement is in lock-wait mode.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #5 (permalink)  
Old 08-16-06, 00:56
hariza hariza is offline
Registered User
 
Join Date: Jan 2003
Location: australia
Posts: 17
Thanks Mate!!!!
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