You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by xia yongmin <xy...@163.com> on 2014/09/23 09:16:15 UTC

sendCAS is slow

hi,

I am a new one in uima, and i meet a problem as follow:

Supposing I have a CollectionReader, an AE and a Cas Consumer,

it tooks 1ms for CollectionReader to initialize a cas, 5ms for AE to analyze, 
and 1ms for Cas Consumer to consume the cas.

it seems that I can deploy 5 instances of AE to get five times speed.

but when I deploy 3 instances of AE, it doesn't improve the speed.

And I found that it took a long time for the UIMA to send a cas from 
CollectionReader to AE using sendCAS(cas) method.

how can I solve this problem?

many thanks. 


Re: sendCAS is slow

Posted by Jaroslaw Cwiklik <ui...@gmail.com>.
When you initialize uima-as client, how big is the CasPool? The default is
1 which might explain what you are seeing.
Try increasing a CasPool on the client side to improve the throughput.

Map<String, Object> appCtx = new HashMap<String, Object>();
appCtx.put(UimaAsynchronousEngine.ServerUri, brokerURL);
appCtx.put(UimaAsynchronousEngine.ENDPOINT, endpoint);
appCtx.put(UimaAsynchronousEngine.CasPoolSize, scaleout);
 <------------------------------------
appCtx.put(UimaAsynchronousEngine.Timeout, 0);
appCtx.put(UimaAsynchronousEngine.GetMetaTimeout, 0);
uimaASClient.initialize(appCtx);

Jerry Cwiklik


On Tue, Sep 23, 2014 at 8:57 AM, Alexandre Patry <
alexandre.patry@keatext.com> wrote:

> Did you try to use binary serialisation instead of XML serialisation for
> the CAS?
>
> For more information on binary serialisation, you can search for the word
> "binary" in the UIMA-AS user guide (http://uima.apache.org/d/
> uima-as-2.6.0/uima_async_scaleout.html).
>
> Hope this help,
>
> Alexandre
>
>
> On 23/09/2014 03:16, xia yongmin wrote:
>
>> hi,
>>
>> I am a new one in uima, and i meet a problem as follow:
>>
>> Supposing I have a CollectionReader, an AE and a Cas Consumer,
>>
>> it tooks 1ms for CollectionReader to initialize a cas, 5ms for AE to
>> analyze,
>> and 1ms for Cas Consumer to consume the cas.
>>
>> it seems that I can deploy 5 instances of AE to get five times speed.
>>
>> but when I deploy 3 instances of AE, it doesn't improve the speed.
>>
>> And I found that it took a long time for the UIMA to send a cas from
>> CollectionReader to AE using sendCAS(cas) method.
>>
>> how can I solve this problem?
>>
>> many thanks.
>>
>>
>
> --
> Alexandre Patry, Ph.D
> Chercheur Principal / Principal Researcher
> http://KeaText.com
>
>

Re: sendCAS is slow

Posted by Alexandre Patry <al...@keatext.com>.
This is good news :)

Did you try to increase the number of CAS in the pool as Jerry suggested 
[1]?

You can reply to the list as well, there are a lot of people more 
knowledgeable than me that can help you there.

[1] 
http://uima.markmail.org/search/?q=#query:+page:1+mid:4aa3ifmzg5zvj4bm+state:results

