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: Limit tokens per pattern to 128 #13376

Merged
merged 6 commits into from
Jul 3, 2024

Conversation

benclive
Copy link
Contributor

@benclive benclive commented Jul 2, 2024

What this PR does / why we need it:

  • Limits the number of tokens generated per log-line for use in pattern detection
  • Some log lines are extremely long, which generate very specific patterns & use a lot of memory to store.
  • The patterns themselves aren't useful as they are so specific, so here the number of tokens is limited to 128.
    • Based on testing, this is ~p95 of patterns so the majority of patterns are unaffected.
  • Also took the opportunity to use append instead of direct assignment, as it's easier to read.

With this change, the pattern-ingester component OOMs significantly less than before:
image

@benclive benclive requested a review from a team as a code owner July 2, 2024 10:40
@benclive benclive requested a review from cyriltovena July 2, 2024 10:40
@cyriltovena cyriltovena merged commit a1efafd into main Jul 3, 2024
61 checks passed
@cyriltovena cyriltovena deleted the benclive/limit-tokens-per-line-patterns branch July 3, 2024 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants