<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                1、用于指定運行nginx服務器用戶和組 語法: user user 【group】 說明: user: 指定運行nginx服務器的用戶 group: 選填,指定運行nginx服務器的用戶組 備注: 1)如果編譯安裝nginx,使用--user和--group指定后,此時在配置文件中查看,就會發現該指令被注釋掉 2)如果使用其他用戶嘗試啟動nginx,則會報錯 ![](https://box.kancloud.cn/ff53e0876be66b7d273f42c6dfdf6592_587x39.png) # 2、worker_rlimit_nofile #; 功能:指定所有worker進程所能夠打開的最大文件數 說明: linux系統上,默認每個用戶所能打開的最大文件數為1024。對于一個服務器軟來講,如果這個服務監聽在某個套接字上。每個客戶端連接服務器,服務器上都要有一個套接字文件,維護這個連接。為了支持更大的并發連接數,對于每個worker進程,需要設置單進程所能打開的最大文件數。由于woker進程是由nginx用戶,運行worker進程的用戶能打開更多的文件 案例: worker_rlimit_nofile 65535; 其他: 進程最大打開文件描述符數 a:查看 ulimit -n b:設置 永久有效: ,則需要在/etc/security/limits.conf中進行設置(需要root權限),可添加如下兩行,表示用戶nginx最大打開文件描述符數的soft limit為65535,hard limit為65535。以下設置需要注銷之后重新登錄才能生效: nginx soft nofile 65535 nginx hard nofile 65535 注意:設置hard limit不能超過/proc/sys/fs/nr_open # 3、worker_processes 語法:worker_processes number | auto 功能;定義工作進程的個數,通常應該少于物理核心數,目前新版本的,默認為auto # 4、worker_cpu_affinity cpumask 功能:將工作進程綁定到cpu集,默認情況下,工作進程不綁定到任何特定的cpu 有點:可以提升緩存的命中率 案例: worker_processes 4; worker_cpu_affinity 0001 0010 0100 1000; worker_processes auto; worker_cpu_affinity auto; # 5、 worker_priority #number; 功能:指定進程的優先級 案例: worker_prority -10 nice越小,越被優先調度 6、accept_mutex on|off; 默認為:off 配置范圍:Events 說明:nginx,是一個master進程生成多個worker進程,當一個請求到達后,我們該用哪個worker進程來響應請求呢? 打開此功能,讓worker進程輪流,序列號的響應請求。 7、lock_file file 功能:指定互斥鎖鎖文件的路徑,編譯的時候可以通過--lock-file指定 配置范圍:main 默認在:《prefix>/logs/nginx.lock # 8、worker_connections #number; 功能:設置一個工作進程可以打開的最大并發連接數。 默認為:512 9、error_log file; 語法: error_log logs/error.log error 總結: user nginx; worker_processes auto; error_log /var/log/nginx/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; worker_cpu_affinity auto; worker_rlimit_nofile 65535; worker_priority -10; events { accept_mutex on; worker_connections 52000; }
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看