You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2022/01/01 06:53:05 UTC

[GitHub] [logging-log4cxx] swebb2066 opened a new pull request #94: LOGCXX-546] Prevent serialization of a multi-threaded application

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


   when using disabled logging statements.
   
   throughputtests output after applyinh these changes:
   ```Benchmarking library only(no writing out):
   **************************************************************
   Benchmarking Single threaded: 1000000 messages
   **************************************************************
   Log4cxx NoFormat pattern: %m%n Elapsed: 4.866 secs 205,516/sec
   Log4cxx DateOnly pattern: [%d] %m%n Elapsed: 4.875 secs 205,130/sec
   Log4cxx DateClassLevel pattern: [%d] [%c] [%p] %m%n Elapsed: 4.898 secs 204,167/sec
   Log4cxx Logging with FMT Elapsed: 2.437 secs 410,320/sec
   Log4cxx Logging static string Elapsed: 3.409 secs 293,331/sec
   Log4cxx Logging static string with FMT Elapsed: 2.759 secs 362,386/sec
   Log4cxx Logging disabled debug Elapsed: 0.1323 secs 7,558,764/sec
   Log4cxx Logging disabled trace Elapsed: 0.1336 secs 7,486,832/sec
   Log4cxx Logging enabled debug Elapsed: 3.463 secs 288,802/sec
   Log4cxx Logging enabled trace Elapsed: 3.463 secs 288,729/sec
   **************************************************************
   Benchmarking multithreaded threaded: 1000000 messages/thread, 4 threads
   **************************************************************
   Log4cxx Logging with FMT MT Elapsed: 4.469 secs 223,767/sec
   Log4cxx Logging with FMT MT Elapsed: 4.512 secs 221,653/sec
   Log4cxx Logging with FMT MT Elapsed: 4.578 secs 218,420/sec
   Log4cxx Logging with FMT MT Elapsed: 4.583 secs 218,199/sec
   **************************************************************
   Benchmarking multithreaded disabled: 1000000 messages/thread, 4 threads
   **************************************************************
   Log4cxx Logging disabled MT Elapsed: 0.1453 secs 6,883,621/sec
   Log4cxx Logging disabled MT Elapsed: 0.1457 secs 6,862,385/sec
   Log4cxx Logging disabled MT Elapsed: 0.1458 secs 6,860,196/sec
   Log4cxx Logging disabled MT Elapsed: 0.1459 secs 6,855,386/sec
   ```


-- 
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



[GitHub] [logging-log4cxx] swebb2066 commented on pull request #94: LOGCXX-546] Prevent serialization of a multi-threaded application

Posted by GitBox <gi...@apache.org>.
swebb2066 commented on pull request #94:
URL: https://github.com/apache/logging-log4cxx/pull/94#issuecomment-1003669899


   I believe this also fixes https://issues.apache.org/jira/browse/LOGCXX-532


-- 
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



[GitHub] [logging-log4cxx] swebb2066 commented on pull request #94: LOGCXX-546] Prevent serialization of a multi-threaded application

Posted by GitBox <gi...@apache.org>.
swebb2066 commented on pull request #94:
URL: https://github.com/apache/logging-log4cxx/pull/94#issuecomment-1003641406


   To determine the cost of  Logger holding a weak pointer instead of a raw pointer as in this PR, I experimently changed m_priv->repository to a std::weak_ptr. The result shows calls to isDisabled() from multiple threads are some what serialized. The per thread throughput is less half the single thread throughput. 
   
   throughputtests output with Logger holding a weak pointer:
   ```
   Benchmarking library only(no writing out):
   **************************************************************
   Benchmarking Single threaded: 1000000 messages
   **************************************************************
   Log4cxx NoFormat pattern: %m%n Elapsed: 5.001 secs 199,972/sec
   Log4cxx DateOnly pattern: [%d] %m%n Elapsed: 5 secs 200,001/sec
   Log4cxx DateClassLevel pattern: [%d] [%c] [%p] %m%n Elapsed: 5.01 secs 199,591/sec
   Log4cxx Logging with FMT Elapsed: 2.576 secs 388,129/sec
   Log4cxx Logging static string Elapsed: 3.279 secs 304,998/sec
   Log4cxx Logging static string with FMT Elapsed: 2.807 secs 356,189/sec
   Log4cxx Logging disabled debug Elapsed: 0.1941 secs 5,152,795/sec
   Log4cxx Logging disabled trace Elapsed: 0.1938 secs 5,159,546/sec
   Log4cxx Logging enabled debug Elapsed: 3.322 secs 301,064/sec
   Log4cxx Logging enabled trace Elapsed: 3.295 secs 303,469/sec
   **************************************************************
   Benchmarking multithreaded threaded: 1000000 messages/thread, 4 threads
   **************************************************************
   Log4cxx Logging with FMT MT Elapsed: 4.526 secs 220,932/sec
   Log4cxx Logging with FMT MT Elapsed: 4.553 secs 219,640/sec
   Log4cxx Logging with FMT MT Elapsed: 4.708 secs 212,424/sec
   Log4cxx Logging with FMT MT Elapsed: 4.727 secs 211,554/sec
   **************************************************************
   Benchmarking multithreaded disabled: 1000000 messages/thread, 4 threads
   **************************************************************
   Log4cxx Logging disabled MT Elapsed: 0.4405 secs 2,270,056/sec
   Log4cxx Logging disabled MT Elapsed: 0.4408 secs 2,268,693/sec
   Log4cxx Logging disabled MT Elapsed: 0.4505 secs 2,219,599/sec
   Log4cxx Logging disabled MT Elapsed: 0.4569 secs 2,188,823/sec
   ```
   
   And LOGCXX-322 is still a problem.


-- 
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



[GitHub] [logging-log4cxx] swebb2066 merged pull request #94: LOGCXX-546] Prevent serialization of a multi-threaded application

Posted by GitBox <gi...@apache.org>.
swebb2066 merged pull request #94:
URL: https://github.com/apache/logging-log4cxx/pull/94


   


-- 
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