[concurrency-interest] Instrumentation for locks

Adam Messinger adam@bea.com
Mon, 15 Sep 2003 18:18:05 -0700

One feature which we've found to be quite useful in the locking classes 
we currently use in WebLogic Server, is the ability to interrogate 
locks/semaphores for the current/high-water-mark number of waiters and 
wait times.  In some cases this functionality can be obtained at 
little/no additional runtime cost.  In other cases it does have a 
slight impact.

This data lets us look at a system as a whole and understand where the 
bottlenecks are.  For instance we can determine if the problem is that 
there are not enough instances of an EJB or enough connections to the 
database and suggest that the administrator increase the appropriate 
limit.  While this is a specific example, I wonder if this task of 
bottleneck identification might not be common enough to be supported by 
the standard concurrency utilities?