[jboss-dev] App Server Startup Time and Memory Footprint Comparisons

Ales Justin ales.justin at gmail.com
Thu Dec 17 10:33:45 EST 2009


https://jira.jboss.org/jira/browse/JBDEPLOY-229

Bill Burke wrote:
> A simple *initial* solution could be to add a 
> addDeployers(List<Deployer>) method and only do the sort once.
> 
> WebServices adds like 29 deployers.  I'm not saying this is bad, just 
> that there's no reason the sort can't be done for those 29 deployers 
> once and only once.
> 
> Maybe even create a bean:  DeploymentList and each subsystem (EJB, 
> WebServicdes, etc.) could use that to deploy all their deployers.
> 
> Then, after this simple thing is done, you can talk the harder problem 
> of sorting.
> 
> Ales Justin wrote:
>> This is the code that sorts it.
>> * 
>> http://anonsvn.jboss.org/repos/jbossas/projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/sort/DominoOrdering.java 
>>
>>
>> Any suggestion how to fix it is welcome.
>>
>> Andrew Lee Rubinger wrote:
>>> I have a test which confirms it.
>>>
>>>    @Test
>>>    public void testAddLotsOfDeployers() throws Throwable
>>>    {
>>>       // Get the MainDeployer
>>>       MainDeployer mainDeployer = (MainDeployer) 
>>> getKernel().getController().getInstalledContext(NAME_MC_MAIN_DEPLOYER)
>>>             .getTarget();
>>>       TestCase.assertNotNull(MainDeployer.class.getName() + " 
>>> instance was not installed into MC", mainDeployer);
>>>
>>>       // Add Deployers
>>>       for (int i = 0; i < 100; i++)
>>>       {
>>>          // Install a deployer
>>>          final Deployer deployer = new AbstractDeployer()
>>>          {
>>>
>>>             @Override
>>>             public void deploy(final DeploymentUnit unit) throws 
>>> DeploymentException
>>>             {
>>>                //NOOP
>>>             }
>>>          };
>>>          final String deployerName = 
>>> deployer.getClass().getSimpleName() + i;
>>>          final BeanMetaDataBuilder bmdb = BeanMetaDataBuilder
>>>                .createBuilder(deployerName, 
>>> deployer.getClass().getName());
>>>          getKernel().getController().install(bmdb.getBeanMetaData(), 
>>> deployer);
>>>       }
>>>    }
>>>
>>> That takes 163s on my machine.
>>>
>>> S,
>>> ALR
>>>
>>> On 12/17/2009 10:03 AM, Dimitris Andreadis wrote:
>>>> 2 seconds doing Deployer sorting??? either a bug or a bad measurement.
>>>>
>>>> Bill Burke wrote:
>>>>> I just did some profiling. 30% of boottime if you remove deploy/
>>>>> directory (30% is 6-7 seconds out of 18) is because of Deployer
>>>>> sorting. WebServices adds a TON of deployers, and a sort is happening
>>>>> after each add of each deployer.
>>>>>
>>>>> Ales Justin wrote:
>>>>>>> Ales told me he had a tool which draws out the dependencies of all
>>>>>>> beans in the AS. This needs some work, but I think it could be used
>>>>>>> in helping to (a) identify which beans need dependency annotations
>>>>>>> and (b) check whether all dependencies are correct (e.g. no 
>>>>>>> cycles)...
>>>>>>
>>>>>> http://in.relation.to/Bloggers/MicrocontainerToolsGrapher
>>>>>>
>>>>>> MC 2.2.x will include some of the problems we've encountered and
>>>>>> tackled:
>>>>>> * ControllerState::equals
>>>>>> * MDR's ScopeKey sorting
>>>>>> * beans per class indexing
>>>>>> * annotation plugin matching
>>>>>> * ...
>>>>>>
>>>>>> After I include new MC 2.2.x in AS, I'll spend the time identifying
>>>>>> the potential lazy & on_demans beans + other tweaks.
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
> 



More information about the jboss-development mailing list