Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rec-4.1.x: Reduce systemcall usage in protobuf logging #7430

Merged
merged 2 commits into from Jan 30, 2019

Commits on Jan 29, 2019

  1. Reduce systemcall usage in protobuf logging

    Since Spectre/Meltdown, system calls have become more expensive.  In
    addition, relevant versions of glibc turn out to implement pthread_cond_wait
    and pthread_cond_signal in such a way that they use multiple system calls always.
    There is an optimization in glibc to improve this but it is disabled.
    
    This new setup changes our protobuf logging so it amortizes system calls so we perform
    far less than one call per message.
    
    Note that our previous RemoteLogger was configured in terms of how many
    *messages* it would buffer. Our new code is configured in terms of how many
    *bytes*. I have multiplied the configured numbers by 100 elsewhere (recursor
    config, dnsdist config) to sort of maintain parity.
    
    In addition, the old RemoteLogger would buffer messages while there was no
    connection available. We no longer do this.
    
    Finally new, every 'reconnectTimeout' seconds we will flush our buffers
    opportunistically to not keep people waiting.
    ahupowerdns authored and rgacogne committed Jan 29, 2019
    Copy the full SHA
    e4a9fbb View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    c32ea3c View commit details
    Browse the repository at this point in the history