---
title: Collector Memory Limits
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > OpenTelemetry in Datadog > OpenTelemetry Configuration > Collector
  Memory Limits
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Collector Memory Limits

## Overview{% #overview %}

The recommended Collector configuration uses the exporter's sending queue for batching and does not include the batch processor.

For production deployments, configure the [memory limiter processor](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterprocessor) to limit the memory the OpenTelemetry Collector uses.

## Setup{% #setup %}

Add `memory_limiter` to the `processors` list for each pipeline in your configuration. Place it first in the list so that it applies backpressure before other processors allocate memory.

Memory limits depend on the memory available to the Collector, so there is no single recommended YAML configuration. Size the limit for your deployment and keep it below the process or container memory limit. Total process memory can exceed the configured limit, so leave headroom.

For the available options and sizing guidance, see the OpenTelemetry project documentation for the [memory limiter processor](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterprocessor).

## Example logging output{% #example-logging-output %}

```
2023-12-05T09:52:58.568Z	warn	memorylimiterprocessor@v0.90.1/memorylimiter.go:276	
Memory usage is above hard limit. Forcing a GC.	
{"kind": "processor", "name": "memory_limiter", "pipeline": "traces", "cur_mem_mib": 44}
2023-12-05T09:52:58.590Z	info	memorylimiterprocessor@v0.90.1/memorylimiter.go:266	
Memory usage after GC.	
{"kind": "processor", "name": "memory_limiter", "pipeline": "traces", "cur_mem_mib": 34}
```
