Thursday, August 29, 2013

Finding the needle in the Deadlock haystack

I'm reposting this from an excellent blog post here: -


<snip>
How many people out there have enjoyed the hunt for the deadlock culprits? If you are very analytical and enjoy a good murder mystery then perhaps you enjoy tracking down the two lines of application code that caused a deadlock that you wanted to resolve. For those that have not had the pleasure, let me start from the beginning…what is a deadlock?

In any database system a deadlock occurs when two applications are both waiting on a resource (row lock usually) that the other holds. Neither can proceed because they are waiting on each other and neither will voluntarily release their locks so you are in a deadlock. All database systems have a deadlock detector that wakes up on occasion, looks for deadlocks and if it finds one, it kills one of the transactions (rolls back the current unit of work) which results in that application releasing its lock so the other application can proceed. In the case of DB2 the application that is the victim gets a SQL0911 telling the app that the transaction was rolled back due to a deadlock or lock timeout.
</snip>

<snip>
With DB2 there is a deadlock event monitor that will dump out information when a deadlock occurs. In fact with DB2 v8.2, a DEADLOCKS WITH DETAILS event monitor is created automatically when the database is created and is started every time the database is started. This detailed deadlock monitor will dump information about the applications involved in any deadlock, including userids, hostnames of client machines, the statement text of the currently executing statement, and a list of all locks held by the application. The information is stored in the default database path (which you can find from your dbm configuration) in a directory called db2event/db2detaildeadlock.
</snip>

This from my own DB2 LUW environment: -

$ db2level

DB21085I  Instance "db2inst1" uses "64" bits and DB2 code release "SQL09075" 
with level identifier "08060107".
Informational tokens are "DB2 v9.7.0.5", "s111017", "IP23292", and Fix Pack 
"5".
Product is installed at "/opt/ibm/db2/V9.7".


$ db2evmon -db bpmdb  -evm db2detaildeadlock

Reading /home/db2inst1/db2inst1/NODE0000/SQL00003/db2event/db2detaildeadlock/00000000.evt ...
--------------------------------------------------------------------------
                            EVENT LOG HEADER
  Event Monitor name: DB2DETAILDEADLOCK
  Server Product ID: SQL09075
  Version of event monitor data: 11
  Byte order: LITTLE ENDIAN
  Number of nodes in db2 instance: 1
  Codepage of database: 1208
  Territory code of database: 1
  Server instance name: db2inst1
--------------------------------------------------------------------------

--------------------------------------------------------------------------
  Database Name: BPMDB   
  Database Path: /home/db2inst1/db2inst1/NODE0000/SQL00003/
  First connection timestamp: 29/08/2013 13:02:20.966657
  Event Monitor Start time:   29/08/2013 13:02:21.275886
--------------------------------------------------------------------------

--------------------------------------------------------------------------
  Database Name: BPMDB   
  Database Path: /home/db2inst1/db2inst1/NODE0000/SQL00003/
  First connection timestamp: 29/08/2013 13:07:52.540448
  Event Monitor Start time:   29/08/2013 13:08:10.467783
--------------------------------------------------------------------------

--------------------------------------------------------------------------
  Database Name: BPMDB   
  Database Path: /home/db2inst1/db2inst1/NODE0000/SQL00003/
  First connection timestamp: 29/08/2013 13:26:22.695516
  Event Monitor Start time:   29/08/2013 13:26:28.356203
--------------------------------------------------------------------------

--------------------------------------------------------------------------
  Database Name: BPMDB   
  Database Path: /home/db2inst1/db2inst1/NODE0000/SQL00003/
  First connection timestamp: 29/08/2013 13:31:07.766264
  Event Monitor Start time:   29/08/2013 13:31:08.846314
--------------------------------------------------------------------------

--------------------------------------------------------------------------
  Database Name: BPMDB   
  Database Path: /home/db2inst1/db2inst1/NODE0000/SQL00003/
  First connection timestamp: 29/08/2013 13:35:22.084183
  Event Monitor Start time:   29/08/2013 13:35:22.574086
--------------------------------------------------------------------------

--------------------------------------------------------------------------
  Database Name: BPMDB   
  Database Path: /home/db2inst1/db2inst1/NODE0000/SQL00003/
  First connection timestamp: 29/08/2013 13:35:22.756913
  Event Monitor Start time:   29/08/2013 13:35:23.409371
--------------------------------------------------------------------------

--------------------------------------------------------------------------
  Database Name: BPMDB   
  Database Path: /home/db2inst1/db2inst1/NODE0000/SQL00003/
  First connection timestamp: 29/08/2013 13:37:11.460381
  Event Monitor Start time:   29/08/2013 13:37:22.980311
--------------------------------------------------------------------------

IBM InfoSphere Data Architect V9.1

One of my colleagues was looking for a tool with which he could model some relational databases.

I asked my network, and found this: -


IBM® InfoSphere Data Architect is a collaborative data design solution to help you discover, model, relate, and standardize diverse and distributed data assets. It supports dimensional modelling.


He downloaded the trial, installed it and was up and running …...

Using DB2TOP to work out what table is being hit by an IBM BPM operation

I was trying to ascertain which DB2 table was being affected by a particular operation in IBM BPM, that of creating an internal group: -


