1、编译nginx之前修改模式,取消debug模式
auto/cc/gcc 文件下删除 CFLAGS="$CFLAGS -g"
2、为特定CPU编译
![9967595-1da8e1b5398ac7d4.png](https://upload-images.jianshu.io/upload_images/9967595-1da8e1b5398ac7d4.png)
image.png
3、利用TCMalloc优化nginx性能
![9967595-093843b6309e1d8f.png](https://upload-images.jianshu.io/upload_images/9967595-093843b6309e1d8f.png)
image.png
![9967595-25c87e7e86833b47.png](https://upload-images.jianshu.io/upload_images/9967595-25c87e7e86833b47.png)
image.png
4、服务器内核参数优化
![9967595-d3d73f6378745699.png](https://upload-images.jianshu.io/upload_images/9967595-d3d73f6378745699.png)
image.png
1、编译nginx之前修改模式,取消debug模式
auto/cc/gcc 文件下删除 CFLAGS="$CFLAGS -g"
2、为特定CPU编译
3、利用TCMalloc优化nginx性能