You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Matthias Koch <ma...@averbis.com> on 2017/12/22 13:23:46 UTC

UIMA AS threading question

Hi

We noticed that UIMA AS does not scale with multiple threads as expected.

Digging further into the problem we noticed two places which are 
executed by at most one thread at a time:
- BaseUIMAAsynchronousEngineCommon_impl.sendCAS()
- BaseMessageSender.run()
We are using one UimaAsynchronousEngine per endpointName, thus 
serializing and sending a message will only be done one at a time,
no matter how many instances of this analysisEngines we have running 
under this endpointName.

How can we improve on this?
Can we just pool the UimaAsynchronousEngines?
Can we do better than just calling 
UimaAsynchronousEngine.sendAndReceiveCAS()?

Sincerely,
Matthias

-- 
Matthias Koch

Averbis GmbH
Tennenbacher Str. 11
79106 Freiburg
Germany

Fon: +49 761 708 394 0
Fax: +49 761 708 394 10
Email: matthias.koch@averbis.com
Web: https://averbis.com

Headquarters: Freiburg im Breisgau
Register Court: Amtsgericht Freiburg im Breisgau, HRB 701080
Managing Directors: Dr. med. Philipp Daumke, Dr. Kornél Markó


Re: UIMA AS threading question

Posted by Burn Lewis <bu...@gmail.com>.
Even if each sendCAS call is made from the same thread you can use a CAS
pool so that multiple CASes are in process at the same time.  You should
make the size of the pool at least as large as the number of analysis
engine threads deployed.  If it is larger then CASes will be queued on the
endpoint until the next analysis engine is ready for work.

Burn

On Fri, Dec 22, 2017 at 10:43 AM, Benedict Holland <
benedict.m.holland@gmail.com> wrote:

> I am very interested in this as well.
>
> Do you happen to have N threads running in a pool and N CAS instantiated
> objects? I admit though, I have very little experience with the Async
> engine.
>
> Thanks,
> ~Ben
>
> On Fri, Dec 22, 2017 at 8:23 AM, Matthias Koch <ma...@averbis.com>
> wrote:
>
> > Hi
> >
> > We noticed that UIMA AS does not scale with multiple threads as expected.
> >
> > Digging further into the problem we noticed two places which are executed
> > by at most one thread at a time:
> > - BaseUIMAAsynchronousEngineCommon_impl.sendCAS()
> > - BaseMessageSender.run()
> > We are using one UimaAsynchronousEngine per endpointName, thus
> serializing
> > and sending a message will only be done one at a time,
> > no matter how many instances of this analysisEngines we have running
> under
> > this endpointName.
> >
> > How can we improve on this?
> > Can we just pool the UimaAsynchronousEngines?
> > Can we do better than just calling UimaAsynchronousEngine.sendAnd
> > ReceiveCAS()?
> >
> > Sincerely,
> > Matthias
> >
> > --
> > Matthias Koch
> >
> > Averbis GmbH
> > Tennenbacher Str. 11
> > 79106 Freiburg
> > Germany
> >
> > Fon: +49 761 708 394 0
> > Fax: +49 761 708 394 10
> > Email: matthias.koch@averbis.com
> > Web: https://averbis.com
> >
> > Headquarters: Freiburg im Breisgau
> > Register Court: Amtsgericht Freiburg im Breisgau, HRB 701080
> > Managing Directors: Dr. med. Philipp Daumke, Dr. Kornél Markó
> >
> >
>

Re: UIMA AS threading question

Posted by Benedict Holland <be...@gmail.com>.
I am very interested in this as well.

Do you happen to have N threads running in a pool and N CAS instantiated
objects? I admit though, I have very little experience with the Async
engine.

Thanks,
~Ben

On Fri, Dec 22, 2017 at 8:23 AM, Matthias Koch <ma...@averbis.com>
wrote:

> Hi
>
> We noticed that UIMA AS does not scale with multiple threads as expected.
>
> Digging further into the problem we noticed two places which are executed
> by at most one thread at a time:
> - BaseUIMAAsynchronousEngineCommon_impl.sendCAS()
> - BaseMessageSender.run()
> We are using one UimaAsynchronousEngine per endpointName, thus serializing
> and sending a message will only be done one at a time,
> no matter how many instances of this analysisEngines we have running under
> this endpointName.
>
> How can we improve on this?
> Can we just pool the UimaAsynchronousEngines?
> Can we do better than just calling UimaAsynchronousEngine.sendAnd
> ReceiveCAS()?
>
> Sincerely,
> Matthias
>
> --
> Matthias Koch
>
> Averbis GmbH
> Tennenbacher Str. 11
> 79106 Freiburg
> Germany
>
> Fon: +49 761 708 394 0
> Fax: +49 761 708 394 10
> Email: matthias.koch@averbis.com
> Web: https://averbis.com
>
> Headquarters: Freiburg im Breisgau
> Register Court: Amtsgericht Freiburg im Breisgau, HRB 701080
> Managing Directors: Dr. med. Philipp Daumke, Dr. Kornél Markó
>
>