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

Use CPU count to calculate default no. of buffer processors #17737

Merged
merged 8 commits into from Jan 11, 2024

Conversation

thll
Copy link
Contributor

@thll thll commented Dec 18, 2023

Calculate default values for process-buffer and output-buffer processors based on the number of CPU cores available to the JVM.

The new defaults will be calculated as illustrated by this graph:

image

(Highlighted rows represent the predetermined values from #17450.

Fixes #17450

If the number of detected cores is not correct, there are several ways to address that:

  • Adding -XX:ActiveProcessorCount as a JVM argument, e.g. -XX:ActiveProcessorCount=2
  • For docker, running with the --cpus flag, e.g --cpus=2

TODO:

  • After merging this, check if the Forwarder needs adjustments

@thll thll marked this pull request as ready for review December 19, 2023 08:58
@thll thll requested review from bernd and mpfz0r December 19, 2023 08:58
Copy link
Member

@mpfz0r mpfz0r left a comment

Choose a reason for hiding this comment

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

LGTM.
We have quite a few places where we set these defaults.
https://github.com/search?q=org%3AGraylog2%20processbuffer_processors&type=code

We need to check and potentially remove those

@thll thll requested a review from bernd January 8, 2024 10:25
Copy link
Member

@bernd bernd left a comment

Choose a reason for hiding this comment

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

Thanks for the update! I have one small comment regarding the changelog. The rest looks good! 👍

changelog/unreleased/issue-17450.toml Outdated Show resolved Hide resolved
Co-authored-by: Bernd Ahlers <bernd@users.noreply.github.com>
@thll thll requested a review from bernd January 11, 2024 10:48
@thll thll merged commit 83a876a into master Jan 11, 2024
5 checks passed
@thll thll deleted the add/dynamic-number-of-buffer-processors branch January 11, 2024 13:51
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.

Change default thread buffer config
3 participants