logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50213] Category callAppenders synchronization causes java.lang.Thread.State: BLOCKED - synchronization can be avoided by using immutable AppenderAttachableImpl
Date Mon, 04 Apr 2011 10:28:56 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50213

--- Comment #6 from bartosz <kowalewski.bartosz@gmail.com> 2011-04-04 06:28:51 EDT ---
Hi guys,

When doing performance/load tests of my system, I've been observing plenty of
threads waiting on this synchronization - on
org.apache.log4j.Category.callAppenders(). For sure a deadlock is not possible
and, what is more, this suboptimal synchronization mechanism cannot cause HUGE
performance degradation if async appenders are used underneath. However, in a
really multithreaded env it'll cause some delays.

It should not be hard to improve this synchronization mechanism without the
need to change API. Introduce a read-write lock? 

Log4j 1.2.x is compliant with JDK 1.2, right? If so, using
java.util.concurrent.locks classes is not an option. Maybe a simple custom impl
of read-write lock would be enough?

Best regards,
  Bartek

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message