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 9472310098 for ; Mon, 2 Dec 2013 12:59:38 +0000 (UTC) Received: (qmail 3166 invoked by uid 500); 2 Dec 2013 12:59:31 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 2956 invoked by uid 500); 2 Dec 2013 12:59:16 -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 2922 invoked by uid 99); 2 Dec 2013 12:59:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Dec 2013 12:59: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 elecharny@gmail.com designates 74.125.82.50 as permitted sender) Received: from [74.125.82.50] (HELO mail-wg0-f50.google.com) (74.125.82.50) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Dec 2013 12:59:06 +0000 Received: by mail-wg0-f50.google.com with SMTP id a1so10098916wgh.5 for ; Mon, 02 Dec 2013 04:58:46 -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 :content-type:content-transfer-encoding; bh=kX+20rsS35ViXzIUmoDuCGMB91Nz6eZ1544fYyp6fo0=; b=lp7TvnwZmBQkrZKyc+LGc0pT6RBmZLE6wQtW8RN9822ntFP8szUwldmHS+DZtcKe5z SstFx9WJTClip09vALZHZ/gIt7VDaohB8xyZbs9XzEB1DYku6WYf8vziqirrm+D4y8Tl IrTsEBXKXXS8yNw1A8XMWYdQZM8EqeFebcMvdsQQMRhx8ZlpbtI/nKR9bzV1IZQIKpd1 SFj6UAoO8rX+aV/xXWWKXZ2ZEUxwOuU0kCW1ItB9fMGJu94qYpuozT284SAdjulh3uka 2NgFDNGuAyY4sA6UgncTc3Vav2KxGmfi9Ty/UEs0sr6Siq8AydOnyBdXBg8ivW2KysdG ow7w== X-Received: by 10.180.39.177 with SMTP id q17mr18103399wik.16.1385989125928; Mon, 02 Dec 2013 04:58:45 -0800 (PST) Received: from new-host-3.home (AMontsouris-651-1-223-20.w92-140.abo.wanadoo.fr. [92.140.70.20]) by mx.google.com with ESMTPSA id n6sm102333740wix.3.2013.12.02.04.58.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Dec 2013 04:58:44 -0800 (PST) Message-ID: <529C8403.7060107@gmail.com> Date: Mon, 02 Dec 2013 13:58:43 +0100 From: =?UTF-8?B?RW1tYW51ZWwgTMOpY2hhcm55?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Apache Directory Developers List Subject: [Mavibot Partition] Cache experiments X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, now that the Mavibt partition is working, I was able to profile the server on a search operation. I do a test where I inject 10 000 entries, and do 400 000 random searches accross those 10 000 entries. At first, I realized that the EntryCache was initialized to accept only 1 - yes, *one* - entry. You bet that we get a lot of cache misses ! Fixing that lead to a 10% spedup improvement. The time we spare is the cost of finding an entry browsing a BTree, even if all the BTree pages are cached (whch s not likely to be a good idea : better favor a huge entry cache than a huge page cache, the benefit is immediate for a lower memory cost...) Second run : the alias cache was added, and this time, I got some improvement (the last time I added the alias cache was due to fail, because, again, the number aliases stored in this cache was configured to ... 1 !). Another 10% win. Third run : now, I'm caching the ParentIdAndRdn elements, as we need to access them to reconstruct the DN for each entry. Obviously, the parent RDN will always be the same... Gain : another 10%. I'm now able to do around 15 000 searches per second on my laptop, against around 11 000 before (note : this is a test done with no network involved). Not bad... Althouh the cache configuation now requires a lot of love in order to be used for real, but this is not something big to do... More to come after the next profiling session ! -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com