On 24/09/2014 09:49, xym210 wrote:
> no, everything seems has worked right, when I deploy two collection 
> reader instances, the processing speed improved
>
>
> -- 
> 发自 Android 网易邮箱
>
>
> 在2014年09月24日 21:44, Alexandre Patry 
> <ma...@keatext.com>写 道:
>
> Did you get an error message or a stack trace?
>
> On 24/09/2014 09:38, xym210 wrote:
>> it doesn't work, when I deploy the collectionReader and the AE 
>> colocated, it doesn't work either, is there something i 
>> misunderstood, thanks.
>>
>> -- 
>> 发自 Android 网易邮箱
>>
>>
>> 在2014年09月23日 20:57, Alexandre Patry 
>> <ma...@keatext.com>写 道:
>>
>> Did you try to use binary serialisation instead of XML serialisation for
>> the CAS?
>>
>> For more information on binary serialisation, you can search for the
>> word "binary" in the UIMA-AS user guide
>> ( http://uima.apache.org/d/uima-as-2.6.0/uima_async_scaleout.html).
>>
>> Hope this help,
>>
>> Alexandre
>>
>> On 23/09/2014 03:16, xia yongmin wrote:
>> > hi,
>> >
>> > I am a new one in uima, and i meet a problem as follow:
>> >
>> > Supposing I have a CollectionReader, an AE and a Cas Consumer,
>> >
>> > it tooks 1ms for CollectionReader to initialize a cas, 5ms for AE 
>> to analyze,
>> > and 1ms for Cas Consumer to consume the cas.
>> >
>> > it seems that I can deploy 5 instances of AE to get five times speed.
>> >
>> > but when I deploy 3 instances of AE, it doesn't improve the speed.
>> >
>> > And I found that it took a long time for the UIMA to send a cas from
>> > CollectionReader to AE using sendCAS(cas) method.
>> >
>> > how can I solve this problem?
>> >
>> > many thanks.
>> >
>>
>>
>> -- 
>> Alexandre Patry, Ph.D
>> Chercheur Principal / Principal Researcher
>> http://KeaText.com
>>
>
>
> -- 
> Alexandre Patry, Ph.D
> Chercheur Principal / Principal Researcher
> http://KeaText.com


-- 
Alexandre Patry, Ph.D
Chercheur Principal / Principal Researcher
http://KeaText.com


Re: sendCAS is slow

Posted by Alexandre Patry <al...@keatext.com>.
Did you get an error message or a stack trace?

On 24/09/2014 09:38, xym210 wrote:
> it doesn't work, when I deploy the collectionReader and the AE 
> colocated, it doesn't work either, is there something i misunderstood, 
> thanks.
>
> -- 
> 发自 Android 网易邮箱
>
>
> 在2014年09月23日 20:57, Alexandre Patry 
> <ma...@keatext.com>写 道:
>
> Did you try to use binary serialisation instead of XML serialisation for
> the CAS?
>
> For more information on binary serialisation, you can search for the
> word "binary" in the UIMA-AS user guide
> ( http://uima.apache.org/d/uima-as-2.6.0/uima_async_scaleout.html).
>
> Hope this help,
>
> Alexandre
>
> On 23/09/2014 03:16, xia yongmin wrote:
> > hi,
> >
> > I am a new one in uima, and i meet a problem as follow:
> >
> > Supposing I have a CollectionReader, an AE and a Cas Consumer,
> >
> > it tooks 1ms for CollectionReader to initialize a cas, 5ms for AE to 
> analyze,
> > and 1ms for Cas Consumer to consume the cas.
> >
> > it seems that I can deploy 5 instances of AE to get five times speed.
> >
> > but when I deploy 3 instances of AE, it doesn't improve the speed.
> >
> > And I found that it took a long time for the UIMA to send a cas from
> > CollectionReader to AE using sendCAS(cas) method.
> >
> > how can I solve this problem?
> >
> > many thanks.
> >
>
>
> -- 
> Alexandre Patry, Ph.D
> Chercheur Principal / Principal Researcher
> http://KeaText.com
>


-- 
Alexandre Patry, Ph.D
Chercheur Principal / Principal Researcher
http://KeaText.com


Re: sendCAS is slow

Posted by Alexandre Patry <al...@keatext.com>.
Did you try to use binary serialisation instead of XML serialisation for 
the CAS?

For more information on binary serialisation, you can search for the 
word "binary" in the UIMA-AS user guide 
(http://uima.apache.org/d/uima-as-2.6.0/uima_async_scaleout.html).

Hope this help,

Alexandre

On 23/09/2014 03:16, xia yongmin wrote:
> hi,
>
> I am a new one in uima, and i meet a problem as follow:
>
> Supposing I have a CollectionReader, an AE and a Cas Consumer,
>
> it tooks 1ms for CollectionReader to initialize a cas, 5ms for AE to analyze,
> and 1ms for Cas Consumer to consume the cas.
>
> it seems that I can deploy 5 instances of AE to get five times speed.
>
> but when I deploy 3 instances of AE, it doesn't improve the speed.
>
> And I found that it took a long time for the UIMA to send a cas from
> CollectionReader to AE using sendCAS(cas) method.
>
> how can I solve this problem?
>
> many thanks.
>


-- 
Alexandre Patry, Ph.D
Chercheur Principal / Principal Researcher
http://KeaText.com