[benchmarks] Add NGinx dummy configuration.
This commit is contained in:
parent
d7137cb56a
commit
400fc81c5c
4 changed files with 116 additions and 3 deletions
91
examples/nginx-dummy.conf
Normal file
91
examples/nginx-dummy.conf
Normal file
|
@ -0,0 +1,91 @@
|
|||
|
||||
|
||||
http {
|
||||
|
||||
|
||||
root /var/lib/empty;
|
||||
|
||||
index index.html index.txt;
|
||||
autoindex off;
|
||||
include /dev/null;
|
||||
default_type application/octet-stream;
|
||||
|
||||
gzip off;
|
||||
gzip_buffers 128 16k;
|
||||
gzip_comp_level 9;
|
||||
gzip_min_length 0;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
|
||||
server {
|
||||
|
||||
|
||||
listen 127.9.185.194:8080 default_server bind backlog=65536;
|
||||
|
||||
server_name nginx;
|
||||
server_tokens off;
|
||||
server_name_in_redirect off;
|
||||
port_in_redirect off;
|
||||
|
||||
keepalive_requests 262144;
|
||||
keepalive_timeout 60s;
|
||||
|
||||
tcp_nodelay off;
|
||||
tcp_nopush off;
|
||||
|
||||
sendfile off;
|
||||
directio off;
|
||||
aio off;
|
||||
|
||||
open_file_cache max=2048 inactive=60s;
|
||||
open_file_cache_valid 60s;
|
||||
open_file_cache_min_uses 1;
|
||||
open_file_cache_errors on;
|
||||
output_buffers 4 128k;
|
||||
postpone_output 16k;
|
||||
read_ahead 1;
|
||||
|
||||
|
||||
location / {
|
||||
|
||||
limit_except GET HEAD {
|
||||
deny all;
|
||||
}
|
||||
|
||||
default_type "text/plain; charset=utf-8";
|
||||
add_header "Content-Encoding" "identity";
|
||||
add_header "Cache-Control" "no-store, max-age=0";
|
||||
return 200 "hello world!\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
error_log /dev/stderr notice;
|
||||
access_log off;
|
||||
log_not_found on;
|
||||
|
||||
client_body_temp_path /var/lib/empty;
|
||||
proxy_temp_path /var/lib/empty;
|
||||
fastcgi_temp_path /var/lib/empty;
|
||||
uwsgi_temp_path /var/lib/empty;
|
||||
scgi_temp_path /var/lib/empty;
|
||||
}
|
||||
|
||||
|
||||
worker_processes 2;
|
||||
worker_rlimit_nofile 131072;
|
||||
working_directory /var/lib/empty;
|
||||
|
||||
error_log /dev/stderr notice;
|
||||
pid /tmp/nginx.pid;
|
||||
daemon off;
|
||||
|
||||
|
||||
events {
|
||||
use epoll;
|
||||
worker_connections 16640;
|
||||
accept_mutex off;
|
||||
multi_accept off;
|
||||
}
|
||||
|
|
@ -20,9 +20,10 @@ http {
|
|||
server {
|
||||
|
||||
|
||||
listen 127.9.185.194:8080 default_server bind backlog=65536;
|
||||
listen @{bind_ip}:@{bind_port} default_server bind backlog=65536;
|
||||
|
||||
server_name nginx;
|
||||
server_tokens off;
|
||||
server_name_in_redirect off;
|
||||
port_in_redirect off;
|
||||
|
||||
|
|
|
@ -331,7 +331,7 @@
|
|||
|
||||
|
||||
|
||||
<< benchmark / alternatives / haproxy
|
||||
<< benchmark / alternatives / haproxy-dummy
|
||||
exec -- \
|
||||
sudo -u root -n -E -P -- \
|
||||
taskset -c 0,1 \
|
||||
|
@ -343,7 +343,28 @@
|
|||
env -i -- \
|
||||
./.bin/haproxy \
|
||||
-db \
|
||||
-f ./examples/haproxy.conf \
|
||||
-f ./examples/haproxy-dummy.conf \
|
||||
"${@}" \
|
||||
#
|
||||
!!
|
||||
|
||||
|
||||
|
||||
|
||||
<< benchmark / alternatives / nginx-dummy
|
||||
exec -- \
|
||||
sudo -u root -n -E -P -- \
|
||||
taskset -c 0,1 \
|
||||
nice -n -19 -- \
|
||||
ionice -c 2 -n 0 -- \
|
||||
chrt -r 10 \
|
||||
prlimit -n262144 -- \
|
||||
sudo -u "${USER}" -n -E -P -- \
|
||||
env -i -- \
|
||||
./.bin/nginx \
|
||||
-c ./examples/nginx-dummy.conf \
|
||||
-e /dev/stderr \
|
||||
-p . \
|
||||
"${@}" \
|
||||
#
|
||||
!!
|
||||
|
|
Loading…
Reference in a new issue