GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Questioning the relevance of the write buffer · Issue #342 · logfellow/logstash-logback-encoder

Questioning the relevance of the write buffer #342

New issue
Copy link
New issue
Copy link
Closed
Closed
Questioning the relevance of the write buffer#342
Copy link
Milestone
6.2

Description

@brenuart
brenuart
opened on Jun 25, 2019
Issue body actions

As far as I know, a TCP output stream is already buffered "by nature". I mean the TCP stack itself has its own buffers (transmit window or else).

Adding another buffer on top of the stack increases the memory consumption (slightly) but also increase the amount of data lost when a connection is abruptly interrupted.

We set the buffer size to 0 since a while and did not notice any performance penalty.
I'm just wondering if that feature should stay and whether it has any positive benefit.

What do you think?

Activity

  1. philsttr commented on Jul 18, 2019

    @philsttr
    philsttr
    on Jul 18, 2019
    Collaborator
    More actions

    I'm hesitant to totally remove the ability to buffer the output stream mainly because I don't have profiling data for every environment. There could be certain environments where buffering provides a better experience. From just googling around, it seems there are a lot of opinions on buffering socket output streams, but no strong consensus.

    On the other hand, I am open to changing the default to be unbuffered. But I'm also hesitant to do that since the buffer has existed since the TCP appender was created, and I don't have any concrete performance data for any environment.

  2. brenuart commented on Jul 18, 2019

    @brenuart
    brenuart
    on Jul 18, 2019
    CollaboratorAuthor
    More actions

    I understand. For your information we are running the appender on MacOS, Windows, Linux and Docker with the buffer set to 0 without any issue.
    I'm just concerned about the amount of data that may be lost when a connection is lost and the write buffer doesn't help...
    One could also argue that flushing the TCP output stream is not required and is actually a noop since there is no way to actually force the TCP stack to send the data currently in its buffers.

    Anyway, feel free to close this issue or add a note about it in the documentation ;-)

  3. philsttr
    closed this as completedin 5c24afcon Sep 7, 2019
  4. philsttr
    added this to the 6.2 milestone on Sep 8, 2019
  5. shonzilla
    added a commit that references this issue on Apr 4, 2025

    Fixes logfellow#342. Clarified advantages/disadvantages of disabling …

    This issue will close once commit 5c24afc is merged into the 'master' branch.
    5c24afc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      • 6.2

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.