Skip to main content

OTEL-073: memory_limiter ballast_size_mib (deprecated, use GOMEMLIMIT)

Severity: warn (advisory)

Rule Details

The ballast_size_mib knob on memory_limiter was a Go GC workaround for a problem that Go 1.19+ solved with the GOMEMLIMIT environment variable. Using ballast_size_mib now runs the workaround and the new solution side by side, which makes GC behavior harder to reason about. Remove the field from the processor config and set GOMEMLIMIT on the process.

This rule fires when a memory_limiter processor has ballast_size_mib set.

Options

This rule has no options.

Examples

Avoid
processors:
memory_limiter:
check_interval: 5s
limit_percentage: 80
ballast_size_mib: 256 # deprecated
Prefer
# remove ballast_size_mib and set GOMEMLIMIT on the process:
# env:
# GOMEMLIMIT: 1GiB
processors:
memory_limiter:
check_interval: 5s
limit_percentage: 80
spike_limit_percentage: 25

When Not To Use It

Collectors running on Go versions older than 1.19 where GOMEMLIMIT is not available. In that case, upgrade Go.

  • OTEL-001memory_limiter processor must be configured
  • OTEL-061memory_ballast extension deprecated

Version

Available since augur v0.1.0.

Further Reading

Resources