大概如下

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文件

 Nginx 架构 性能优化 - 文件句柄

 

worker_rlimit_nofile 35535;  进程的句柄数

对于小站点1W 足够了

 

 use epoll

 

相关文章:

  • 2021-10-14
  • 2021-06-01
  • 2021-12-16
  • 2021-12-08
猜你喜欢
  • 2021-12-29
  • 2022-03-14
  • 2021-08-13
  • 2021-05-24
  • 2021-12-16
  • 2022-12-23
  • 2021-08-05
相关资源
相似解决方案