[jboss-dev] Small boottime improvement

Kabir Khan kabir.khan at jboss.com
Tue Feb 16 15:10:55 EST 2010


I need some input from Adrian/Ales on [1] regarding changes to MDR. Following from Jaikiran's thread [2], I found [3] and [4] and I created a few benchmarks for those areas and found that getting a component MetaDataRetrieval for the AnnotatedElementMetaDataLoader is quite costly, and found that AnnotatedElementMetaDataLoader.getComponentMetaDataRetrieval() creates a return value whether or not there are any annotations. More on that in [1], but doing that fix in my local benchmark has shown the biggest improvement for any single fix:

From: 18s878ms with yesterday's setup
To: 18s207ms with the fix from [1]

Full list of times here, including the first time under 18 seconds :-)

Yesterday's previously best setup
===========================
18s:920ms (1)
19s:301ms (3)
18s:464ms (5)
18s:866ms (7)
18s:893ms (9)
18s:826ms (11)	

With Component metadata fix
===========================
18s:73ms (2)
18s:473ms (4)
18s:244ms (6)
18s:276ms (8)
18s:214ms (10)
17s:965ms (12)

Regarding the issues raised in [2], I found that
1) findMethod() overhead was negligible, but I might have been benchmarking the wrong thing
2) Was done a while ago for https://jira.jboss.org/jira/browse/JBKERNEL-64
3) I can try to look into that
4) Was handled already

[1] http://community.jboss.org/thread/148203
[2] http://community.jboss.org/message/434125#434125
[3] http://community.jboss.org/thread/96937?tstart=0
[4] http://community.jboss.org/message/316208#316208

On 15 Feb 2010, at 15:48, Kabir Khan wrote:

> Another 200ms taken off by this change indexing the ControllerStates in the controller making state comparisons more efficient: http://community.jboss.org/message/526380#526380
> 
> Average startup time for me is 18s687ms compared with 18s856ms with this morning's setup.
> For minimal, the startup times are about 4s780ms with both setups down from 5s224ms with AS-6.0.0.M2
> 
> 
> On 15 Feb 2010, at 12:22, Kabir Khan wrote:
> 
>> Getting rid of the @Dependency annotation checks from AOPDependencyBuilder https://jira.jboss.org/jira/browse/JBKERNEL-98 brings the startup time down to the 18s range.
>> 
>> kernel 2.2.0-SNAPSHOT, from a few days ago (Alpha6 with the extra resolveContexts loop optimization)
>> mdr 2.2.0-Alpha1
>> ================================================================================
>> 20s:192ms (1)
>> 19s:733ms (3)
>> 19s:968ms (4)
>> 
>> kernel 2.2.0-SNAPSHOT, includes the @Dependency stuff
>> mdr 2.2.0-SNAPSHOT
>> ============================================
>> 18s:905ms (2)
>> 18s:604ms (4)
>> 18s:657ms (6)
>> 
>> 
>> 
>> On 12 Feb 2010, at 15:50, Kabir Khan wrote:
>> 
>>> I found that ScopeKey's hashCode was not being calculated correctly (http://community.jboss.org/message/526058#526058), and fixed this in a local jboss-mdr snapshot, which gives another tiny enhancement. Here are today's numbers, same setup as last time.
>>> 
>>> kernel 2.2.0-Alpha5
>>> mdr 2.2.0-Alpha1
>>> ===============
>>> 34s:696ms (1)
>>> 20s:562ms (2)
>>> 20s:349ms (7)
>>> 20s:463ms (10)
>>> 20s:622ms (13)
>>> 20s:582ms (16)
>>> 20s:35ms (19)
>>> -------------------------
>>> Average ignoring (1): 20s436ms
>>> 
>>> kernel 2.2.0-SNAPSHOT
>>> mdr 2.2.0-Alpha1
>>> ===================
>>> 29s:637ms (3)
>>> 19s:627ms (4)
>>> 19s:786ms (8)
>>> 20s:2ms (11)
>>> 20s:432ms (14)
>>> 19s:827ms (17)
>>> 19s:731ms (20)
>>> -------------------------------
>>> Average ignoring (3): 19s900ms
>>> 
>>> kernel 2.2.0-SNAPSHOT
>>> mdr 2.2.0-SNAPSHOT
>>> ============================
>>> 27s:167ms (5)
>>> 19s:834ms (6)
>>> 19s:702ms (9)
>>> 19s:349ms (12)
>>> 20s:228ms (15)
>>> 19s:346ms (18)
>>> 19s:315ms (21)
>>> ----------------------------
>>> Average ignoring (5): 19s629ms
>>> 
>>> Now that I'm more into profiling stuff, I'll see if profiling minimal as suggested by Bill makes more sense to me, if not I'll do a few more cycles of these.
>>> 
>>> 
>>> On 11 Feb 2010, at 12:25, Kabir Khan wrote:
>>> 
>>>> I have been doing some work on profiling and optimizing the jboss-dependency project [1] for kernel 2.2.0.Alpha6 and it seems to have had a small, but still measurable impact :-)
>>>> 
>>>> I did a few startups of AS with jboss kernel 2.2.0.Alpha5 and with a local snapshot. This snapshot contains the work done for Alpha6 with the addition of removing the break in the resolveContexts loop as mentioned in the forum thread.
>>>> 
>>>> The startups were done on a freshly rebooted machine with nothing else running. The startup orders are given in brackets, so I started Alpha5 twice, then SNAPSHOT twice and so on.
>>>> 
>>>> 2.2.0-Alpha5
>>>> ----------------------
>>>> 37s:247ms (1)
>>>> 20s:573ms (2)
>>>> 20s:275ms (5)
>>>> 20s:127ms (7)
>>>> 20s:433ms (9)
>>>> 20s:329ms (10)
>>>> 20s:890ms (13)
>>>> 
>>>> 
>>>> 2.2.0-SNAPSHOT
>>>> ------------------------
>>>> 29s:563ms (3)
>>>> 19s:965ms (4)
>>>> 19s:821ms (6)
>>>> 20s:332ms (8)
>>>> 19s:618ms (10)
>>>> 19s:905ms (12)
>>>> 19s:900ms (14)
>>>> 
>>>> One strange thing is that the first time I started each server they took loads longer than the other times, does somebody know the reason for that? 
>>>> 
>>>> Ignoring those initial times leaves me with average start times of:
>>>> Alpha5: 20s437ms
>>>> SNAPSHOT: 19s923ms
>>>> 
>>>> I'm going to have a final look at jboss-dependency to see if there are any other obvious and easy fixes before moving on to have a look at jboss-kernel.
>>>> 
>>>> [1] http://community.jboss.org/message/525047#525047
>>>> _______________________________________________
>>>> jboss-development mailing list
>>>> jboss-development at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/jboss-development
>>> 
>>> 
>>> _______________________________________________
>>> jboss-development mailing list
>>> jboss-development at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/jboss-development
>> 
>> 
>> _______________________________________________
>> jboss-development mailing list
>> jboss-development at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-development
> 
> 
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development





More information about the jboss-development mailing list