You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "swebb2066 (via GitHub)" <gi...@apache.org> on 2024/12/15 06:22:47 UTC

[PR] Reduce MultiprocessRollingFileAppender overhead [logging-log4cxx]

swebb2066 opened a new pull request, #443:
URL: https://github.com/apache/logging-log4cxx/pull/443

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Reduce MultiprocessRollingFileAppender overhead [logging-log4cxx]

Posted by "swebb2066 (via GitHub)" <gi...@apache.org>.
swebb2066 merged PR #443:
URL: https://github.com/apache/logging-log4cxx/pull/443


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Reduce MultiprocessRollingFileAppender overhead [logging-log4cxx]

Posted by "swebb2066 (via GitHub)" <gi...@apache.org>.
swebb2066 commented on PR #443:
URL: https://github.com/apache/logging-log4cxx/pull/443#issuecomment-2543503026

   This PR onlly reduced the overhead by about 4% on Ubuntu gcc.
   
   Note that the benchmarks set BufferedIO=true


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Reduce MultiprocessRollingFileAppender overhead [logging-log4cxx]

Posted by "swebb2066 (via GitHub)" <gi...@apache.org>.
swebb2066 commented on PR #443:
URL: https://github.com/apache/logging-log4cxx/pull/443#issuecomment-2543499680

   The benchmarks on Windows 11 Visual Studio 2022 are:
   
    | Benchmark | Time | CPU |  Iterations | 
    | --------- | ---- | --- | ----------- |
    | Testing disabled logging request | 3.41 ns | 3.26 ns  |  263529412 | 
    | Testing disabled logging request/threads:4 | 0.960 ns | 3.84 ns  |  179200000 | 
    | Appending 5 char string using MessageBuffer, pattern: %m%n | 324 ns | 315 ns | 2036364 | 
    | Appending 5 char string using MessageBuffer, pattern: %m%n/threads:4 | 293 ns | 1116 ns | 448000 | 
    | Appending 49 char string using MessageBuffer, pattern: %m%n | 396 ns | 396 ns | 1659259 | 
    | Appending 49 char string using MessageBuffer, pattern: %m%n/threads:4 | 347 ns | 1289 ns | 400000 | 
    | Appending int value using MessageBuffer, pattern: %m%n | 697 ns | 656 ns | 1000000 | 
    | Appending int value using MessageBuffer, pattern: %m%n/threads:4 | 541 ns | 2128 ns | 448000 | 
    | Appending int+float using MessageBuffer, pattern: %m%n | 1147 ns | 1099 ns | 640000 | 
    | Appending int+float using MessageBuffer, pattern: %m%n/threads:4 | 812 ns | 3139 ns | 298668 | 
    | Appending int value using MessageBuffer, pattern: [%d] %m%n | 709 ns | 698 ns | 1120000 | 
    | Appending int value using MessageBuffer, pattern: [%d] [%c] [%p] %m%n | 767 ns | 767 ns | 1120000 | 
    | Async, Sending int+float using MessageBuffer | 1503 ns | 1444 ns | 497778 | 
    | Async, Sending int+float using MessageBuffer/threads:4 | 1275 ns | 4883 ns | 224000 | 
    | Logging int+float using MessageBuffer, pattern: %d %m%n | 1394 ns | 1381 ns | 407273 | 
    | Logging int+float using MessageBuffer, pattern: %d %m%n/threads:4 | 1951 ns | 6810 ns | 162908 | 
    | Multiprocess logging int+float using MessageBuffer, pattern: %d %m%n | 30028 ns | 29681 ns | 19478 | 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Reduce MultiprocessRollingFileAppender overhead [logging-log4cxx]

Posted by "swebb2066 (via GitHub)" <gi...@apache.org>.
swebb2066 commented on PR #443:
URL: https://github.com/apache/logging-log4cxx/pull/443#issuecomment-2544463520

   To improve performance on Windows, it would be necessary to use [ReadDirectoryChangesW](https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-readdirectorychangesw) with a `FILE_NOTIFY_CHANGE_FILE_NAME` filter and poll for changes using `WaitForMultipleObjects`.
   
   Seems a bit too much code to add given the level of usage of the appender.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org