Selector stuck sometimes in the ePoolWait when called with the timeout

Description

We noticed that for some reason calling Selector with the give timeout is not working out, as the thread gets stuck in the native ePoolWait method. I created a small fix for this where the Selector is called only with the non-blocking selectNow() method and handling the timeout thingy on our own in the java code.

This already gave create results on the IBM JVM that was experiencing the problem (but I think in general many Java 7 versions have this problem, it's also easy to find this on the Google).

I tested with the KryoNet integration test it seams to have same performance as before and that it's also functionally OK.

Environment

None

Gliffy Diagrams

Activity

Show:

Technical UserNovember 25, 2016 at 10:51 AM

SUCCESS: Integrated in

inspectIT - Integration #228
INSPECTIT-2249: (re-opened) decreasing the wait time between selects in (patrice.bouillet: b3324d2d814afab4817d54e02e5cd2a580126157)

  • (edit) inspectit.shared.all/src/main/java/rocks/inspectit/shared/all/kryonet/Client.java

  • (edit) inspectit.shared.all/src/main/java/rocks/inspectit/shared/all/kryonet/Server.java

Ivan SenicNovember 23, 2016 at 9:22 AM

The fix we introduced here is having a huge impact to the performance of the sending apparently. Before this fix I needed app. 30s to start Ddv Store app. With same settings now I need app. 50s to start. That's almost 100% drop. I am not sure what can we do, but seams like this was not the best fix. I'll try to investigate what can we do.

Technical UserNovember 11, 2016 at 7:33 AM

SUCCESS: Integrated in

inspectIT - Integration #216
INSPECTIT-2249: using only Selector.selectNow and executing time-out (patrice.bouillet: 38f0d5313016ed604f6ecb3ecd8bebb785d111aa)

  • (edit) inspectit.shared.all/src/main/java/rocks/inspectit/shared/all/kryonet/Server.java

  • (edit) inspectit.shared.all/src/main/java/rocks/inspectit/shared/all/kryonet/TcpConnection.java

  • (edit) inspectit.shared.all/src/main/java/rocks/inspectit/shared/all/kryonet/Client.java

Fixed

Details

Assignee

Reporter

Integrator

Sprint

Fix versions

Affects versions

Priority

Created November 8, 2016 at 3:08 PM
Updated November 25, 2016 at 10:53 AM
Resolved November 11, 2016 at 7:34 AM