Skip to content

Agent memory optimization #10056

@tgraf

Description

@tgraf

Summary

The memory consumption of the agent has not been fully optimized yet. Optimization of the memory footprint has been a frequent user ask.

Details

The memory consumption consists of:

  • Direct memory consumption of the cilium-agent
  • Peak memory allocation of the agent with delayed release of the Go runtime
  • Maximum memory usage of all components running inside the Cilium pod at once, potentially exceeding the configured memory limit of the pod. (agent + health endpoints + Envoy + client invocations)
  • eBPF map usage

Tasks

  • Trace total memory consumpion on entire system
  • Profile & reduce the agent memory consumption
  • Profile & reduce the memory consumption of secondary components
  • Profile the eBPF map memory consumption
    • Consider changing default sizes of maps
    • Consider resizing cilium_metrics eBPF map (currently 64K)
    • Research what looks to be an invalid global cilium_policy map (should be endpoint specific)
  • Binary size reduction (Reduce the golang binary size #6099)

Metadata

Metadata

Assignees

Labels

kind/enhancementThis would improve or streamline existing functionality.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions