This is an automated email from the ASF dual-hosted git repository. pkarwasz pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit ec9adec0b2a5d0538ad69053732e3e17ad9f032b Merge: eb4c54d564 c8a2439da2 Author: Piotr P. Karwasz <piotr.git...@karwasz.org> AuthorDate: Fri May 17 13:32:02 2024 +0200 Merge remote-tracking branch 'apache/main' into doc/main/systemproperties src/site/antora/modules/ROOT/pages/manual/architecture.adoc | 1 - src/site/antora/modules/ROOT/pages/manual/async.adoc | 1 - src/site/antora/modules/ROOT/pages/manual/configuration.adoc | 1 - src/site/antora/modules/ROOT/pages/manual/customconfig.adoc | 1 - src/site/antora/modules/ROOT/pages/manual/customloglevels.adoc | 1 - src/site/antora/modules/ROOT/pages/manual/extending.adoc | 1 - src/site/antora/modules/ROOT/pages/manual/filters.adoc | 2 -- src/site/antora/modules/ROOT/pages/manual/garbagefree.adoc | 1 - src/site/antora/modules/ROOT/pages/manual/jmx.adoc | 2 -- src/site/antora/modules/ROOT/pages/manual/json-template-layout.adoc | 1 - src/site/antora/modules/ROOT/pages/manual/layouts.adoc | 1 - src/site/antora/modules/ROOT/pages/manual/logsep.adoc | 1 - src/site/antora/modules/ROOT/pages/manual/lookups.adoc | 1 - src/site/antora/modules/ROOT/pages/manual/performance.adoc | 1 - 14 files changed, 16 deletions(-) diff --cc src/site/antora/modules/ROOT/pages/manual/async.adoc index 5070d8ec9e,ba0ab817fc..f4dcbbb97a --- a/src/site/antora/modules/ROOT/pages/manual/async.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/async.adoc @@@ -15,20 -15,29 +15,19 @@@ limitations under the License. //// = Lock-free Asynchronous Loggers for Low-Latency Logging - Remko Popma <rpo...@apache.org> -Asynchronous logging can improve your application's performance by -executing the I/O operations in a separate thread. Log4j 2 makes a -number of improvements in this area. - -* *Asynchronous Loggers* are a new addition in Log4j 2. Their aim is to -return from the call to Logger.log to the application as soon as -possible. You can choose between making all Loggers asynchronous or -using a mixture of synchronous and asynchronous Loggers. Making all -Loggers asynchronous will give the best performance, while mixing gives -you more flexibility. -* *LMAX Disruptor technology*. Asynchronous Loggers internally use the -link:#UnderTheHood[Disruptor], a lock-free inter-thread communication -library, instead of queues, resulting in higher throughput and lower -latency. -* As part of the work for Async Loggers, *Asynchronous Appenders* have -been enhanced to flush to disk at the end of a batch (when the queue is -empty). This produces the same result as configuring -"immediateFlush=true", that is, all received log events are always -available on disk, but is more efficient because it does not need to -touch the disk on each and every log event. (Async Appenders use -ArrayBlockingQueue internally and do not need the disruptor jar on the -classpath.) +Asynchronous logging can improve your application's performance by executing the I/O operations in a separate thread. +Log4j 2 makes a number of improvements in this area. + +* *Asynchronous Loggers* are a new addition in Log4j 2. Their aim is to return from the call to Logger.log to the application as soon as possible. +You can choose between making all Loggers asynchronous or using a mixture of synchronous and asynchronous Loggers. +Making all Loggers asynchronous will give the best performance, while mixing gives you more flexibility. +* *LMAX Disruptor technology*. +Asynchronous Loggers internally use the +link:#UnderTheHood[Disruptor], a lock-free inter-thread communication library, instead of queues, resulting in higher throughput and lower latency. +* As part of the work for Async Loggers, *Asynchronous Appenders* have been enhanced to flush to disk at the end of a batch (when the queue is empty). +This produces the same result as configuring "immediateFlush=true", that is, all received log events are always available on disk, but is more efficient because it does not need to touch the disk on each and every log event. +(Async Appenders use ArrayBlockingQueue internally and do not need the disruptor jar on the classpath.) [#Trade-offs] == Trade-offs