logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <ralph.go...@dslextreme.com>
Subject Re: Bizarre performance in log4j2
Date Sat, 10 Oct 2015 15:48:32 GMT
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
them. If they consistently show the same piece of code being executed then that is likely
a bottleneck.

Ralph

> On Oct 10, 2015, at 5:58 AM, Strong Su <lovelosew@gmail.com> wrote:
> 
> 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 I didn't insert a log in the request function, QPS was about 20000.
> When I inserted a log4j1 log, QPS was about 10000.
> When I inserted a log4j2 sync log, QPS was about 18000.
> But when I inserted a log4j2 asycn log, QPS was only about 5000.
> 
> On Sat, Oct 10, 2015 at 8:34 PM, Remko Popma <remko.popma@gmail.com> wrote:
> 
>> 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 <lovelosew@gmail.com> wrote:
>> 
>>> 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 <root>
>> to
>>> <AsyncRoot> in log4j2.xml to use async log4j2.
>>> I don't even have a clue on explaining this.What could cause this bizarre
>>> problem?
>>> 
>>> Thank you.
>>> Best regards,
>>> Dylan Su
>>> 
>> 



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


Mime
View raw message