Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ECD689C95 for ; Wed, 2 May 2012 10:56:13 +0000 (UTC) Received: (qmail 24246 invoked by uid 500); 2 May 2012 10:56:13 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 24092 invoked by uid 500); 2 May 2012 10:56:13 -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 24085 invoked by uid 99); 2 May 2012 10:56:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 May 2012 10:56:13 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ayyagarikiran@gmail.com designates 209.85.160.178 as permitted sender) Received: from [209.85.160.178] (HELO mail-gy0-f178.google.com) (209.85.160.178) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 May 2012 10:56:07 +0000 Received: by ghbf1 with SMTP id f1so690640ghb.37 for ; Wed, 02 May 2012 03:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=tiCy4zLLzBTQCkoFzYjgjCVrZkVmB8W5WzzUaIWqypI=; b=UHQTFKne9fiUDVAPiQ7QKIKxL3Ovc0dHniMnXQy6n2rHzKFxDB5Ej+bPGicKjcZZc7 RH44MivAaJcMxkN+0UJCOEtqW8E8K/wSdpsKSdehNNuQctVxxQ1rpgSuU+GEL2DArspq Kri8wJHHkP96fk7ZfM6PxP1HCst7VIeny6rpkMCNlrDkLC+0OIvSMKEr1uElcUX1BgRy G6hWmowZWavomlrI/KyJ+8og2A509eFcyRzsjVKxjKOYO45XGLz1IpTkdg5nk7vB+rud Co65ttValgIoEdxVy5ucY3cmSoRzbeBnpKqR04xIh/fHvnKvNqQGqigdT1m31HNQak9B mgrA== MIME-Version: 1.0 Received: by 10.50.194.232 with SMTP id hz8mr4362100igc.38.1335956146165; Wed, 02 May 2012 03:55:46 -0700 (PDT) Sender: ayyagarikiran@gmail.com Received: by 10.42.163.2 with HTTP; Wed, 2 May 2012 03:55:46 -0700 (PDT) In-Reply-To: <22530788-5894-4C20-B67E-B9DFAB633E64@marcelot.net> References: <4F9F3795.2040907@gmail.com> <4FA07525.1050506@gmail.com> <4FA10347.1090107@gmail.com> <22530788-5894-4C20-B67E-B9DFAB633E64@marcelot.net> Date: Wed, 2 May 2012 16:25:46 +0530 X-Google-Sender-Auth: tewdHzocJOhErurXvCGdfuRRWjM Message-ID: Subject: Re: Inex branch merged into trunk... From: Kiran Ayyagari To: Apache Directory Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Wed, May 2, 2012 at 4:20 PM, Pierre-Arnaud Marcelot wr= ote: > On 2 mai 2012, at 12:24, Kiran Ayyagari wrote: >> this method has two extreme cases, >> 1. best performance when no attributes are requested >> 2. same overhead as cloning when all attributes are requested >> >> cause in real world scenario 1 will never be used, > > Actually in Studio, scenario 1 is used a lot. > That's exactly what happens do when opening a node and browsing the DIT i= n the UI (almost, because we do ask for the objectClass attribute). > yeap, I know, but this is a very limited usage, or shall I say just for tooling (essentially helpful for paging etc, else dOOM is certain the moment I expand a 100k node tree (provided my limit is set to > 100k ;)) > Regards, > Pierre-Arnaud > >> we might end up >> copying some attributes anyway >> but still better than cloning all >> On Wed, May 2, 2012 at 3:19 PM, Emmanuel L=E9charny wrote: >>> Le 5/2/12 9:53 AM, Alex Karasulu a =E9crit : >>>> >>>> On Wed, May 2, 2012 at 2:43 AM, Emmanuel >>>> L=E9charnywrote: >>>> >>>>> Le 5/1/12 3:05 PM, Alex Karasulu a =E9crit : >>>>> >>>>>> On Tue, May 1, 2012 at 4:08 AM, Emmanuel L=E9charny** >>>>>> >>>>>> wrote: >>>>>> >>>>>> o Object scope search (lookup) : 49 880 req/s compared to 23 081 on = the >>>>>> previous trunk >>>>>> o One Level scope search (5 entries returned) : 68 715 entries retur= ned >>>>>> per second, compared to 33 120/s >>>>>> o Sub Level scope search (10 entries returned ) : 70 830 entries >>>>>> returned >>>>>> per second, compared to 18 910/s >>>>>> >>>>>> >>>>>> This is great work Emmanuel. Nicely done! >>>>>> >>>>> I have some even better results, as of today : >>>>> >>>>> o Object scope search (lookup) : 52 712 req/s compared to 23 081 on t= he >>>>> previous trunk >>>>> o One Level scope search (5 entries returned) : 72 635 entries return= ed >>>>> per second, compared to 33 120/s >>>>> o Sub Level scope search (10 entries returned ) : 75 100 entries retu= rned >>>>> per second, compared to 18 910/s >>>>> >>>>> >>>> This is just sick man! You've more than doubled the performance. >>> >>> >>> Some new idea this morning : >>> >>> atm, we do clone the entries we fetch from the server, then we filter t= he >>> Attributes and the values, modifying the cloned entries. This leads to >>> useless create of the removed Attributes and Values. We suggested to >>> accumulate the modifications and to apply them at the end, avoiding the >>> cloning of AT which will not be returned. >>> >>> First of all, we can avoid cloning the Values. The Value implementation= are >>> immutable classes. This save around 7% of the time. >>> >>> But this is not all we can do : we can simply avoid the accumulation of >>> modifications *and* avoid cloning the entry ! >>> >>> The idea is simple : when we get an entry in the cursor we have got bac= k, we >>> create a new empty entry, then we iterate over all the original entry's >>> attributes and values, and for each one of those attributes and values,= we >>> check the filters, which will just tell if the Attribute/Value must be >>> ditched or kept. This way, we don't do anything useless, like storing t= he >>> modification or creating useless Attributes. >>> >>> It will work to the extent we deal with the CollectiveAttributes which = must >>> be injected somewhere, before we enter the loop (a connectiveAttribute = might >>> perfectly be removed by the ACI filter...). But we can also inject thos= e >>> added collective attributes into the loop of filters. >>> >>> I may miss something, but I do think that this solution is a clear winn= er, >>> even in term of implementation... >>> >>> thoughts ? >>> >>>> >>> >>> >>> -- >>> Regards, >>> Cordialement, >>> Emmanuel L=E9charny >>> www.iktek.com >>> >> >> >> >> -- >> Kiran Ayyagari > --=20 Kiran Ayyagari