On Sat, Jun 11, 2011 at 8:03 PM, Afkham Azeez <[email protected]> wrote:
> Seems like we need caching for UM as well to be effective. Please implement > this for Stratos, Carbon 3.2.1. +1. AFAIU, permissions-for-role is cached, but role-of-user is not. Thanks, Senaka. > > On Sat, Jun 11, 2011 at 7:46 PM, Senaka Fernando <[email protected]> wrote: > >> >> >> On Sat, Jun 11, 2011 at 7:39 PM, Senaka Fernando <[email protected]> wrote: >> >>> >>> >>> On Sat, Jun 11, 2011 at 6:17 PM, Afkham Azeez <[email protected]> wrote: >>> >>>> So caching gives a significant performance improvement. Anyway, the only >>>> difference between RC9 & RC10 is the following code segment; >>>> >>>> if (!AuthorizationUtils.authorize(path, ActionConstants.GET)) { >>>> + String msg = "User " + CurrentSession.getUser() + " is >>>> not authorized to " + >>>> + "read the resource " + path + "."; >>>> + log.warn(msg); >>>> + throw new AuthorizationFailedException(msg); >>>> + } >>>> >>>> Senaka, can you profile and see what is the overhead introduced by the >>>> AuthorizationUtils.authorize method (that method should have been named >>>> isAuthorized!) >>>> >>> >>> +1, we need to go through these method names sometime later, when we are >>> doing a major carbon release. Attached to this reply is a call-trace. The UM >>> code, seems to be making a DB-call, and two JNDI calls to ApacheDS, all of >>> which are reasonably expensive. >>> >> >> Please disregard the overhead for logging the WARN message (in my previous >> attachment), since I actually tried a scenario that failed to authorize, and >> not one that passes as seen in Charitha's test. Attached herewith is the >> output for a scenario that actually passes authorization. >> >> Thanks, >> Senaka. >> >> >>> Thanks, >>> Senaka. >>> >>>> >>>> >>>> On Sat, Jun 11, 2011 at 2:52 PM, Charitha Kankanamge <[email protected] >>>> > wrote: >>>> >>>>> Figures with caching disabled. >>>>> >>>>> Requests per second: 1,661.51 [#/sec] (mean) >>>>> Requests per second: 1,699.38 [#/sec] (mean) >>>>> Requests per second: 1,664.97 [#/sec] (mean) >>>>> Requests per second: 1,664.65 [#/sec] (mean) >>>>> Requests per second: 1,662.48 [#/sec] (mean) >>>>> >>>>> /Charitha >>>>> >>>>> >>>>> >>>>> On Sat, Jun 11, 2011 at 2:32 PM, Afkham Azeez <[email protected]> wrote: >>>>> >>>>>> pls compare this with no-caching >>>>>> >>>>>> On Sat, Jun 11, 2011 at 2:06 PM, Charitha Kankanamge < >>>>>> [email protected]> wrote: >>>>>> >>>>>>> Did a quick performance comparison of RC10 and RC9 versions of >>>>>>> Carbon-3.2.0. >>>>>>> >>>>>>> Test: >>>>>>> ===== >>>>>>> Service hosted in AS which reads a resource in embedded registry >>>>>>> (service impl class is as follows) >>>>>>> >>>>>>> Registry registry = >>>>>>> CarbonContext.getCurrentContext().getRegistry(RegistryType.SYSTEM_CONFIGURATION); >>>>>>> >>>>>>> Resource r1 = null; >>>>>>> try { >>>>>>> r1 = registry.get("d1/d2/d3/r1"); >>>>>>> } catch (RegistryException e) { >>>>>>> e.printStackTrace(); //To change body of catch statement >>>>>>> use File | Settings | File Templates. >>>>>>> } >>>>>>> return r1.getDescription(); >>>>>>> >>>>>>> java-bench client:- >>>>>>> >>>>>>> while true;do java -jar benchmark.jar -p registry_get_request.xml -n >>>>>>> 1000 -c 200 -k -H "SOAPAction: urn:getResource" -T >>>>>>> "application/soap+xml; >>>>>>> charset=UTF-8" >>>>>>> http://192.168.122.1:9763/services/RegistryGetService/;done >>>>>>> >>>>>>> >>>>>>> RC9 >>>>>>> ===== >>>>>>> Requests per second: 3,291.87 [#/sec] (mean) >>>>>>> Requests per second: 3,448.57 [#/sec] (mean) >>>>>>> Requests per second: 3,417.59 [#/sec] (mean) >>>>>>> Requests per second: 3,334.18 [#/sec] (mean) >>>>>>> Requests per second: 3,291.88 [#/sec] (mean) >>>>>>> Requests per second: 3,433.59 [#/sec] (mean) >>>>>>> Requests per second: 3,477.33 [#/sec] (mean) >>>>>>> Requests per second: 3,368.26 [#/sec] (mean) >>>>>>> Requests per second: 3,323.68 [#/sec] (mean) >>>>>>> Requests per second: 3,364.71 [#/sec] (mean) >>>>>>> >>>>>>> RC10 >>>>>>> ===== >>>>>>> Requests per second: 2,931.87 [#/sec] (mean) >>>>>>> Requests per second: 2,992.98 [#/sec] (mean) >>>>>>> Requests per second: 2,964.73 [#/sec] (mean) >>>>>>> Requests per second: 2,977.55 [#/sec] (mean) >>>>>>> Requests per second: 3,047.40 [#/sec] (mean) >>>>>>> Requests per second: 2,909.69 [#/sec] (mean) >>>>>>> Requests per second: 3,121.50 [#/sec] (mean) >>>>>>> Requests per second: 2,992.58 [#/sec] (mean) >>>>>>> Requests per second: 2,845.01 [#/sec] (mean) >>>>>>> Requests per second: 3,052.30 [#/sec] (mean) >>>>>>> Requests per second: 2,817.33 [#/sec] (mean) >>>>>>> >>>>>>> Regards >>>>>>> Charitha >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Carbon-dev mailing list >>>>>>> [email protected] >>>>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> *Afkham Azeez* >>>>>> Director of Architecture; WSO2, Inc.; http://wso2.com >>>>>> Member; Apache Software Foundation; http://www.apache.org/ >>>>>> * <http://www.apache.org/>** >>>>>> email: **[email protected]* <[email protected]>* cell: +94 77 3320919 >>>>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>* >>>>>> twitter: >>>>>> **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez> >>>>>> * >>>>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez* >>>>>> * >>>>>> * >>>>>> *Lean . Enterprise . Middleware* >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Carbon-dev mailing list >>>>>> [email protected] >>>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> Carbon-dev mailing list >>>>> [email protected] >>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev >>>>> >>>>> >>>> >>>> >>>> -- >>>> *Afkham Azeez* >>>> Director of Architecture; WSO2, Inc.; http://wso2.com >>>> Member; Apache Software Foundation; http://www.apache.org/ >>>> * <http://www.apache.org/>** >>>> email: **[email protected]* <[email protected]>* cell: +94 77 3320919 >>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>* >>>> twitter: >>>> **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez> >>>> * >>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez* >>>> * >>>> * >>>> *Lean . Enterprise . Middleware* >>>> >>>> >>>> _______________________________________________ >>>> Carbon-dev mailing list >>>> [email protected] >>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev >>>> >>>> >>> >>> >>> -- >>> *Senaka Fernando* >>> Product Manager - WSO2 Governance Registry; >>> Associate Technical Lead; WSO2 Inc.; http://wso2.com* >>> Member; Apache Software Foundation; http://apache.org >>> >>> E-mail: senaka AT wso2.com >>> **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818 >>> Linked-In: http://linkedin.com/in/senakafernando >>> >>> *Lean . Enterprise . Middleware >>> >>> >> >> >> -- >> *Senaka Fernando* >> Product Manager - WSO2 Governance Registry; >> Associate Technical Lead; WSO2 Inc.; http://wso2.com* >> Member; Apache Software Foundation; http://apache.org >> >> E-mail: senaka AT wso2.com >> **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818 >> Linked-In: http://linkedin.com/in/senakafernando >> >> *Lean . Enterprise . Middleware >> >> >> _______________________________________________ >> Carbon-dev mailing list >> [email protected] >> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev >> >> > > > -- > *Afkham Azeez* > Director of Architecture; WSO2, Inc.; http://wso2.com > Member; Apache Software Foundation; http://www.apache.org/ > * <http://www.apache.org/>** > email: **[email protected]* <[email protected]>* cell: +94 77 3320919 > blog: **http://blog.afkham.org* <http://blog.afkham.org>* > twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez> > * > linked-in: **http://lk.linkedin.com/in/afkhamazeez* > * > * > *Lean . Enterprise . Middleware* > > > _______________________________________________ > Carbon-dev mailing list > [email protected] > http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev > > -- *Senaka Fernando* Product Manager - WSO2 Governance Registry; Associate Technical Lead; WSO2 Inc.; http://wso2.com* Member; Apache Software Foundation; http://apache.org E-mail: senaka AT wso2.com **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818 Linked-In: http://linkedin.com/in/senakafernando *Lean . Enterprise . Middleware
_______________________________________________ Carbon-dev mailing list [email protected] http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
