Hi,
I'm highly interested by the issues Philippe Mouawad created, notably
https://issues.apache.org/jira/browse/OFBIZ-2186
https://issues.apache.org/jira/browse/OFBIZ-2124
Also, but not directly related to Synchronisation issues in OFBiz
https://issues.apache.org/jira/browse/OFBIZ-2353 (waiting comments from
Philippe)
https://issues.apache.org/jira/browse/OFBIZ-2599 (waiting action by DBCP team)
I trust Philippe and his colleagues since I know they worked on the
optimisation of a large and successful OFBiz deployment.
David suggested successively 2 patches for OFBIZ-2186 but they did not fix the
problem Philippe encountered. However Philippe's
patch did.
Since I'd like to fix these 2 issues in OFBiz (2124 and then 2186) but I have
no time to set 2 machines and a load balancer for
these particular problems to test, I googled for "synchronized java performance"
and I found this article
http://www.ibm.com/developerworks/java/library/j-jtp04223.html#N1005B by Brian
Goetz who also wrote
http://www.javaconcurrencyinpractice.com/ (I did not read the book yet)
I read also in Sun documentation
http://java.sun.com/developer/onlineTraining/Programming/JDCBook/perf2.html
"Synchronized methods and objects have until Java 2 always incurred an
additional performance hit as the mechanism used to implement
the locking of this code used a global monitor registry which was only single
threaded in some areas such as searching for existing
monitors. In the Java 2 release, each thread has a monitor registry and so many
of the existing bottlenecks have been removed.
If you have previously used other locking mechanisms because of the performance
hit with synchronized methods it is now worthwhile
re-visiting this code and incorporating the new Java 2 streamlined locks."
And also for Java 6 at
http://java.sun.com/performance/reference/whitepapers/6_performance.html#2.1
So I would like to commit the patch I slightly modified in OFBIZ-2124
But before that I'd be interested to have some opinions by people who are using load balancers. Notably Brett who recently answered
about this subject on user ML. Because I wonder why Philippe was the 1st to discover theses issues and if others have fixed them in
another way.
Please comment
Thanks
Jacques