[jboss-dev] improving AS boot time

Adrian Brock abrock at redhat.com
Wed May 21 10:15:33 EDT 2008


On Wed, 2008-05-21 at 11:47 +0200, Adrian Brock wrote:
> It would be interesting to get a similar breakdown of the 
> difference of who invokes those methods between beta4 and now.

I don't fully understand the file that Stale added to JBVFS-26

It does show an increase in the number of classloader attempts
to invoke getChild() since jboss-beta4.

Overall this looks to be spending 5 times the amount of time
per request inside the VFS layer.

e.g. I see VFSClassLoaderPolicy.getProtectionDomain() as
beta4 = 78,497 calls - 235 ms)
now = 127,067 calls - 2,494 ms

I get the number 5 by taking the 10 fold increase in time
and dividing by the nearly two fold increase in
number of invocations.

What I can't understand is why getProtectionDomain()
has this many invocations. 
The AS bootstrap has only 13,000 classes loaded
(including JDK classes).

I guess I'm reading this wrong. If that numnber really was true
90% of these invocations would lead to exceptions saying 
duplicate invocation of ClassLoader.defineClass().
Since you can't define a class twice and getProtectionDomain()
is only invoked from there. ;-)

One thing I did notice, is the duplicate invocation
of findChild() during the defineClass() process.

It's sort of reasonable because it is locating different
parts of the VFS structure (e.g. the class file versus
the root for the code source) but its also a bit stupid
since this information can be cached the first time you
do it.

Although it doesn't make much difference in my subjective
testing < 2 seconds (I'm not even sure that number is real
since I only ran it once), I committed it anyway. 
Maybe somebody else will see some benefit?
See http://jira.jboss.com/jira/browse/JBCL-12
which will be in the next classloader release.
-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx




More information about the jboss-development mailing list