On Wed, Mar 23, 2011 at 4:23 PM, Senaka Fernando <sen...@wso2.com> wrote:
> > > On Wed, Mar 23, 2011 at 3:54 PM, Afkham Azeez <az...@wso2.com> wrote: > >> I have fixed part 2 of this performance issue. Senaka is working on part >> 1. > > > Done. > Cool. Have you got the profiling results comparison? > > Thanks, > Senaka. > > >> With my fixes, the performance figures are back to normal. Charitha, >> please test with a nightly build of AppServer and confirm. >> >> >> On Wed, Mar 23, 2011 at 2:26 PM, Afkham Azeez <az...@wso2.com> wrote: >> >>> >>> >>> On Wed, Mar 23, 2011 at 2:16 PM, Afkham Azeez <az...@wso2.com> wrote: >>> >>>> >>>> >>>> On Wed, Mar 23, 2011 at 2:10 PM, Senaka Fernando <sen...@wso2.com>wrote: >>>> >>>>> Hi all, >>>>> >>>>> On Wed, Mar 23, 2011 at 1:35 PM, Afkham Azeez <az...@wso2.com> wrote: >>>>> >>>>>> realmService was null in the previous release because we are using H2, >>>>>> and before the Registry/UM API separation, we were not able to have auth >>>>>> support for webapps because we had to create two DB connections, which >>>>>> was >>>>>> not possible then with H2, but now with the API separation and a single >>>>>> DB >>>>>> connection, we are able to support it. Due to this reason, the registry >>>>>> perf >>>>>> bug has surfaced. Registry team, we need your help to fix this :) >>>>> >>>>> >>>>> OK, now we understand the problem. So, this has been there since 3.1.0 >>>>> actually, but it did not surface due to another bug, which has been fixed. >>>>> As discussed offline with Azeez, we need to make two fixes to solve this >>>>> properly. >>>>> >>>>> 1. Get rid of the unwanted DB calls during the initialization of the >>>>> UserRegistry (basically the creation of the cluster lock table etc). >>>>> >>>>> 2. Load the UserRegistry instances only at the first access, and not >>>>> when we initially add it to the CarbonContext. >>>>> >>>> >>>> I will implement Lazy loading proxy objects to handle this so that the >>>> registry objects are created only when they are required. This will save a >>>> lot of memory as well. Thanks Senaka for suggesting this solution. >>>> >>> >>> Going to call this GhostRegistry ;) spoooooky >>> >>>> >>>> >>>>> >>>>> Thanks, >>>>> Senaka. >>>>> >>>>>> >>>>>> >>>>>> On Wed, Mar 23, 2011 at 1:30 PM, Afkham Azeez <az...@wso2.com> wrote: >>>>>> >>>>>>> I profiled the previous release, AppServer 4.0 just now. It works >>>>>>> fine only because the registryService.getConfigSystemRegistry(tenantId) >>>>>>> & registryService.getGovernanceSystemRegistry(tenantId) methods never >>>>>>> get >>>>>>> invoked in the previous release, if the userRealmService is null. That >>>>>>> seems >>>>>>> to be a bug in the previous release. So, this perf issue never surfaced >>>>>>> in >>>>>>> the old release because of a potential bug >>>>>>> >>>>>>> The root cause of this perf issue is in the Registry, as can be seen >>>>>>> in the previous JProfiler CPU profiling diagram I sent. >>>>>>> >>>>>>> Azeez >>>>>>> >>>>>>> >>>>>>> On Wed, Mar 23, 2011 at 1:06 PM, Afkham Azeez <az...@wso2.com>wrote: >>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Wed, Mar 23, 2011 at 1:00 PM, Senaka Fernando >>>>>>>> <sen...@wso2.com>wrote: >>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On Wed, Mar 23, 2011 at 12:56 PM, Afkham Azeez <az...@wso2.com>wrote: >>>>>>>>> >>>>>>>>>> I looked at the previous 3.1.0 code and did not find any place >>>>>>>>>> where we cache the CarbonContext. Like HttpReqeust, Response etc. I >>>>>>>>>> think it >>>>>>>>>> is perfectly OK to create CarbonContext instances per request. But >>>>>>>>>> the >>>>>>>>>> creation of it should be fast. >>>>>>>>>> >>>>>>>>> >>>>>>>>> OK, we need to compare 3.1.0 and 3.2.0 (profile them both I mean) >>>>>>>>> and see whether we can find what's the cause of this slowness, as >>>>>>>>> this issue >>>>>>>>> is due to something that has changed between 3.1.0 and today. >>>>>>>>> >>>>>>>> >>>>>>>> The API separation was a major change. >>>>>>>> >>>>>>>> >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> Senaka. >>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Fri, Mar 11, 2011 at 10:12 PM, Senaka Fernando < >>>>>>>>>> sen...@wso2.com> wrote: >>>>>>>>>> >>>>>>>>>>> Hi Azeez, >>>>>>>>>>> >>>>>>>>>>> OK, so it seems to be wrong to be reconstructing the carbon >>>>>>>>>>> context over and over again, for each request that comes in. This >>>>>>>>>>> was cached >>>>>>>>>>> in some scope (session or context), making this a one-time >>>>>>>>>>> overhead. Did >>>>>>>>>>> this change from 3.1.0 to 3.2.0 for some reason? >>>>>>>>>>> >>>>>>>>>>> Thanks, >>>>>>>>>>> Senaka. >>>>>>>>>>> >>>>>>>>>>> On Fri, Mar 11, 2011 at 3:54 PM, Afkham Azeez <az...@wso2.com>wrote: >>>>>>>>>>> >>>>>>>>>>>> As can be seen in the JProfiler screenshot, there getRegistry >>>>>>>>>>>> methods are introducing a big overhead. >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> *Afkham Azeez* >>>>>>>>>>>> Senior Software Architect & Senior Manager; WSO2, Inc.; >>>>>>>>>>>> http://wso2.com, >>>>>>>>>>>> * >>>>>>>>>>>> * >>>>>>>>>>>> *Member; Apache Software Foundation; >>>>>>>>>>>> **http://www.apache.org/*<http://www.apache.org/> >>>>>>>>>>>> * >>>>>>>>>>>> email: **az...@wso2.com* <az...@wso2.com>* 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 >>>>>>>>>>>> Carbon-dev@wso2.org >>>>>>>>>>>> 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://www.linkedin.com/in/senakafernando >>>>>>>>>>> >>>>>>>>>>> *Lean . Enterprise . Middleware >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> *Afkham Azeez* >>>>>>>>>> Senior Software Architect & Senior Manager; WSO2, Inc.; >>>>>>>>>> http://wso2.com, >>>>>>>>>> * >>>>>>>>>> * >>>>>>>>>> *Member; Apache Software Foundation; >>>>>>>>>> **http://www.apache.org/*<http://www.apache.org/> >>>>>>>>>> * >>>>>>>>>> email: **az...@wso2.com* <az...@wso2.com>* 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* >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> *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://www.linkedin.com/in/senakafernando >>>>>>>>> >>>>>>>>> *Lean . Enterprise . Middleware >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> *Afkham Azeez* >>>>>>>> Senior Software Architect & Senior Manager; WSO2, Inc.; >>>>>>>> http://wso2.com, >>>>>>>> * >>>>>>>> * >>>>>>>> *Member; Apache Software Foundation; >>>>>>>> **http://www.apache.org/*<http://www.apache.org/> >>>>>>>> * >>>>>>>> email: **az...@wso2.com* <az...@wso2.com>* 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* >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> *Afkham Azeez* >>>>>>> Senior Software Architect & Senior Manager; WSO2, Inc.; >>>>>>> http://wso2.com, >>>>>>> * >>>>>>> * >>>>>>> *Member; Apache Software Foundation; >>>>>>> **http://www.apache.org/*<http://www.apache.org/> >>>>>>> * >>>>>>> email: **az...@wso2.com* <az...@wso2.com>* 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* >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> *Afkham Azeez* >>>>>> Senior Software Architect & Senior Manager; WSO2, Inc.; >>>>>> http://wso2.com, >>>>>> * >>>>>> * >>>>>> *Member; Apache Software Foundation; >>>>>> **http://www.apache.org/*<http://www.apache.org/> >>>>>> * >>>>>> email: **az...@wso2.com* <az...@wso2.com>* 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* >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> *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://www.linkedin.com/in/senakafernando >>>>> >>>>> *Lean . Enterprise . Middleware >>>>> >>>>> >>>> >>>> >>>> -- >>>> *Afkham Azeez* >>>> Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com >>>> , >>>> * >>>> * >>>> *Member; Apache Software Foundation; >>>> **http://www.apache.org/*<http://www.apache.org/> >>>> * >>>> email: **az...@wso2.com* <az...@wso2.com>* 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* >>>> >>>> >>> >>> >>> -- >>> *Afkham Azeez* >>> Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com >>> , >>> * >>> * >>> *Member; Apache Software Foundation; >>> **http://www.apache.org/*<http://www.apache.org/> >>> * >>> email: **az...@wso2.com* <az...@wso2.com>* 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* >>> >>> >> >> >> -- >> *Afkham Azeez* >> Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com, >> * >> * >> *Member; Apache Software Foundation; >> **http://www.apache.org/*<http://www.apache.org/> >> * >> email: **az...@wso2.com* <az...@wso2.com>* 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* >> >> > > > -- > *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://www.linkedin.com/in/senakafernando > > *Lean . Enterprise . Middleware > > -- *Afkham Azeez* Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com, * * *Member; Apache Software Foundation; **http://www.apache.org/*<http://www.apache.org/> * email: **az...@wso2.com* <az...@wso2.com>* 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 Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev