Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 81A3C100D7 for ; Tue, 5 Nov 2013 06:41:06 +0000 (UTC) Received: (qmail 78248 invoked by uid 500); 5 Nov 2013 06:41:04 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 78079 invoked by uid 500); 5 Nov 2013 06:40:58 -0000 Mailing-List: contact oak-dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-dev@jackrabbit.apache.org Received: (qmail 78056 invoked by uid 99); 5 Nov 2013 06:40:56 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Nov 2013 06:40:56 +0000 Received: from localhost (HELO mail-ie0-f169.google.com) (127.0.0.1) (smtp-auth username tripod, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Nov 2013 06:40:52 +0000 Received: by mail-ie0-f169.google.com with SMTP id ar20so14323030iec.14 for ; Mon, 04 Nov 2013 22:40:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=JzoHIxOLpgXWuDWrf8ZEXpb+a4k2+KXi/TsmbfwAJ7I=; b=VRtgowmuUPv022uoNdqc1D4gOI2kutw1hKTyhdUSRWSp3JK2LsOfQLg64MhLscsHK/ FfBzXieHJWbJMlLr/L+JXVuo+klmVT51qTUC781i9f4Xq/y7Kqu2InUtjVkQPKFH/N2U TSu3KT79qJYjwIjnhDUCqK0+UyL+E2MEIA5dRwE1NDIkpbDafkoVFeLff8fFZiWabvEK lYp9f6G/j067jnHi8HsuOLU693J3s6bu8wv/22mX9GANMW5aPhYezbCRBiZHNN22DPm2 +AxspaL0LrkSA6+rK7IiyRk7N6lYwx/uFV460t6YBKDsRwv7tyVnKTbIGJ3Yd/aQY/BG /TXw== X-Gm-Message-State: ALoCoQkZ39F+nQyNVymiP5VJ1yXIrll/Dzg3eM3VeT8Bx4USwt60lgA3hned/oz/9GeHbihFP919 MIME-Version: 1.0 X-Received: by 10.50.111.16 with SMTP id ie16mr14441118igb.52.1383633651881; Mon, 04 Nov 2013 22:40:51 -0800 (PST) Received: by 10.64.239.208 with HTTP; Mon, 4 Nov 2013 22:40:51 -0800 (PST) In-Reply-To: References: Date: Mon, 4 Nov 2013 22:40:51 -0800 Message-ID: Subject: Re: [oak] ACL cache performance From: Tobias Bocanegra To: "oak-dev@jackrabbit.apache.org" Content-Type: multipart/alternative; boundary=089e01536bde51f71204ea6850fb --089e01536bde51f71204ea6850fb Content-Type: text/plain; charset=UTF-8 Hi, I made some minor changes to cache handling, so that it only caches the everyone's entries. I also optimized the entry iterator slightly, so that it's even more lazy. together with the improvements of jukka the micro benchmarks look really good, at least for the ManyUserReadTest. If we also get rid of the SecurityContext, I expect even further improvements. Regards, Toby Benchmarks: ManyUserReadTest Fixtures: Oak-Tar Jackrabbit Runtime: 10 Num Items: 10000 Concurrency: 1,2,4,8,10,15,20,50 Random User: true Profiling: false -------------------------------------- Executing benchmarks as admin: false on Oak-Tar ----------------------------------------------------------- # ManyUserReadTest , C, min, 10%, 50%, 90%, max, N Oak-Tar , 1, 292, 302, 308, 316, 326, 33 Oak-Tar , 2, 322, 335, 343, 357, 365, 60 Oak-Tar , 4, 416, 453, 474, 501, 515, 87 Oak-Tar , 8, 699, 717, 746, 770, 800, 112 Oak-Tar , 10, 790, 889, 940, 991, 1027, 110 Oak-Tar , 15, 711, 1315, 1428, 1518, 1590, 111 Oak-Tar , 20, 1430, 1603, 1919, 2090, 2240, 117 Oak-Tar , 50, 2519, 2997, 4640, 5632, 6626, 127 Executing benchmarks as admin: false on Jackrabbit ----------------------------------------------------------- # ManyUserReadTest , C, min, 10%, 50%, 90%, max, N Jackrabbit , 1, 328, 338, 347, 383, 705, 28 Jackrabbit , 2, 399, 404, 432, 647, 856, 44 Jackrabbit , 4, 528, 539, 565, 959, 979, 64 Jackrabbit , 8, 1106, 1130, 1166, 1514, 1554, 72 Jackrabbit , 10, 1368, 1399, 1467, 1833, 1886, 70 Jackrabbit , 15, 2016, 2137, 2259, 2617, 2710, 75 Jackrabbit , 20, 1496, 1562, 3357, 3595, 3729, 70 Jackrabbit , 50, 8222, 8563, 8814, 9022, 9416, 100 Executing benchmarks as admin: true on Oak-Tar ----------------------------------------------------------- # ManyUserReadTest , C, min, 10%, 50%, 90%, max, N Oak-Tar , 1, 127, 128, 132, 136, 140, 76 Oak-Tar , 2, 144, 148, 155, 160, 165, 130 Oak-Tar , 4, 188, 206, 217, 227, 243, 186 Oak-Tar , 8, 314, 343, 355, 367, 395, 231 Oak-Tar , 10, 289, 432, 462, 498, 534, 220 Oak-Tar , 15, 386, 624, 703, 785, 868, 219 Oak-Tar , 20, 535, 832, 948, 1125, 1357, 215 Oak-Tar , 50, 1372, 1810, 2415, 3013, 3692, 223 Executing benchmarks as admin: true on Jackrabbit ----------------------------------------------------------- # ManyUserReadTest , C, min, 10%, 50%, 90%, max, N Jackrabbit , 1, 245, 247, 259, 300, 630, 37 Jackrabbit , 2, 296, 301, 310, 360, 631, 60 Jackrabbit , 4, 413, 428, 474, 711, 762, 80 Jackrabbit , 8, 465, 783, 872, 1137, 1200, 89 Jackrabbit , 10, 927, 981, 1114, 1494, 1599, 92 Jackrabbit , 15, 1328, 1446, 1710, 2210, 2681, 90 Jackrabbit , 20, 914, 1787, 2327, 3238, 3425, 88 Jackrabbit , 50, 1305, 1691, 10351, 10852, 11269, 61 On Mon, Nov 4, 2013 at 2:01 AM, Tobias Bocanegra wrote: > > > On Monday, November 4, 2013, Angela Schreiber wrote: > >> hi >> >> thanks for the figures and the effort. btw... this discussion >> belong oak dev list and not to the adobe internal list -> moving. >> >> if the global cache doesn't add to much to the performance gain >> then i would suggest that we drop it immediately... > > > sure, I'll look at it again. > > >> in jackrabbit the >> caching on a global level was the most troublesome part of the >> whole permission evaluation and i would definitely want to >> avoid running into the same issues again. >> >> i would suggest to change this to an 'everyone' only cache as i >> proposed it earlier to you in a private discussion which also >> included a first draft of such an everyone-cache. > > > yes. although it should be a general cache that looks at the principals > that have a lot permission entries. this might be the everyone, but can > also be other ones. > > regards Toby > >> >> regards >> angela >> >> On 11/1/13 8:43 AM, "Tobias Bocanegra" wrote: >> >> >Hi, >> > >> >I quickly tested the ACL performance again using the ManyUserReadTest. >> >The tests consists of reading 10k items from a 120k item repository >> >which has an ACL set on every 10th node. Each tests uses a different >> >user (1 of 1000) which each is member of 10 groups. >> > >> >if my tests are accurate, oak shows now the same performance as >> >jackrabbit. for admin sessions, it's even faster than jackrabbit. I >> >find it still not acceptable, that the non-admin case is 3 times >> >slower than the admin case. >> > >> >it's also of significance, that the global cache does not really gain >> >much performance for this test. see the last section of numbers. I >> >think that the global ACL cache is only beneficial for some >> >principals, like "everyone" that are used for every request. and/or >> >only really makes a difference, if the overall ACL evaluation overhead >> >is reduced. >> > >> >Regards, Toby >> > >> >Executing benchmarks as admin: false on Oak-Tar >> >----------------------------------------------------------- >> ># ManyUserReadTest , C, min, 10%, 50%, 90%, >> > max, N >> >Oak-Tar , 1, 565, 578, 600, 615, >> > 627, 34 >> >Oak-Tar , 2, 653, 681, 715, 761, >> > 798, 56 >> >Oak-Tar , 4, 822, 989, 1053, 1101, >> > 1126, 78 >> >Oak-Tar , 8, 1509, 1626, 1722, 1798, >> > 1893, 96 >> >Oak-Tar , 10, 1905, 2041, 2175, 2298, >> > 2375, 100 >> >Oak-Tar , 15, 2545, 2850, 3201, 3484, >> > 3663, 103 >> >Oak-Tar , 20, 3519, 3852, 4254, 4737, >> > 5251, 100 >> >Oak-Tar , 50, 2666, 9504, 10450, 11440, >> >13050, 104 >> >Executing benchmarks as admin: false on Jackrabbit >> >----------------------------------------------------------- >> ># ManyUserReadTest , C, min, 10%, 50%, 90%, >> > max, N >> >Jackrabbit , 1, 455, 495, 539, 625, >> > 1148, 36 >> >Jackrabbit , 2, 507, 512, 575, 841, >> > 1264, 62 >> >Jackrabbit , 4, 768, 789, 861, 1220, >> > 1266, 88 >> >Jackrabbit , 8, 1416, 1516, 1624, 1999, >> > 2038, 96 >> >Jackrabbit , 10, 1764, 1812, 2074, 2796, >> > 2859, 90 >> >Jackrabbit , 15, 3030, 3077, 3611, 3841, >> > 3950, 90 >> >Jackrabbit , 20, 4495, 4683, 4874, 5031, >> > 5121, 100 >> >Jackrabbit , 50, 12219, 12546, 12827, 13232, >> > --089e01536bde51f71204ea6850fb--