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

perf: add async log writer #3953

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

perf: add async log writer #3953

wants to merge 2 commits into from

Conversation

kolesnikovae
Copy link
Collaborator

@kolesnikovae kolesnikovae commented Feb 26, 2025

The PR adds asynchronous log writer.

Recently implemented buffered logged (#3947) does not address the issue with blocking log writes:

image

The implementation we use flushes the buffer synchronously, blocking all callers. To address the problem, we should use asynchronous writer. The implementation in the PR implements a queue that is processed in background:

  • when the queue is full, new writes are discarded.
  • by default, the queue is large enough to store 20K messages or 5MB.
  • errors are ignored since we can't do anything if stderr is not available (which is the cause of errors).

@kolesnikovae kolesnikovae marked this pull request as ready for review February 26, 2025 14:01
@kolesnikovae kolesnikovae requested a review from a team as a code owner February 26, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants