Re: Bizarre performance in log4j2

2015-12-13 Thread Remko Popma
formance if these two loggers print logs in the same file? >> >> 1) sync logger, async appender and includeLocation="true" to print logs >> from function_A >> >> 2) asyncRoot, sync appender and includeLocation="false" to print other logs >> &g

Re: Bizarre performance in log4j2

2015-12-10 Thread Strong Su
ure that I have removed all log4j-1.2.16 >> and slf4j-log4j12. >> It became better but not good enough. >> Since sync log4j2 has already performed much better than log4j1, we >> decided to use sync log4j2 first. >> And I will start a fresh test over async log4j2 from

Re: Bizarre performance in log4j2

2015-10-20 Thread Strong Su
beginning to > checkout where the problem is. > > I will update this thread or link this problem to a new thread when the > performance becomes normal. > > Thank you very much for the advices during these days. > > Best regards, > Dylan Su > > On Wed, Oct 14, 2015 at 4:

Re: Bizarre performance in log4j2

2015-10-16 Thread Strong Su
wrote: > > -- Forwarded message -- > From: Gary Gregory <garydgreg...@gmail.com> > Date: Tue, Oct 13, 2015 at 9:58 PM > Subject: Re: Bizarre performance in log4j2 > To: Log4J Users List <log4j-user@logging.apache.org> > > > You can check with

Re: Bizarre performance in log4j2

2015-10-13 Thread Mikael Ståldal
...and make sure that no 3rd party dependencies brings them in. On Tue, Oct 13, 2015 at 8:22 AM, Remko Popma wrote: > Please remove log4j-1.2.16 and replace it with log4j-1.2-api version 2.3. > > Also remove slf4j-log4j12 and add log4j-slf4j-impl version 2.3. > > Sent

Re: Bizarre performance in log4j2

2015-10-13 Thread Remko Popma
Very strange... Can we try something else? Instead of using or , just use and in the configuration, and make all loggers asynchronous by setting system property -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector (But keep includeLocation="false".) On Tue,

Re: Bizarre performance in log4j2

2015-10-13 Thread Strong Su
I change them to log4j-1.2-api and log4j-slf4j-impl. But it didn't change better. On Tue, Oct 13, 2015 at 4:24 PM, Mikael Ståldal wrote: > ...and make sure that no 3rd party dependencies brings them in. > > On Tue, Oct 13, 2015 at 8:22 AM, Remko Popma

Re: Bizarre performance in log4j2

2015-10-13 Thread Remko Popma
Please remove log4j-1.2.16 and replace it with log4j-1.2-api version 2.3. Also remove slf4j-log4j12 and add log4j-slf4j-impl version 2.3. Sent from my iPhone > On 2015/10/13, at 14:39, Strong Su wrote: > > Here is my pom.xml for logging: > > >log4j >log4j >

Re: Bizarre performance in log4j2

2015-10-12 Thread Strong Su
Here is my console debug with status="trace". I found that log4j2 didn't get SleepWaitingStrategy by default and I didn't find includeLocation in console. 2015-10-12 18:55:25,424 DEBUG Starting LoggerContext[name=2090228673] from configuration at jndi:/localhost/WEB-INF/log4j2.xml 2015-10-12

Re: Bizarre performance in log4j2

2015-10-12 Thread Remko Popma
Can you change the configuration to start with On 2015/10/12, at 15:22, Strong Su wrote: > > Hi Remko. Thanks for the reply. > I changed includeLocation to false and re-run the test. > But it didn't change better. QPS is still about 5000. > > I found user occupies CPU for

Re: Bizarre performance in log4j2

2015-10-12 Thread Strong Su
Hi Remko. Thanks for the reply. I changed includeLocation to false and re-run the test. But it didn't change better. QPS is still about 5000. I found user occupies CPU for about 70% when I run sync log4j1 and sync log4j2. But when I run async log4j2, it's only about 30% and system occupies for

Re: Bizarre performance in log4j2

