Return-Path: X-Original-To: apmail-directory-users-archive@www.apache.org Delivered-To: apmail-directory-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 98D8817BD5 for ; Thu, 5 Feb 2015 19:05:02 +0000 (UTC) Received: (qmail 46761 invoked by uid 500); 5 Feb 2015 19:05:02 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 46718 invoked by uid 500); 5 Feb 2015 19:05:02 -0000 Mailing-List: contact users-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@directory.apache.org Delivered-To: mailing list users@directory.apache.org Received: (qmail 46706 invoked by uid 99); 5 Feb 2015 19:05:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Feb 2015 19:05:01 +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 elecharny@gmail.com designates 209.85.212.178 as permitted sender) Received: from [209.85.212.178] (HELO mail-wi0-f178.google.com) (209.85.212.178) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Feb 2015 19:04:35 +0000 Received: by mail-wi0-f178.google.com with SMTP id bs8so12644754wib.5 for ; Thu, 05 Feb 2015 11:03:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=rFHhoRhwY+dqWZbz1ZCBUaMSc0x2M+TMA86kYjtUJYA=; b=cuAsRe3udFLaf/JRBcMFNHx24sowoj7BR1tvnaahjGRikRDYHyzVadOU1XrRV14S45 +cFkQQo2inrsMHf9nRJMohM5wdaYuFx8YSRLcodDAm/2tJgc6em02Re1I6R57XCS155j PlZElcL5DUCZ2eKmsR0A4x0Jy0g5OICJJuUsf1lmrV+My1US9kJqv40lb1zOrzFgrndV A59olcVEwmttWm7HgBtIPOUcxLrCMbQiKVjsLBTBMzwSbQ3CYex0HVXViR0iW4gTaQ+5 599lIHGLwryLZ3uRkfbnbZgryObRP2ulCl+7mh6yb/nyC71svlv6Zt8y8hfJTbxZmQYn vjTA== X-Received: by 10.180.12.227 with SMTP id b3mr58509221wic.11.1423162983635; Thu, 05 Feb 2015 11:03:03 -0800 (PST) Received: from [192.168.1.3] (47.220.137.78.rev.vodafone.pt. [78.137.220.47]) by mx.google.com with ESMTPSA id q4sm9092929wiz.4.2015.02.05.11.03.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Feb 2015 11:03:02 -0800 (PST) Message-ID: <54D3BE64.1000708@gmail.com> Date: Thu, 05 Feb 2015 20:03:00 +0100 From: =?UTF-8?B?RW1tYW51ZWwgTMOpY2hhcm55?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: users@directory.apache.org Subject: Re: [ApacheDS] groupofnames search is slow References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Le 04/02/15 12:53, John Peter a écrit : > Hi, > > I'm using apacheds 2.0.0 M_19 > > ApacheDS has 11 group entries and some of them have 26 000 member > attributes. > > I'm using a qucik search via apache directory studio: > (&(member=uid=john,uid=1.2.246.1.1.1111.10.0,ou=users,dc=test,dc=fi)(objectClass=groupOfNames)) > Using a stopwatch I can see a 5 second delay before the result is visible. > > Some other queries perform instantaneously. > Below is a snipet from the apacheDS log. It shows the search operation took > only 7070312ns or 7ms. After that apacheDS does something and the next log > entry is 5 seconds later. > > Any idea's what is happening? Ok, I can reproduce the pb. If I do a search with (member=uid=john,uid=1.2.246.1.1.1111.10.0,ou=users,dc=test,dc=fi) as a filter, it takes only 400ms, and I tested it with 32 000 members in the entry. If I add (objectClass=groupOfNames) it takes 14 seconds. Two things here : - first, you can do the search omitting the (objectClass=groupOfNames), because the 'member' attribute is only used by this class, unless you have created an ObjectClass that uses the 'member' attribute - second, we should be able to speed up the search when the objectClass is used in the filter. It seems that we don't evaluate properly the number of candidates the (member=XXX) part is returning. This is clearly a bug and need to be fixed.