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

Introduces expert only event loop thread count setting. #490

Merged

Conversation

mashhurs
Copy link
Contributor

@mashhurs mashhurs commented Jan 6, 2024

Description

By default, netty event loop creates available_processors * 2 thread count. This may sometimes lead a resource problem, especially when multiple beats-input pipelines are defined in a single machine.
This PR introduces a configuration to limit a number of threads for netty event loop threads.

How to locally test

  • unfortunately I couldn't find a better way to add a unit test for this feature
  • pull the change and run pipeline with following config
  • connect, reconnect multiple times the client to the downstream beats-input.
  • check the threads (with thread dump tools or ls diagnostics tool) that two (or defined) threads will created for netty event loop named as nioEventLoopGroup-M-N
input {
    beats {
        codec => json
        port => 5001
        event_loop_threads => 2
        executor_threads => 2
    }
}
output {
    stdout { codec => rubydebug }
}
image

@mashhurs mashhurs self-assigned this Jan 6, 2024
@mashhurs mashhurs linked an issue Jan 6, 2024 that may be closed by this pull request
@mashhurs mashhurs requested a review from robbavey January 6, 2024 03:13
@mashhurs mashhurs marked this pull request as ready for review January 6, 2024 03:13
Copy link
Contributor

@robbavey robbavey left a comment

Choose a reason for hiding this comment

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

Code LGTM, some doc changes requested

docs/index.asciidoc Show resolved Hide resolved
docs/index.asciidoc Outdated Show resolved Hide resolved
Docs updated based on review.

Co-authored-by: Rob Bavey <[email protected]>
Copy link
Contributor

@robbavey robbavey left a comment

Choose a reason for hiding this comment

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

LGTM

@mashhurs mashhurs merged commit 4c6fd82 into logstash-plugins:main Jan 23, 2024
2 checks passed
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.

Add configuration setting for NioEventLoopGroup threads
3 participants