[logback-dev] [JIRA] Issue Comment Edited: (LBCLASSIC-153) Excessive synchronization in ReconfigureOnChangeFilter.decide

Ralph Goers (JIRA) noreply-jira at qos.ch
Thu Sep 24 10:07:44 CEST 2009


    [ http://jira.qos.ch/browse/LBCLASSIC-153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11315#action_11315 ] 

Ralph Goers edited comment on LBCLASSIC-153 at 9/24/09 10:06 AM:
-----------------------------------------------------------------

On the top you will see that 4% of the overall CPU time is spent while holding the lock for LoggerContext (61,895 ms). The bottom window just shows how it was called.

A way to solve this issue as well as LBCLASSIC-154 would be to change the TurboFilter to have a Timer and TimerTask that periodically wakes up and checks the file timestamp. If it is newer then it calls reconfigure while holding a write lock. The turbo filter would only acquire the read lock and then immediately release it so that logging will block when a reconfigure occurs. While no reconfiguration is taking place threads would not block at all on the read lock.

      was (Author: rgoers at apache.org):
    On the top you will see that 4% of the overall CPU time is spent while holding the lock for LoggerContext (61,895 ms). The bottom window just shows how it was called.
  
> Excessive synchronization in ReconfigureOnChangeFilter.decide
> -------------------------------------------------------------
>
>                 Key: LBCLASSIC-153
>                 URL: http://jira.qos.ch/browse/LBCLASSIC-153
>             Project: logback-classic
>          Issue Type: Bug
>    Affects Versions: 0.917
>            Reporter: Anders Wallgren
>            Assignee: Ceki Gulcu
>         Attachments: screenshot-1.jpg
>
>
> The synchronization in ReconfigureOnChangeFilter.decide hurts scalability.
> It seems unnecessary to serialize the code in changeDetected -- it should be possible to use atomic updates of nextCheck and lastModified and only serialize the actual reconfiguration.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the logback-dev mailing list