To be 100% clear, these are INTERNAL groups, rather than groups that are available to WebSphere Application Server, perhaps held in LDAP,  accessible via WebSphere Identity Manager (WIM) / Virtual Member Manager (VMM).

So, to come back to my core requirement, I was trying to work out what table(s) get updated when I create a new group ( the reason for this is that I've just created ~470 groups by hand, and wanted to query DB2 to check that I'd not missed any!!! ).

My underlying database is DB2 LUW, and I was looking for a way to monitor the database whilst I was using it within BPM.

Introducing DB2TOP  ….

This neat-o utility, probably based on Unix' top command provides a GUI ( albeit NOT X11-based ) view of the world.

I executed it as follows: -

$ db2top -d bpmdb

 

and then hit T ( capital T ) for Tables, rather than t ( lowercase t ) for Tablespaces, and then added a new internal group - SNAFU - and watched DB2TOP: -



This showed me that the table being updated was LSW_USR_GRP_XREF, which is precisely what I was looking for: -

db2 "select GROUP_NAME from db2inst1.LSW_USR_GRP_XREF" with UR

GROUP_NAME

...
FOOBAR
SNAFU
foobar
tw_admins
...

Some further reading: -






Bad science ? Or just bad mathematics ? Or just me ?

From this BBC News article: -


<snip>
A team of researchers claims to have created the world's fastest spinning man-made object.

They were able to levitate and spin a microscopic sphere at speeds of up to 600 million revolutions per minute.

This spin speed is half a million times faster than a domestic washing machine and more than a thousand times faster than a dental drill.
</snip>

For some reason, this piqued my interest.

The way that I read the two highlighted phrases is this: -

1) The researchers have an object that can spin at up to 600 million RPM ( 600,000,000 RPM )
2) That is 0.5 million ( 500,000 ) RPM faster than a domestic washing machine
3) Ergo, domestic washing machines spin at 599.5 million RPM ( 599,500,000 RPM )

According to another reputable ( in my personal opinion ) source, Which?

<snip>
Many washing machines boast a high 1400 revolutions per minute (rpm), 1600rpm or even 1800rpm spin speed rather than the more common 1200rpm, which helps save time on the line or energy use in the tumble dryer by removing more water. However you'll usually pay extra for this feature, and 1200rpm is generally adequate for most loads.
</snip>

So the BBC are comparing this lab experiment with a washing machine … that can spin at 599.5 million RPM.

Can someone please explain the error in my working ? 'Cos I am confused.com

Wednesday, August 28, 2013

IBM BPM 8.5 - My first exposure ....

Hmmmm, over two months since it was released, and I finally made the time to download IBM BPM 8.5.

I've not yet installed it, but I'm looking forward to the process.

In the meantime, this is what I downloaded: -

IBM Business Process Manager Advanced Version 8.5 Linux X86 32Bit /X86 64Bit Multilingual eAssembly (CRMM5ML)

or, more specifically: -

IBM Business Process Manager Advanced Version 8.5 For Linux X86 32/64Bit Multilingual - 1 of 3 (CIL96ML) 
IBM Business Process Manager Advanced Version 8.5 For Linux X86 32/64Bit Multilingual - 2 of 3 (CIL97ML) 
IBM Business Process Manager Advanced Version 8.5 For Linux X86 32/64Bit Multilingual - 3 of 3 (CIL98ML) 

as I already have WAS 8.5 and DB2 10, and won't use LDAP in the first instance.

I do have to remember that I need WAS 8.5.0.2 ( aka 8.5.0 Fixpack 2 ) and DB2 10.1 Fixpack 1.


What fun :-)

Thursday, August 22, 2013

From the Twitter stream - IBM web server plug-in is not load balancing evenly

Problem(Abstract)

IBM web server plug-in appears to not be load balancing correctly. Too much load is going to only one of the members (application servers) in the cluster. Why is this happening?

Symptom

During load testing, you might notice that a lot more work is being handled by only 1 application server in the cluster. However, the other application servers in the same cluster are much less busy by comparison.

Cause

The IBM web server plug-in only load balances non-affinity requests. These are new requests that do not have a session cookie (JSESSIONID) in the request.

On the other hand, if it is an affinity request, that does have a session cookie (JSESSIONID), then the plug-in will honor session affinity by sending the request to the same application server as before. It will use the application server which matches the cloneid in the JSESSIONID cookie.

Want to know more ? Then read the IBM Technote 1449249 here: -

IBM Connections Connector for Apache OpenOffice

So it's been waaaaaaay too long since I posted about IBM Connections, even though it's a tool that I use each and every day.

I saw this on my "river of streaming news" this morning: -

IBM Connections Connector for Apache OpenOffice

IBM Connections connector 2.0 is now available for download. It can help you connect to IBM Connections server to access and manage your files and other resources, while you are still working on the OpenOffice. The innovative and popular feature of Sidebar in OpenOffice 4.0 has been brought here to provide you a better experience and usability.

2.0
This release is updated for the Apache OpenOffice 4.0. It provides a new UI which is fully integrated with the new feature of sidebar, which makes better use of today's widescreen and can let you access your files more easily.
This release will focus on connection with Files of IBM Connections. Other services e.g. status update will be supported in the following release.
Windows, Mac and Linux are all supported.

- See more at: http://extensions.openoffice.org/en/project/ibm-connections-connector-apache-openoffice#sthash.ZfFymCgi.dpuf


Will get on and download this …...