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
- Install the gperftools-libs package.
1yum install gperftools-libs
- Configure LD_PRELOAD before starting Nginx.
export LD_PRELOAD=/usr/lib64/libtcmalloc.so.4
Parent topic: OS Tuning