You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Jerry Cwiklik (JIRA)" <ui...@incubator.apache.org> on 2008/11/21 21:15:44 UTC

[jira] Created: (UIMA-1232) Fix Synchronization Problem in the UIMA AS code

Fix Synchronization Problem in the UIMA AS code
-----------------------------------------------

                 Key: UIMA-1232
                 URL: https://issues.apache.org/jira/browse/UIMA-1232
             Project: UIMA
          Issue Type: Bug
          Components: Async Scaleout
            Reporter: Jerry Cwiklik


UIMA AS Aggregate code synchronizes code that sends a reply (CAS) back to a client. Part of sending the CAS back to the remote client is serialization of the CAS. This takes time. While the CAS is being serialized, other threads are blocked causing a bottleneck. Move the code that sends a reply outside of the synchronized block.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Updated: (UIMA-1232) Fix Synchronization Problem in the UIMA AS code

Posted by Adam Lally <al...@alum.rpi.edu>.
On Fri, Nov 21, 2008 at 5:03 PM, Jerry Cwiklik (JIRA)
<ui...@incubator.apache.org> wrote:
>     [ https://issues.apache.org/jira/browse/UIMA-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Jerry Cwiklik updated UIMA-1232:
> --------------------------------
>
>    Attachment: uimaj-as-core-UIMA-1232-patch.txt
>

Jerry,

Since you're a committer now, you can just commit your changes
directly to SVN. :)

  -Adam

[jira] Closed: (UIMA-1232) Fix Synchronization Problem in the UIMA AS code

Posted by "Jerry Cwiklik (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jerry Cwiklik closed UIMA-1232.
-------------------------------

    Resolution: Fixed

> Fix Synchronization Problem in the UIMA AS code
> -----------------------------------------------
>
>                 Key: UIMA-1232
>                 URL: https://issues.apache.org/jira/browse/UIMA-1232
>             Project: UIMA
>          Issue Type: Bug
>          Components: Async Scaleout
>            Reporter: Jerry Cwiklik
>         Attachments: uimaj-as-core-UIMA-1232-patch.txt
>
>
> UIMA AS Aggregate code synchronizes code that sends a reply (CAS) back to a client. Part of sending the CAS back to the remote client is serialization of the CAS. This takes time. While the CAS is being serialized, other threads are blocked causing a bottleneck. Move the code that sends a reply outside of the synchronized block.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (UIMA-1232) Fix Synchronization Problem in the UIMA AS code

Posted by "Jerry Cwiklik (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jerry Cwiklik updated UIMA-1232:
--------------------------------

    Attachment: uimaj-as-core-UIMA-1232-patch.txt

Modified aggregate to prevent it from synchronizing code that sends replies to a remote client. This synchronization creates a huge bottleneck as each CAS is being serialized and causes all threads in the finalStep() to pile up and wait until the CAS is sent via JMS.

Modified VMTransport to initialize ThreadPoolExecutor object with the max number of core threads. For some reason this constructor:
ThreadPoolExecutor(1, concurrentConsumerCount, Long.MAX_VALUE, ...)  creates only one thread and disregards second parameter ( concurrentConsumerCount) which is the max number of threads. When replace the above with: ThreadPoolExecutor(concurrentConsumerCount, concurrentConsumerCount, Long.MAX_VALUE, ...) the expected number of  threads are created and used for processing.

Removed synchronization in ProcessResponseHandler.java on:
handleProcessResponseFromRemoteDelegate() 
handleProcessResponseWithCASReference()

Modified BaseAnalysisEngineController.getAnalysisTime() method to synchronized access to the threadStateMap. Unsynchronized code causes ConcurrentModificationException



> Fix Synchronization Problem in the UIMA AS code
> -----------------------------------------------
>
>                 Key: UIMA-1232
>                 URL: https://issues.apache.org/jira/browse/UIMA-1232
>             Project: UIMA
>          Issue Type: Bug
>          Components: Async Scaleout
>            Reporter: Jerry Cwiklik
>         Attachments: uimaj-as-core-UIMA-1232-patch.txt
>
>
> UIMA AS Aggregate code synchronizes code that sends a reply (CAS) back to a client. Part of sending the CAS back to the remote client is serialization of the CAS. This takes time. While the CAS is being serialized, other threads are blocked causing a bottleneck. Move the code that sends a reply outside of the synchronized block.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (UIMA-1232) Fix Synchronization Problem in the UIMA AS code

Posted by "Jerry Cwiklik (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jerry Cwiklik updated UIMA-1232:
--------------------------------

    Fix Version/s: 2.3AS

> Fix Synchronization Problem in the UIMA AS code
> -----------------------------------------------
>
>                 Key: UIMA-1232
>                 URL: https://issues.apache.org/jira/browse/UIMA-1232
>             Project: UIMA
>          Issue Type: Bug
>          Components: Async Scaleout
>            Reporter: Jerry Cwiklik
>             Fix For: 2.3AS
>
>         Attachments: uimaj-as-core-UIMA-1232-patch.txt
>
>
> UIMA AS Aggregate code synchronizes code that sends a reply (CAS) back to a client. Part of sending the CAS back to the remote client is serialization of the CAS. This takes time. While the CAS is being serialized, other threads are blocked causing a bottleneck. Move the code that sends a reply outside of the synchronized block.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.