How to reduce glibc arena size to reduce application memory consumption?

Solution Verified - Updated -

Issue

  • How to reduce the memory consumption of processes in the containerized environment?
  • How to reduce arena size to application memory consumption?
  • How to use malloc_trim(0) properly ?
  • We usually run the below command to free the memory to the os .
gdb --batch-silent --eval-command 'print (int)malloc_trim(0)' -p $PID
  • Containerised application is getting oom killed by Kubernetes due to high memory consumption

Environment

  • Red Hat Enterprise Linux 8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content