Skip to content

ST: Optimize CPU/memory use for OM1.0 Text CT/ST parsing (st-storage and created-timestamp-zero-ingestion features) #14823

@bwplotka

Description

@bwplotka

Proposal

As observed accidently on main and without any feature flag we use a lot of memory for CreatedTimestamp call for OM text. This is .due to deep coping of parser on every CreatedTimestamp, so technically per every series (!). This was a known naive implementation we decided to accept when iterating on this feature in #14356

This issue is to minimize that memory use. We already discussed this, but to put it here:

  • We should see if we can reuse existing parser (not copy it).
  • If we have to copy, copy once and reuse a second parser (e.g. reset it's positions).

IMPORTANT: This is only relevant to OpenMetrics 1.0. We designed OM 2 to not have that problem.

Acceptance Criteria

  • The additional memory use per OM Text scrape with CT feature is minimal (~within +5% max)

Related to #14217

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