Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 51294 invoked from network); 5 Apr 2009 15:57:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Apr 2009 15:57:56 -0000 Received: (qmail 75177 invoked by uid 500); 5 Apr 2009 15:57:55 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 75055 invoked by uid 500); 5 Apr 2009 15:57:55 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 75047 invoked by uid 99); 5 Apr 2009 15:57:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Apr 2009 15:57:55 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of elecharny@gmail.com designates 209.85.219.180 as permitted sender) Received: from [209.85.219.180] (HELO mail-ew0-f180.google.com) (209.85.219.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Apr 2009 15:57:45 +0000 Received: by ewy28 with SMTP id 28so1657917ewy.25 for ; Sun, 05 Apr 2009 08:57:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=+TzEJsTpCUxnplloNiaduCyMVEsTuTqIXgmkLpc0Nug=; b=oawkLek7LuZd9TQwIVn157hJnqHF04f+vdHtVLRiG1Ai1zPzVBqjmv7MTgno2u4Gqe b8dg2Hr8nPDy7BV9aJBb1ea1D9J32lM/4JnGhwgyYCfbo05K71zTxEBJKZAMlvTFlBil MKV+iSkzw8ncBL6MoVSYK9FhOTgkk36SGvui0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=PWTK3jUGNqVvBxDaYOGJUcppnd8S7M1ap65dmDqODAzsJgNdna9UYgSYLhmpw2RoCO 0n8zWhMZKFA0xgoAuRwIXejew+UpHG57SriA1cCAVfDZraIAJhc+S0Xn4OKK0BSfdsrs TwyXHoA9jBdR1nDIwWZayMemIH4cl4FSnAjfg= Received: by 10.210.78.16 with SMTP id a16mr536376ebb.29.1238947045259; Sun, 05 Apr 2009 08:57:25 -0700 (PDT) Received: from ?192.168.0.2? (vol75-3-82-66-216-176.fbx.proxad.net [82.66.216.176]) by mx.google.com with ESMTPS id 28sm5556222eyg.45.2009.04.05.08.57.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 05 Apr 2009 08:57:24 -0700 (PDT) Sender: Emmanuel Lecharny Message-ID: <49D8D4E5.7050606@nextury.com> Date: Sun, 05 Apr 2009 17:57:25 +0200 From: Emmanuel Lecharny User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: ldap server buffers search results? References: <49D5EEFC.7030703@planetquake.com> <49D7E228.7070508@nextury.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Alex Karasulu wrote: > On Sat, Apr 4, 2009 at 6:41 PM, Emmanuel Lecharny wrote: > > >> Some follow-up : >> >> I have done many tests, and I successfully got a working server without >> having all the messages stored in memory, simply by changing the way the >> ExecutorFilter is instanciated. In LdapService, line 361, instead of : >> >> // Now inject an ExecutorFilter for the write operations >> // We use the same number of thread than the number of IoProcessor >> // (NOTE : this has to be double checked) >> ((DefaultIoFilterChainBuilder)chain).addLast( "executor", >> new ExecutorFilter( new OrderedThreadPoolExecutor( >> getTcpTransport().getNbThreads() ), >> IoEventType.WRITE ) ); >> >> use : >> >> // Now inject an ExecutorFilter for the write operations >> // We use the same number of thread than the number of IoProcessor >> // (NOTE : this has to be double checked) >> ((DefaultIoFilterChainBuilder)chain).addLast( "executor", >> new ExecutorFilter( new OrderedThreadPoolExecutor( >> getTcpTransport().getNbThreads() ) ) ); >> >> Now, the executor is used in both ways, and it seems to work much better. >> >> > > So the Executor is not being used for all event types: reads, and writes. > How is this effecting the dynamic. I think it's very important for us to > have a good written characterization of the problem before hand. Then we > can follow up with a summary of what each approach does. > There is a bit of an issue : you can just have one single executor in the chain. Right now, I'm analysing the MINA internals to see what are the reason why limitating the IoEvent to WRITE only leads to OOM, or at least, late sending of all the messages, when accepting all the events is just ok... > The reason why I'm being a bit anal about this is because I know the > dynamics of MINA are going to be dramatically impacted when ApacheDS is put > under heavy load. > I'm also really scared about what could happen in a real environment (ie thousands of clients, with some of them sending more than one request at the same time). This is painful ... -- -- cordialement, regards, Emmanuel L�charny www.iktek.com directory.apache.org