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来读取

     

  • 相关阅读:
    matlab简单线性规划&单纯形法
    matlab多变量绘图函数(类似ggplot2)
    matlab近似泛函优化
    如何求矩阵的逆矩阵
    数值分析手写笔记
    latex绘图小结
    数理统计手写笔记
    matlab kriging模型
    运筹学与最优化手写笔记
    matlab既约梯度法习题
  • 原文地址:https://www.cnblogs.com/allenhaozi/p/5333553.html
Copyright © 2011-2022 走看看