Ssl_engine 语法:ssl_engine engine 缺省值:视系统而定 使用此指令我们可以设置自己喜欢的任何一个可用(availiable)的openssl engine 。可在命令行使用openssl engine –t 来 查看有哪些engine处于availiable状态。 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. 这个指令允许降低gettimeofday()系统调用的次数,但在默认情况下每次从kevent(),epoll,select()poll(), /dev/polll返回时 都会调用gettimeofday()。 但如果在记录$upstream_response_time, or $msec变量时需要额外的时间,就应该使用timer_resolution指令。 User 语法:user user [group] 缺省值:nobody nobody 指定Nginx Worker进程运行用户,默认是nobody,一般我们会增加www www用户和组来作为此进程的运行用户和组。 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系统,此指令可以调用sched_setaffinit()将 worker进程和cpu绑定在一起。 E.g.
Worker_processes 4; //指定work_process启用的个数 Worker_cpu_affininty 0001 0010 0100 1000; //为每个worker_process绑定一个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绑定给第一个worker进程,将CPU1/CPU3绑定给第二个worker进程。由此我们可以看出每一个二进制位代表一个cpu,0001表示cpu0,0010表示cup1 ,0100:cpu2,1000:cpu3,然后使用“|”按位或的运算将值合到一起。 |
|