You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/12/11 01:00:18 UTC

[GitHub] [pulsar] lhotari opened a new pull request #8908: Fix performance issue caused by invalid logging configuration

lhotari opened a new pull request #8908:
URL: https://github.com/apache/pulsar/pull/8908


   ### Motivation
   
   Profiling a 3 node Pulsar cluster running with 2.7.0 version showed allocation hotspots in `log.debug` methods. This indicated that the root logger level was set to debug.
   
   ### Modifications
   
   - Configure the root log level in `bin/pulsar` startup script to
     use `info` level by default. This can be done by setting
     the `pulsar.log.root.level` system property.
   
   - since the root log level was debug, all code blocks within
     `log.isDebugEnabled()` got executed.
     This caused a lot of unnecessary memory allocations and wasted CPU cycles.
   


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

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



[GitHub] [pulsar] lhotari edited a comment on pull request #8908: Fix performance issue caused by invalid logging configuration

Posted by GitBox <gi...@apache.org>.
lhotari edited a comment on pull request #8908:
URL: https://github.com/apache/pulsar/pull/8908#issuecomment-742900242


   Here's an allocation flamegraph for `ManagedLedgerImpl.asyncReadEntries` method.
   
   Pulsar 2.7.0, a lot of logging calls are present:
   
   ![image](https://user-images.githubusercontent.com/66864/101848249-ab7c9d00-3b5d-11eb-89a4-ffb2e16de04d.png)
   
   After applying this fix (the logging calls are gone):
   
   ![image](https://user-images.githubusercontent.com/66864/101848375-fc8c9100-3b5d-11eb-894b-c96598180dda.png)
   


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

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



[GitHub] [pulsar] lhotari edited a comment on pull request #8908: Fix performance issue caused by invalid logging configuration

Posted by GitBox <gi...@apache.org>.
lhotari edited a comment on pull request #8908:
URL: https://github.com/apache/pulsar/pull/8908#issuecomment-742900242


   Here's an allocation flamegraph for `ManagedLedgerImpl.asyncReadEntries` method.
   
   Pulsar 2.7.0, a lot of logging calls are present:
   
   ![image](https://user-images.githubusercontent.com/66864/101848249-ab7c9d00-3b5d-11eb-89a4-ffb2e16de04d.png)
   
   After applying this fix, the logging calls are gone:
   
   ![image](https://user-images.githubusercontent.com/66864/101848375-fc8c9100-3b5d-11eb-894b-c96598180dda.png)
   


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

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



[GitHub] [pulsar] lhotari commented on pull request #8908: Fix performance issue caused by invalid logging configuration

Posted by GitBox <gi...@apache.org>.
lhotari commented on pull request #8908:
URL: https://github.com/apache/pulsar/pull/8908#issuecomment-742978840


   /pulsarbot run-failure-checks


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

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



[GitHub] [pulsar] lhotari commented on pull request #8908: Fix performance issue caused by invalid logging configuration

Posted by GitBox <gi...@apache.org>.
lhotari commented on pull request #8908:
URL: https://github.com/apache/pulsar/pull/8908#issuecomment-742900242


   
   Here's an allocation flamegraph for `ManagedLedgerImpl.asyncReadEntries` method.
   
   Before (Pulsar 2.7.0), a lot of logging calls are present:
   
   ![image](https://user-images.githubusercontent.com/66864/101848249-ab7c9d00-3b5d-11eb-89a4-ffb2e16de04d.png)
   
   After applying this fix (the logging calls are gone):
   
   ![image](https://user-images.githubusercontent.com/66864/101848375-fc8c9100-3b5d-11eb-894b-c96598180dda.png)
   


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

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



[GitHub] [pulsar] lhotari commented on pull request #8908: Fix performance issue caused by invalid logging configuration

Posted by GitBox <gi...@apache.org>.
lhotari commented on pull request #8908:
URL: https://github.com/apache/pulsar/pull/8908#issuecomment-742900920


   /pulsarbot run-failure-checks


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

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



[GitHub] [pulsar] sijie merged pull request #8908: Fix performance issue caused by invalid logging configuration

Posted by GitBox <gi...@apache.org>.
sijie merged pull request #8908:
URL: https://github.com/apache/pulsar/pull/8908


   


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

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



[GitHub] [pulsar] lhotari commented on pull request #8908: Fix performance issue caused by invalid logging configuration

Posted by GitBox <gi...@apache.org>.
lhotari commented on pull request #8908:
URL: https://github.com/apache/pulsar/pull/8908#issuecomment-744043773


   Related to log4j2 configuration and performance optimizations, there's a separate pull request to enable Log4j2's Garbage Free logging mode: #8944 . The Garbage Free logging mode hasn't been used by now. PR #8944 will fix this and enable Log4j2's Garbage Free logging mode.


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

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



[GitHub] [pulsar] lhotari commented on pull request #8908: Fix performance issue caused by invalid logging configuration

Posted by GitBox <gi...@apache.org>.
lhotari commented on pull request #8908:
URL: https://github.com/apache/pulsar/pull/8908#issuecomment-743909553


   This fix would be needed on branch-2.6 . There's a reported issue #8875 about excessive GC


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

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