Docs » Get started with the Splunk Distribution of the OpenTelemetry Collector » Collector components » Memory Ballast extension

Memory Ballast extension ๐Ÿ”—

The Memory Ballast extension enables applications to configure memory ballast for processing.

Get started ๐Ÿ”—

You can configure the following settings for the extension:

  • size_mib. The memory ballast size, in MiB.

    • 0 by default.

    • Takes higher priority than size_in_percentage if both are specified at the same time.

  • size_in_percentage. Sets the memory ballast based on the total memory in percentage.

    • 0 by default.

    • The value can range from 1 to 100.

    • Supported in both containerized (Docker, Kubernetes) and physical host environments.

Calculate the ballastโ€™s size as a percentage ๐Ÿ”—

When size_in_percentage is enabled, the value for ballast_size is calculated as follows.

On the target host or container, check the value in memory.limit_in_bytes to learn if thereโ€™s any memory limitation for the running Collector process. Memory files are stores in paths such as /sys/fs/cgroup/memory/memory.limit_in_bytes.

  • If memory.limit_in_bytes is a positive value other than 9223372036854771712 (0x7FFFFFFFFFFFF000), the value for ballast_size is calculated with the formula

    ballast_size = size_in_percentage * memory.limit_in_bytes / 100

  • If memory.limit_in_bytes is 9223372036854771712 (0x7FFFFFFFFFFFF000), no memory limit has been set for the Collector process or the running container in cgroup, and the value for ballast_size is calculated with the formula

    ballast_size = size_in_percentage * totalMemory / 100

    where totalMemory is calculated by github.com/shirou/gopsutil/v3/mem on mem.VirtualMemory().total.

Sample configurations ๐Ÿ”—

This configuration uses 64 Mib of memory for the ballast:

extensions:
  memory_ballast:
    size_mib: 64

This configuration uses 20% of the total memory for the ballast:

extensions:
  memory_ballast:
    size_in_percentage: 20

Settings ๐Ÿ”—

The following table shows the configuration options for the Memory Ballast extension:

Troubleshooting ๐Ÿ”—

If you are a Splunk Observability Cloud customer and are not able to see your data in Splunk Observability Cloud, you can get help in the following ways.

Available to Splunk Observability Cloud customers

Available to prospective customers and free trial users

  • Ask a question and get answers through community support at Splunk Answers .

  • Join the Splunk #observability user group Slack channel to communicate with customers, partners, and Splunk employees worldwide. To join, see Chat groups in the Get Started with Splunk Community manual.

To learn about even more support options, see Splunk Customer Success .