Uploaded image for project: 'Log4cxx'
  1. Log4cxx
  2. LOGCXX-58

ImmediateFlush'd FileAppenders extremely slow on Windows

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.0
    • Component/s: Appender
    • Labels:
      None

      Description

      Early APR-based versions of FileAppender (1.13-1.19) called apr_file_flush() after each log request if immediateFlush was set to true. On Unix platforms, the call is a no-op on unbuffered files, however on Windows it is a call to FileFlushBuffers which can be extraordinarily expensive. So much so that the affected benchmarks were 100x slower on Windows than Linux.

      I logged the issue as an APR bug (http://issues.apache.org/bugzilla/show_bug.cgi?id=33485) and have removed the call to apr_file_flush in the FileAppender. This in effectively causes the immediateFlush attribute to be ignored.

        Attachments

          Activity

            People

            • Assignee:
              carnold@apache.org Curt Arnold
              Reporter:
              carnold@apache.org Curt Arnold
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: