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

Buffer zngio.scanner.workerCh for more concurrency #5103

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

nwt
Copy link
Member

@nwt nwt commented Apr 5, 2024

Tracing with package runtime/trace shows the scanner.start and worker.run goroutines block frequently on the workerCh channel. Add buffering to workerCH to reduce blocking and increase concurrency.

When scanning a 4 GB ZNG file containing Zeek logs, this yields a 1.1X speedup on my 10-core machine.

Tracing with package runtime/trace shows the scanner.start and
worker.run goroutines block frequently on the workerCh channel.  Add
buffering to workerCH to reduce blocking and increase concurrency.

When scanning a 4 GB ZNG file containing Zeek logs, this yields a 1.1X
speedup on my 10-core machine.
@nwt nwt requested a review from a team April 5, 2024 22:31
Copy link
Collaborator

@mattnibs mattnibs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💥

@nwt nwt merged commit d3fef6d into main Apr 5, 2024
3 checks passed
@nwt nwt deleted the zng-scanner-workerCh-buffer branch April 5, 2024 22:48
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