zoukankan      html  css  js  c++  java
  • nginx 几个参数

    worker_processes :

    When set to 'auto', which is also the default behavior, Tengine will create the same number of worker processes as your CPUs.

    worker_cpu_affinity:
    When set to 'auto', Tengine will automatically bind each worker process to a specific CPU. If the number of worker processes is larger than the number of your CPUs, then the rest of worker processes will be bond in descendant order. For example, if there are 8 CPUs in your system:

     worker_rlimit_nofile:

    每个nginx进程打开文件描述符最大数目 配置要和系统的单进程打开文件数一致,linux 2.6内核下开启文件打开数为65535,worker_rlimit_nofile就相应应该填写65535

    use epoll

    Nginx使用了最新的epoll(Linux 2.6内核)和kqueue(freebsd)网络I/O模

    型,而Apache则使用的是传统的select模型。
    处理大量的连接的读写,Apache所采用的select网络I/O模型非常低效。
    在高并发服务器中,轮询I/O是最耗时间的操作 目前Linux下能够承受高并发

    访问的Squid、Memcached都采用的是epoll网络I/O模型。

    worker_connections 65535;
    每个工作进程允许最大的同时连接数  (Maxclient = work_processes * worker_connections)

    client_header_buffer_size 16k
    large_client_header_buffers 4 32k

    客户请求头缓冲大小 
    nginx默认会用client_header_buffer_size这个buffer来读取header值,如果header过大,它会使用large_client_header_buffers来读取

     

  • 相关阅读:
    UnQLite简介
    .net中webconfig自定义配置
    webservice有关application/xop+xml的异常
    .NET4缓存过期策略摘录
    关于sea.js的笔记
    npm笔记和bower
    使用npm安装一些包失败了的看过来(npm国内镜像介绍)
    easyui的datagird动态设置当前页数
    Oracle中Merge into用法总结
    Oracle 12.1.0.2 对JSON的支持
  • 原文地址:https://www.cnblogs.com/allenhaozi/p/5333553.html
Copyright © 2011-2022 走看看