[ 
https://issues.apache.org/jira/browse/LOG4J2-1733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15742776#comment-15742776
 ] 

Vincent Tieleman commented on LOG4J2-1733:
------------------------------------------

Thank you for picking this issue up so fast. I personally believe it is a 
general issue when handling large amounts of data. I just looked up the 
FileAppender to see how that works, and the documentation says something 
similar:

bufferedIO      boolean When true - the default, records will be written to a 
buffer and the data will be written to disk when the buffer is full or, if 
immediateFlush is set, when the record is written. File locking cannot be used 
with bufferedIO. Performance tests have shown that using buffered I/O 
significantly improves performance, even if immediateFlush is enabled.

And here is the Kafka documentation regarding the send method:

The send() method is asynchronous. When called it adds the record to a buffer 
of pending record sends and immediately returns. This allows the producer to 
batch together individual records for efficiency.

The solutions are quite similar and have both been introduced to increase 
performance.



> Introduce SyncSend property for KafkaAppender (as in KafkaLog4jAppender)
> ------------------------------------------------------------------------
>
>                 Key: LOG4J2-1733
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1733
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Appenders
>    Affects Versions: 2.5
>         Environment: Kafka 0.10.1.0
>            Reporter: Vincent Tieleman
>
> The KafkaLog4jAppender (shipped with Kafka and usable with log4j), has a 
> syncsend property that improves performance significantly by not blocking a 
> send to Kafka. I've tried many other configuration settings and setups, but 
> find that none of these approaches improved the logging performance to Kafka 
> as significantly as setting the syncsend property to false.
> Unfortunately, the syncsend property is not supported by the KafkaAppender 
> shipped with log4j2 and the KafkaLog4jAppender only supports log4j, so I am 
> stuck with forking the code and making the change myself.
> Could you please introduce this property in the KafkaAppender in log4j2?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to