środa, września 03, 2014

Why does EMS have poor client initialization concurrency?

"TibemsXAUniConnectionHandler/pushConnection-336" daemon prio=6 tid=0x000000000fbde000 nid=0x1e58 waiting for monitor entry [0x0000000026dce000]
   java.lang.Thread.State: BLOCKED (on object monitor)
at com.tibco.tibjms.TibjmsxLinkTcp._createSocket(TibjmsxLinkTcp.java:797)
- waiting to lock <0x00000000fdea8b90> (a java.lang.Object)
at com.tibco.tibjms.TibjmsxLinkTcp.connect(TibjmsxLinkTcp.java:914)
at com.tibco.tibjms.TibjmsConnection._create(TibjmsConnection.java:1354)
at com.tibco.tibjms.TibjmsConnection.(TibjmsConnection.java:4320)
at com.tibco.tibjms.TibjmsXAConnection.(TibjmsXAConnection.java:30)
at com.tibco.tibjms.TibjmsXAQueueConnection.(TibjmsXAQueueConnection.java:29)
at com.tibco.tibjms.TibjmsxCFImpl._createImpl(TibjmsxCFImpl.java:164)
at com.tibco.tibjms.TibjmsxCFImpl._createConnection(TibjmsxCFImpl.java:253)
at com.tibco.tibjms.TibjmsXAQueueConnectionFactory.createXAQueueConnection(TibjmsXAQueueConnectionFactory.java:111)
at com.tibco.tibjms.XConnectionHandler$2.run(XConnectionHandler.java:201)

Process of connecting is degraded to single threaded processing due to private static Object _shutdownLock over which almost everything is synchronized inside TibjmsxLinkTcp class including socket creation and heartbeat processing. Fixing this lock (degrading from static) we step down from 8 seconds to 120ms on connection establishing while allocating 20 connections with 10 seconds heartbeat.

0 komentarze: