【发布时间】:2015-11-06 10:48:56
【问题描述】:
如果 nginx 仅配置为将请求转发到 FastCGI 后端(Mono、PHP 等),而不涉及任何基于文件的缓存,那么在 nginx.conf 中使用 sendfile on 会带来任何性能提升吗?
示例 nginx.conf:
worker_processes 1;
daemon off;
events {
worker_connections 1024;
use epoll;
}
http {
sendfile on; # <-- ???
tcp_nopush on;
tcp_nodelay on;
server {
listen 80;
server_name localhost;
location / {
root /usr/aspnet/;
fastcgi_pass 127.0.0.1:9000;
include /etc/nginx/nginx-fastcgi-params.conf;
}
}
}
【问题讨论】:
-
我怀疑。但它也不会受到伤害。只是没用。