zhendeaini123 发表于 2018-11-11 12:37:18

gperftools优化nginx(内存)

#vim /data/apps/nginx/conf/nginx.conf  
在#pid logs/nginx.pid;增加
  
google_perftools_profiles /data/temp/tcmalloc/;
  

  
#service nginx reload
  

  
#lsof -n |grep tcmalloc
  
#lsof -i tcp:80
  
COMMAND   PID    USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
  
nginx   20119    root    6uIPv4 425316      0t0TCP *:http (LISTEN)
  
nginx   20120 website    6uIPv4 425316      0t0TCP *:http (LISTEN)
  
nginx   20121 website    6uIPv4 425316      0t0TCP *:http (LISTEN)
  
nginx   20122 website    6uIPv4 425316      0t0TCP *:http (LISTEN)
  
nginx   20123 website    6uIPv4 425316      0t0TCP *:http (LISTEN)


页: [1]
查看完整版本: gperftools优化nginx(内存)