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 πŸ”—

Note

This component is included in the default configuration of the Splunk Distribution of the OpenTelemetry Collector when deploying in host monitoring (agent) mode. See Collector deployment modes for more information.

For details about the default configuration, see Configure the Collector for Kubernetes with Helm, Collector for Linux default configuration, or Collector for Windows default configuration. You can customize your configuration any time as explained in this document.

Follow these steps to configure and activate the component:

  1. Deploy the Splunk Distribution of OpenTelemetry Collector to your host or container platform:

  1. Configure the extension as described in the next section.

  2. Restart the Collector.

Sample configuration πŸ”—

To activate the component, add memory_ballast to the extensions section of your configuration file:

extensions:
  memory_ballast:

To complete the configuration, include the extension in the service section of your configuration file:

service:
  extensions: [memory_ballast]

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.

Configuration examples πŸ”—

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

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.

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 .