五分钟进步系列之nginx-worker-processes

简介: 五分钟进步系列之nginx-worker-processes

学习方式:

  1. 先读英文的原版,如果你能看懂就可以到此为止的了。
  2. 如果你看不懂,可以再看一下我给的较高难度的英文单词的翻译。
  3. 如果还是看不懂可以去最下面看我翻译的汉语。


今天我们聊聊nginx的worker-processes参数:

640.png


一、英文原版



640.png


Defines the number of worker processes.

The optimal value depends on many factors including (but not limited to) the number of CPU cores, the number of hard disk drives that store data, and load pattern. When one is in doubt, setting it to the number of available CPU cores would be a good start (the value “auto” will try to autodetect it).

640.png


二、重点词汇的翻译



optimal:  最佳


depends:  取决于


doubt:质疑


三、中文



这个是用来定义工作进程数的

他的最佳值取决于很多因素包括(但不限于)CPU核数,硬盘数量,和启动方式,当你有任何质疑的时候,把这个参数设置成CPU核数是个不错的选择(如果设置成“auto”nginx将会自己获取这个数值)


四、总结



这个值一般波哥是用auto,因为在实际生产中,我们的服务器有可能规格不太一样。而我们的部署脚本或者工具都群控的。所以基本上都保持尽量兼容性比较高的参数。


相关文章
|
应用服务中间件 Linux 开发工具
CentOS7下启动Nginx出现Failed to start nginx.service:unit not found
CentOS7下启动Nginx出现Failed to start nginx.service:unit not found
3280 0
CentOS7下启动Nginx出现Failed to start nginx.service:unit not found
|
2月前
|
存储 应用服务中间件 nginx
【各种问题处理】nginx报错nginx: [error] open() “/run/nginx.pid” failed (2: No such file or directory)
【1月更文挑战第13天】【各种问题处理】nginx报错nginx: [error] open() “/run/nginx.pid” failed (2: No such file or directory)
|
应用服务中间件 nginx
nginx启动无反应
nginx启动无反应
|
应用服务中间件 nginx
解决启动nginx的nginx.pid错误
启动Nginx报错: nginx: [error] open() “/usr/local/nginx/logs/nginx.pid” failed (2: No such file or directory) [root@VM_16_6_centos sbin]# .
1374 0
|
应用服务中间件 nginx
运行sudo service nginx restart,报错* Restarting nginx nginx[fail],启动不了nginx,启动nginx报错
运行sudo service nginx restart,报错* Restarting nginx nginx[fail],启动不了nginx,启动nginx报错
306 0
|
应用服务中间件 nginx
重启nginx报错:nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed
重启nginx报错:nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed
390 0
|
应用服务中间件 nginx
解决 openresty Nginx 重启报错问题 nginx: [error] open() “/usr/local/openresty/nginx/logs/nginx.pid“ fa
解决 openresty Nginx 重启报错问题 nginx: [error] open() “/usr/local/openresty/nginx/logs/nginx.pid“ fa
801 0
解决 openresty Nginx 重启报错问题 nginx: [error] open() “/usr/local/openresty/nginx/logs/nginx.pid“ fa
|
应用服务中间件 nginx
解决 openresty Nginx 重启报错问题 nginx: [error] open() “/usr/local/openresty/nginx/logs/nginx.pid“ fa
解决 openresty Nginx 重启报错问题 nginx: [error] open() “/usr/local/openresty/nginx/logs/nginx.pid“ fa
499 0
解决 openresty Nginx 重启报错问题 nginx: [error] open() “/usr/local/openresty/nginx/logs/nginx.pid“ fa
|
安全 Java 应用服务中间件
Nginx Unit详解系列(一)
版权声明:本文为博主chszs的原创文章,未经博主允许不得转载。 https://blog.csdn.net/chszs/article/details/79980756 Nginx Unit详解系列(一) 2018.4.17 版权声明:本文为博主chszs的原创文章,未经博主允许不得转载。
3450 0