Return-Path: X-Original-To: apmail-uima-user-archive@www.apache.org Delivered-To: apmail-uima-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 215559539 for ; Wed, 1 Feb 2012 14:55:58 +0000 (UTC) Received: (qmail 42734 invoked by uid 500); 1 Feb 2012 14:55:57 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 42686 invoked by uid 500); 1 Feb 2012 14:55:57 -0000 Mailing-List: contact user-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@uima.apache.org Delivered-To: mailing list user@uima.apache.org Received: (qmail 42672 invoked by uid 99); 1 Feb 2012 14:55:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2012 14:55:56 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of uimaee@gmail.com designates 209.85.212.175 as permitted sender) Received: from [209.85.212.175] (HELO mail-wi0-f175.google.com) (209.85.212.175) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2012 14:55:49 +0000 Received: by wibhq7 with SMTP id hq7so1030875wib.6 for ; Wed, 01 Feb 2012 06:55:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=zjZJAFTrpK33n7Qi/UE2dIRZLFCeTWECfoUrkzEGMBk=; b=og4FFkcfNUUGUg3Vyxo7bqaufdowUg+mM63UiP0zp2MRycBf1m9nXFBF7hF3tnLGv+ H8OxC9OQV4+RX6MNuAPxLFJ1TXognIUHAeiQ3CsfRPdElZro4SgVnc6CCAMli0Gj5PMY JZwNghCdz008YRxIe8baSVc0T4Az3023vFSTw= MIME-Version: 1.0 Received: by 10.180.84.105 with SMTP id x9mr11413315wiy.19.1328108128799; Wed, 01 Feb 2012 06:55:28 -0800 (PST) Received: by 10.223.98.208 with HTTP; Wed, 1 Feb 2012 06:55:28 -0800 (PST) In-Reply-To: References: Date: Wed, 1 Feb 2012 09:55:28 -0500 Message-ID: Subject: Re: UimaAsynchronousEngine client poor performance when the pipeline is slow processing the CAS From: Jaroslaw Cwiklik To: user@uima.apache.org Content-Type: multipart/alternative; boundary=f46d044401b03d8d8e04b7e84520 X-Virus-Checked: Checked by ClamAV on apache.org --f46d044401b03d8d8e04b7e84520 Content-Type: text/plain; charset=ISO-8859-1 Sorry didnt finish my thought on question #1. If you see sendCAS() blocking, attach jConsole to the application (you may need to enable JMX), view the threads and check where your application thread is blocking. JC On Wed, Feb 1, 2012 at 9:52 AM, Jaroslaw Cwiklik wrote: > Florin from you description I cant figure out the cause of the slowness > that you see. Are you saying that your application thread is stuck in > sendCAS() method as if it was waiting for a reply? This is certainly not > intent behind this API. It is an asynchronous call and should not wait for > a reply when the request is dispatched. How are you getting CASes? Do you > have your own CAS pool or use the one the UimaAsynchronousEngine provides. > How big is the CAS pool? Are you getting any replies via a > entityProcessComplete() callback? Which version of uima-as are you using: > 2.3.1 or recent build from svn? > > To your questions: > > 1) What do you mean by "..disable the response feature"? The sendCAS() is > asynch method which should not block. If it is blocking, than this is a bug > in UIMA AS client. To debug this problem, you can > 2) The UimaAsynchronousEngine can be called from multiple threads and use > of ThreadPoolExecutor seems fine. > 3) Have you tried to scale the pipeline to allow multiple CASes to be > processed at the same time? . > > Jerry > > > On Wed, Feb 1, 2012 at 5:11 AM, Spico Florin wrote: > >> Hello! >> I have application client that is receiving messages from a Queue via JMS. >> The message is then packed in a JCas and sent to the UIMA AS pipeline via >> UimaAsynchronousEngine. >> If the UIMA AS pipeline processing is slow then it impacts the client in >> the way that the received messages from the >> Queue will not be sent as they arrived. I'm using sendCAS(CAS) method of >> UimaAsynchronousEngine, thus the call to pipeline should be asynchronous >> (as specfied in the spec). >> In my opinion the described behavior is not as expected (i.e. the client >> should not be affected by the UIMA pipeline performance and >> it should send the received messages for processing right away, without >> waiting some responses). >> My questions are: >> 1. I suspect, that my client is somehow waiting the response from the >> pipeline. Is there any way to disable the response feature? >> 2. I'm using a thread pool executor that is sending the messages to UIMA >> pipeline. Is this a good approach? >> 3. How to design my client in order to send the messages to the pipeline >> without concerning the pipeline performance? >> >> I look forward for your answers and advices. >> Thank you. >> Best regards, >> >> Florin >> > > --f46d044401b03d8d8e04b7e84520--