Skip to content

WASM filter has significant CPU overhead #7112

Description

@woehrl01

Bug Report

Describe the bug

I'm using a WASM filter which does nothing than returning the logs. I'm using the dummy input with a rate 25 to test. The overhead is significant:

Wasm filter disabled:
Bildschirm­foto 2023-04-04 um 00 56 45

Wasm filter enabled:
Bildschirm­foto 2023-04-04 um 00 56 22

I believe this is because the WASM filter gets recreated for every line, instead of reusing it.

To Reproduce

  • Rubular link if applicable:
  • Example log message if applicable:
{"log":"YOUR LOG MESSAGE HERE","stream":"stdout","time":"2018-06-11T14:37:30.681701731Z"}
  • Steps to reproduce the problem:

Expected behavior

Screenshots

Your Environment

  • Version used: 2.0
  • Configuration:
  • Environment name and version (e.g. Kubernetes? What version?):
  • Server type and version:
  • Operating System and version:
  • Filters and plugins: custom wasm filter

Additional context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions