Tapestry 5
  1. Tapestry 5
  2. TAP5-945

Unnecessary and severe lock contention in PerthreadManagerImpl

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.1.0.5
    • Fix Version/s: 5.2.0
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      When load testing our new high-volume site before soft launch, we found that we have severe lock contention in org.apache.tapestry5.ioc.internal.services.PerthreadManagerImpl.

      It synchronizes on "this" before invoking ThreadLocal.get() and ThreadLocal.remove(), which I believe is unnecessary.

      During our tests, approximately 35% of all Tomcat threads were waiting for this lock in any of 10 thread dumps taken 15 seconds apart.

        Issue Links

          Activity

          Olle Hallin made changes -
          Link This issue relates to TAP5-946 [ TAP5-946 ]
          Howard M. Lewis Ship made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          Fix Version/s 5.2.0.0 [ 12314122 ]
          Howard M. Lewis Ship made changes -
          Summary Lock contention in PerthreadManagerImpl Unnecessary and severe lock contention in PerthreadManagerImpl
          Howard M. Lewis Ship made changes -
          Assignee Howard M. Lewis Ship [ hlship ]
          Howard M. Lewis Ship made changes -
          Field Original Value New Value
          Link This issue relates to TAPESTRY-2141 [ TAPESTRY-2141 ]
          Olle Hallin created issue -

            People

            • Assignee:
              Howard M. Lewis Ship
              Reporter:
              Olle Hallin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development