wrk -c 100 -t 4 -d 10 http://127.0.0.1:8080/
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html index.htm;
location / {
try_files $uri $uri/ 404;
}
}
--- Result
Requests/sec: 2997.74
--- data/nginx.conf.before 2017-07-11 15:56:47.000000000 +0900
+++ data/nginx.conf 2017-07-11 16:44:13.000000000 +0900
@@ -7,7 +7,7 @@
events {
- worker_connections 1024;
+ worker_connections 10240;
}
--- Result
Requests/sec: 3225.39
--- data/nginx.conf.before 2017-07-11 15:56:47.000000000 +0900
+++ data/nginx.conf 2017-07-11 16:41:42.000000000 +0900
@@ -1,13 +1,13 @@
user nginx;
-worker_processes 1;
+worker_processes 4;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
- worker_connections 1024;
+ worker_connections 10240;
}
--- Result
Requests/sec: 3572.28
--- data/nginx.conf.before 2017-07-11 15:56:47.000000000 +0900
+++ data/nginx.conf 2017-07-11 16:38:39.000000000 +0900
@@ -1,13 +1,14 @@
user nginx;
-worker_processes 1;
+worker_processes 4;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
- worker_connections 1024;
+ worker_connections 10240;
+ accept_mutex_delay 100ms;
}
--- Result
Requests/sec: 3911.89
--- data/nginx.conf.before 2017-07-11 15:56:47.000000000 +0900
+++ data/nginx.conf 2017-07-11 17:17:59.000000000 +0900
@@ -1,13 +1,14 @@
user nginx;
-worker_processes 1;
+worker_processes 4;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
- worker_connections 1024;
+ worker_connections 10240;
+ accept_mutex_delay 100ms;
}
@@ -22,7 +23,7 @@
access_log /var/log/nginx/access.log main;
sendfile on;
- #tcp_nopush on;
+ tcp_nopush on;
keepalive_timeout 65;
--- Result
Requests/sec: 4253.24
--- data/nginx.conf.before 2017-07-11 15:56:47.000000000 +0900
+++ data/nginx.conf 2017-07-11 17:28:00.000000000 +0900
@@ -1,13 +1,14 @@
user nginx;
-worker_processes 1;
+worker_processes 4;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
- worker_connections 1024;
+ worker_connections 10240;
+ accept_mutex_delay 100ms;
}
@@ -22,8 +23,8 @@
access_log /var/log/nginx/access.log main;
sendfile on;
- #tcp_nopush on;
-
+ tcp_nopush on;
+ open_file_cache max=100 inactive=20s;
keepalive_timeout 65;
#gzip on;
--- Result
Requests/sec: 4425.10
--- data/nginx.conf.before 2017-07-11 15:56:47.000000000 +0900
+++ data/nginx.conf 2017-07-11 17:34:23.000000000 +0900
@@ -1,13 +1,14 @@
user nginx;
-worker_processes 1;
+worker_processes 4;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
- worker_connections 1024;
+ worker_connections 10240;
+ accept_mutex_delay 100ms;
}
@@ -19,11 +20,11 @@
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
- access_log /var/log/nginx/access.log main;
+ access_log off;
sendfile on;
- #tcp_nopush on;
-
+ tcp_nopush on;
+ open_file_cache max=100 inactive=20s;
keepalive_timeout 65;
#gzip on;
--- Result
Requests/sec: 6107.40
--- data/nginx.conf.before 2017-07-11 15:56:47.000000000 +0900
+++ data/nginx.conf 2017-07-11 17:34:23.000000000 +0900
@@ -1,13 +1,14 @@
user nginx;
-worker_processes 1;
+worker_processes 4;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
- worker_connections 1024;
+ worker_connections 10240;
+ accept_mutex_delay 100ms;
}
@@ -19,11 +20,11 @@
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
- access_log /var/log/nginx/access.log main;
+ access_log off;
sendfile on;
- #tcp_nopush on;
-
+ tcp_nopush on;
+ open_file_cache max=100 inactive=20s;
keepalive_timeout 65;
#gzip on;
--- data/conf.d/default.conf.before 2017-07-11 15:57:15.000000000 +0900
+++ data/conf.d/default.conf 2017-07-11 17:44:14.000000000 +0900
@@ -6,6 +6,7 @@
index index.html index.htm;
location / {
+ aio threads;
try_files $uri $uri/ 404;
}
}
--- Result
Requests/sec: 5222.69
--- data/nginx.conf.before 2017-07-11 15:56:47.000000000 +0900
+++ data/nginx.conf 2017-07-11 17:58:36.000000000 +0900
@@ -1,13 +1,14 @@
user nginx;
-worker_processes 1;
+worker_processes 4;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
- worker_connections 1024;
+ worker_connections 10240;
+ accept_mutex_delay 100ms;
}
@@ -19,11 +20,12 @@
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
- access_log /var/log/nginx/access.log main;
+ access_log off;
sendfile on;
- #tcp_nopush on;
-
+ tcp_nopush on;
+ tcp_nodelay on;
+ open_file_cache max=100 inactive=20s;
keepalive_timeout 65;
#gzip on;
--- Result
Requests/sec: 5756.04
--- data/nginx.conf.before 2017-07-11 15:56:47.000000000 +0900
+++ data/nginx.conf 2017-07-11 18:03:23.000000000 +0900
@@ -1,13 +1,15 @@
user nginx;
-worker_processes 1;
+worker_processes 4;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
- worker_connections 1024;
+ worker_connections 10240;
+ accept_mutex_delay 100ms;
+ multi_accept on;
}
@@ -19,11 +21,11 @@
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
- access_log /var/log/nginx/access.log main;
+ access_log off;
sendfile on;
- #tcp_nopush on;
-
+ tcp_nopush on;
+ open_file_cache max=100 inactive=20s;
keepalive_timeout 65;
#gzip on;
--- Result
Requests/sec: 6104.30
--- data/nginx.conf.before 2017-07-11 15:56:47.000000000 +0900
+++ data/nginx.conf 2017-07-11 18:17:18.000000000 +0900
@@ -1,13 +1,15 @@
user nginx;
-worker_processes 1;
+worker_processes 4;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
- worker_connections 1024;
+ worker_connections 10240;
+ accept_mutex_delay 100ms;
+ multi_accept on;
}
@@ -19,14 +21,15 @@
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
- access_log /var/log/nginx/access.log main;
+ access_log off;
sendfile on;
- #tcp_nopush on;
-
+ tcp_nopush on;
+ open_file_cache max=100 inactive=20s;
keepalive_timeout 65;
#gzip on;
+ reset_timedout_connection on;
include /etc/nginx/conf.d/*.conf;
}
--- Result
Requests/sec: 6078.55
--- data/nginx.conf.before 2017-07-11 15:56:47.000000000 +0900
+++ data/nginx.conf 2017-07-11 18:42:55.000000000 +0900
@@ -1,13 +1,16 @@
user nginx;
-worker_processes 1;
+worker_processes 4;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
- worker_connections 1024;
+ worker_connections 10240;
+ accept_mutex_delay 100ms;
+ multi_accept on;
+ use epoll;
}
@@ -19,14 +22,15 @@
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
- access_log /var/log/nginx/access.log main;
+ access_log off;
sendfile on;
- #tcp_nopush on;
-
+ tcp_nopush on;
+ open_file_cache max=100 inactive=20s;
keepalive_timeout 65;
#gzip on;
+
include /etc/nginx/conf.d/*.conf;
}
--- Result
Requests/sec: 6139.96
--- data/nginx.conf.before 2017-07-11 15:56:47.000000000 +0900
+++ data/nginx.conf 2017-07-11 18:47:04.000000000 +0900
@@ -1,13 +1,16 @@
user nginx;
-worker_processes 1;
+worker_processes 4;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
- worker_connections 1024;
+ worker_connections 10240;
+ accept_mutex_delay 100ms;
+ multi_accept on;
+ use epoll;
}
@@ -19,14 +22,16 @@
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
- access_log /var/log/nginx/access.log main;
+ access_log off;
+ error_log off;
sendfile on;
- #tcp_nopush on;
-
+ tcp_nopush on;
+ open_file_cache max=100 inactive=20s;
keepalive_timeout 65;
#gzip on;
+
include /etc/nginx/conf.d/*.conf;
}
--- Result
Requests/sec: 6245.80
--- data/nginx.conf.before 2017-07-11 15:56:47.000000000 +0900
+++ data/nginx.conf 2017-07-11 19:01:59.000000000 +0900
@@ -1,13 +1,16 @@
user nginx;
-worker_processes 1;
+worker_processes 4;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
- worker_connections 1024;
+ worker_connections 10240;
+ accept_mutex_delay 100ms;
+ multi_accept on;
+ use epoll;
}
@@ -19,14 +22,17 @@
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
- access_log /var/log/nginx/access.log main;
+ access_log off;
+ error_log off;
sendfile on;
- #tcp_nopush on;
-
+ tcp_nopush on;
+ open_file_cache max=100 inactive=20s;
keepalive_timeout 65;
+ keepalive_requests 100000;
#gzip on;
+
include /etc/nginx/conf.d/*.conf;
}
--- Result
Requests/sec: 7192.16
--- data/nginx.conf.before 2017-07-11 15:56:47.000000000 +0900
+++ data/nginx.conf 2017-07-11 19:12:04.000000000 +0900
@@ -1,13 +1,17 @@
user nginx;
-worker_processes 1;
+worker_processes 4;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
+worker_rlimit_nofile 100000;
events {
- worker_connections 1024;
+ worker_connections 10240;
+ accept_mutex_delay 100ms;
+ multi_accept on;
+ use epoll;
}
@@ -19,14 +23,14 @@
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
- access_log /var/log/nginx/access.log main;
+ access_log off;
+ error_log off;
sendfile on;
- #tcp_nopush on;
-
+ tcp_nopush on;
+ open_file_cache max=100 inactive=20s;
keepalive_timeout 65;
-
- #gzip on;
+ keepalive_requests 100000;
include /etc/nginx/conf.d/*.conf;
}
--- Result
Requests/sec: 7240.11
Environment: