Ssl_engine 語法:ssl_engine engine 缺省值:視系統(tǒng)而定 使用此指令我們可以設(shè)置自己喜歡的任何一個(gè)可用(availiable)的openssl engine 。可在命令行使用openssl engine –t 來 查看有哪些engine處于availiable狀態(tài)。 E.g.: $ openssl engine -t (cryptodev) BSD cryptodev engine
[ available ]
(dynamic) Dynamic engine loading support
[ unavailable ]
Timer_resolution 語法:timer_resolution t 缺省值:none E.g. Timer_resolution 100ms(100毫秒) The directive allows to decrease number gettimeofday() syscalls. By default gettimeofday() is called after each return from kevent(), epoll, /dev/poll, select(), poll(). But if you need an exact time in logs when logging $upstream_response_time, or $msec variables, then you should use timer_resolution. 這個(gè)指令允許降低gettimeofday()系統(tǒng)調(diào)用的次數(shù),但在默認(rèn)情況下每次從kevent(),epoll,select()poll(), /dev/polll返回時(shí) 都會(huì)調(diào)用gettimeofday()。 但如果在記錄$upstream_response_time, or $msec變量時(shí)需要額外的時(shí)間,就應(yīng)該使用timer_resolution指令。 User 語法:user user [group] 缺省值:nobody nobody 指定Nginx Worker進(jìn)程運(yùn)行用戶,默認(rèn)是nobody,一般我們會(huì)增加www www用戶和組來作為此進(jìn)程的運(yùn)行用戶和組。 Worker_cpu_affinity 語法:worker_cpu_afffinity cpumask [cpumask…] 缺省值:none Linux only. With this option you can bind the worker process to a CPU, it calls sched_setaffinity(). 僅適用于Linux系統(tǒng),此指令可以調(diào)用sched_setaffinit()將 worker進(jìn)程和cpu綁定在一起。 E.g.
Worker_processes 4; //指定work_process啟用的個(gè)數(shù) Worker_cpu_affininty 0001 0010 0100 1000; //為每個(gè)worker_process綁定一個(gè)cpu worker_procesess 2; worker_cpu_affinity 0101 1010;
Bind the first worker to CPU0/CPU2, bind the second worker to CPU1/CPU3. This is suitable for HTT. 將CPU0/CPU2綁定給第一個(gè)worker進(jìn)程,將CPU1/CPU3綁定給第二個(gè)worker進(jìn)程。由此我們可以看出每一個(gè)二進(jìn)制位代表一個(gè)cpu,0001表示cpu0,0010表示cup1 ,0100:cpu2,1000:cpu3,然后使用“|”按位或的運(yùn)算將值合到一起。 |
|