logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nickolai Bogdatov <bogda...@gmail.com>
Subject Performance with SocketAppender
Date Fri, 16 Sep 2011 14:23:32 GMT
I have big program (Producer) which generates tons of log4j logs.
In log4j.properties I have 2 Appenders
- RollingFileAppender (for logging to file)
- SocketAppender (for remote debugging)

When I run Producer and generate 200K log test messages it finishes in 45

Now I wrote small Java program (Consumer) which listens to the port and when
message comes
it creates new thread, that thread reads from socket, creates LoggingEvent
and prints it

My problem is that when I run that Consumer program and then Producer
generates same 200K messages ... Producer slows down A LOT ... from 45 sec
to 3min

What can be the reason for that ?
My Consumer does not do much, it is dummy prototype, which just prints
LoggingEvent. But still - big performance hit

Any suggestions ?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message