2015-10-12 Thread Strong Su
I'm using Log4j 2.3 and Disruptor 3.2. Because of third party package like spring, I have to use Log4j 1.2 and slf4j 1.5 too. On Tue, Oct 13, 2015 at 7:15 AM, Remko Popma wrote: > Output looks ok. > Sleep was the default wait strategy but has been changed to Block a long

Re: Bizarre performance in log4j2

2015-10-12 Thread Remko Popma
Output looks ok. Sleep was the default wait strategy but has been changed to Block a long time ago. Looks like the docs are out of date. Thanks for drawing my attention to this. I don't understand why changing the includeLocation does not make a difference in performance. You should see a large

Re: Bizarre performance in log4j2

2015-10-12 Thread Remko Popma
For log4j1, are you using the log4j-1.2-api-2.x.jar? And similarly the log4j-slf4j-impl-2.x.jar for SLF4J? (Just checking...) Sent from my iPhone > On 2015/10/13, at 11:43, Gary Gregory wrote: > > Can you use 2.4? > > Gary > >> On Mon, Oct 12, 2015 at 6:56 PM, Strong

Re: Bizarre performance in log4j2

2015-10-12 Thread Strong Su
Using 2.4 will have some difficulties cause we are still using Java 1.6. May the problem be I'm using an older version of log4j? By the way, here is how I log in the request function: import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; {...} private static final

Re: Bizarre performance in log4j2

2015-10-12 Thread Strong Su
Here is my pom.xml for logging: log4j log4j 1.2.16 org.slf4j slf4j-log4j12 1.5.11 org.slf4j slf4j-api 1.5.11 org.apache.logging.log4j log4j-api 2.3 org.apache.logging.log4j log4j-core 2.3 org.apache.logging.log4j

Re: Bizarre performance in log4j2

2015-10-11 Thread Strong Su
My log4j2 sync configuration is: And async configuration change to On Sun, Oct 11, 2015 at 10:51 AM, Remko Popma wrote: > Can

Re: Bizarre performance in log4j2

2015-10-11 Thread Strong Su
I was mean to run sync logger and sync appender to compare the basic performance of log4j2. But when I run command: jstack -F | grep log and command: jstack -F | grep disruptor I found many messages after command1 and they have the word of AsyncAppender but nothing after command2. Is that means

Re: Bizarre performance in log4j2

2015-10-11 Thread Remko Popma
See also http://logging.apache.org/log4j/2.x/manual/async.html#Location and http://logging.apache.org/log4j/2.x/manual/async.html#Throughput_of_Logging_With_Location_includeLocationtrue On Sun, Oct 11, 2015 at 1:54 PM, Remko Popma wrote: > The problem with the strange

Re: Bizarre performance in log4j2

2015-10-10 Thread Ralph Goers
What does your server look like? Specifically, how many cores? Are they hyper threaded? How much memory? If you don’t have YourKit or some other profiler installed to identify the bottleneck, one of my favorite tricks is to just take several thread dumps 10-15 seconds apart and then compare

Bizarre performance in log4j2

2015-10-10 Thread Strong Su
Hello everyone, I'm still testing log4j2 on our projects. When using it, I find it has a beautiful performance when using sync log4j2. But it turns terrible when I add -DLog4jContextSelector or change to in log4j2.xml to use async log4j2. I don't even have a clue on explaining this.What could

Re: Bizarre performance in log4j2

2015-10-10 Thread Remko Popma
How did you measure the good performance (with sync logging) and the bad performance (with async)? What happens exactly when "it turns terrible"? On Saturday, 10 October 2015, Strong Su wrote: > Hello everyone, > I'm still testing log4j2 on our projects. > When using it, I

Re: Bizarre performance in log4j2

2015-10-10 Thread Strong Su
I insert a log in a http request function on server side. And I start requests continually on client side through hundreds of threads. I measure the performance through QPS because server has to print a log whenever it receive a request. The time delayed by logging will influence QPS heavily. When