Skip to content

Fix memory usage #119

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

Merged
merged 1 commit into from
Feb 28, 2025
Merged

Conversation

Watson1978
Copy link
Contributor

@Watson1978 Watson1978 commented Feb 28, 2025

This should fix fluent/fluentd#3401

To reduce memory usage,
this uses a feature added by ledbettj/systemd-journal#103

Result

chart

conf

<source>
  @type systemd
  tag systemd
  path /var/log/journal
  read_from_head true

  <entry>
    fields_strip_underscores true
    fields_lowercase true
  </entry>

  @label @OUTPUT
</source>

<label @OUTPUT>
  <match **>
    @type file
    path /var/log/fluentd-output
    compress gzip
    <buffer>
      timekey 1d
      timekey_use_utc true
      timekey_wait 10m
    </buffer>
  </match>
</label>

systemd journal generator

msg = "a" * 120 * 1024

loop do
  system("logger '#{msg}'")
end

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
@Watson1978 Watson1978 marked this pull request as ready for review February 28, 2025 01:04
Copy link
Contributor

@kenhys kenhys left a comment

Choose a reason for hiding this comment

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

LGTM.

@kenhys kenhys merged commit c3dfe17 into fluent-plugins-nursery:master Feb 28, 2025
6 checks passed
@Watson1978 Watson1978 deleted the fix-memory-usage branch February 28, 2025 01:21
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.

Memory leak
2 participants