Nginx 架构 性能优化

大概如下

1:文件句柄  可以理解为文件的索引

2: 设置方式

    系统修改 /etc/security/limits.conf

root soft nofile 65535
root hard nofile 65535
*    soft nofile 65535
*    hard nofile 65535

  正常情况1W的数量就很大了,  root 表示用户, soft 表示应用,可修改为

root soft nofile 65535
root hard nofile 65535
*    soft nofile 25535
*    hard nofile 25535

  Nginx针对进程的句柄数限制,修改.conf文件

 

worker_rlimit_nofile 35535;  进程的句柄数

对于小站点1W 足够了

 use epoll

原文地址:https://www.cnblogs.com/eason-d/p/11238363.html