[jboss-dev] AS trunk boot time back to poor?
Tim Fox
tim.fox at jboss.com
Sat Jan 23 05:37:37 EST 2010
On 21/01/10 22:50, Brian Stansberry wrote:
> On 01/21/2010 11:20 AM, Brian Stansberry wrote:
>
>> On 01/21/2010 10:41 AM, David M. Lloyd wrote:
>>
>>> On 01/21/2010 10:39 AM, David M. Lloyd wrote:
>>>
>>>> On 01/21/2010 09:55 AM, Brian Stansberry wrote:
>>>>
>> Semi-OT: a couple weeks ago, when boot.log was< 10MB I tried setting
>> -Djboss.boot.server.log.level=INFO and got very little improvement in
>> boot time (< 200ms). My take on that is we must have a lot of DEBUG
>> logging with very expensive message construction not guarded by
>> isDebugEnabled().
>>
>>
> John Bailey did some quick profiling or something and estimated that
> during startup we have> 5000 log.debug() calls not guarded by
> log.isDebugEnabled(). If you look at the debug logging output, a lot of
> the messages are pretty heavy, some absolutely huge; if those aren't
> guarded it's a serious cost.
>
FWIW.
In profiling JBoss Messaging a couple years ago, we found out that not
only does the log.debug() (or log.trace()) have an overhead, but the
actual call to log.isDebugEnabled()/ log.isTraceEnabled() had a
measurable impact.
We changed our guards to just test on a cached boolean value if (trace)
{ }, instead of calling isTraceEnabled() each time, and we got around 3%
performance improvement IIRC.
I'm not sure you're down to the level of optimisation where you'll
notice any difference in AS, but I thought I'd throw that in anyway.
> Warning: the rest of this post is completely unsupported by evidence;
> just my gut feel.
>
> Perhaps not guarded because that method is deprecated?
>
> Here's a good explanation of why it's deprecated:
>
> http://blogs.jboss.org/blog/dimitris/2005/04/01/AC08547736BD16504BEC955AEBDAA48F.txt
>
> I fear though that deprecating this method is a failed social
> experiment. Please resist the urge to make that deprecation warning go
> away by not putting a code guard around an expensive log.debug(). Either
> reduce the level to trace (and keep a guard of course) or accept the
> warning and bitch publicly about the deprecation.
>
>
> Please also resist the urge to shift off of EE 6 work in order to scour
> all our code for logging cleanups. :)
>
>
--
Sent from my BBC Micro Model B
Tim Fox
JBoss
HornetQ - putting the buzz in messaging http://hornetq.org
http://hornetq.blogspot.com/
http://twitter.com/hornetq
irc://irc.freenode.net:6667#hornetq
fox at redhat.com
More information about the jboss-development
mailing list