Otel Collector Process Has Very High CPU Usage
search cancel

Otel Collector Process Has Very High CPU Usage

book

Article ID: 437452

calendar_today

Updated On:

Products

VMware Tanzu Application Service VMware Tanzu Platform - Cloud Foundry VMware Tanzu Platform - Kubernetes VMware Tanzu Platform Core VMware Tanzu Platform - TAP VMware Tanzu Platform - SaaS Components

Issue/Introduction

In the 'top' command output or in other monitoring tools, you may see the otel-collector process using excessive CPU. This may cause application issues if it is happening on Diego Cells.

Environment

Elastic Application Runtime

Cause

This is caused by otel-collector hitting the 512mb memory limit. When the process gets close to the memory limit, garbage collection will cause the CPU usage to increase.

Resolution

The memory limit will be increased to 768mb in versions 10.2.10+, 10.3.7+, and 10.4.0+ and later.

Alternatively, you can try the below options to reduce the memory and CPU usage of the otel-collector

  • Follow the steps to Identify Noisy Apps and lower their logging rate / number of metrics
  • Add the following memory_limiter config in Opsman UI -> TAS Tile -> System Logging/OTEL -> OpenTelemetry Collector Configuration - Metrics, Application Logs and Traces 
    processors:
      memory_limiter:
        check_interval: 5s
        limit_mib: <MEMORY_LIMIT>
        spike_limit_mib: 150
      batch:
        send_batch_size: 8192
        timeout: 5s
    service:
      pipelines:
        metrics:
          processors: [memory_limiter, batch]

    Replace <MEMORY_LIMIT> with the desired memory limit. It should be lower than the limit for the otel-collector process
    For tanzu-otel-collector v0.11.25 or earlier, try limit_mib: 300
    For tanzu-otel-collector v0.11.26 or later, try limit_mib: 500