Rate This Document
Findability
Accuracy
Completeness
Readability

Tuning malloc

Purpose

The test result shows that the malloc hotspot is high. TCMalloc is more suitable for the current scenario than glibc malloc.

Procedure

  1. Install the gperftools-libs package.
    1
    yum install gperftools-libs
    
  2. Configure LD_PRELOAD before starting Nginx.
    export LD_PRELOAD=/usr/lib64/libtcmalloc.so.4