nginx 测试
2015-09-07 23:25
781 查看
重点
disable access log
output from 220MBps to 350MBpswith tcp_nodelay and tcp_nopush
output from 350MBps to 375 MBpsafter open open_file_cache max
output from 375 MBps to 880MBpsA very Good reference
About wrk benchmark
24C 轻松打到22W
# 配置 #user nobody; worker_processes 24; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 65536; } http { include 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 logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root html; index index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # #server { # listen 443 ssl; # server_name localhost; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #} }
# wrk -t 24 -c 100 -d 30s http://10.149.14.66/ Running 30s test @ http://10.149.14.66/ 24 threads and 100 connections Thread Stats Avg Stdev Max +/- Stdev Latency 1.51ms 6.52ms 160.43ms 97.95% Req/Sec 9.24k 1.09k 13.17k 78.55% 6632125 requests in 30.10s, 5.24GB read Requests/sec: 220336.89 Transfer/sec: 178.39MB
相关文章推荐
- Nginx+lua环境搭建
- nginx集群的配置
- Nginx的基本配置
- Nginx提供网站服务应用包括(虚拟主机、用户访问控制、用户验证、nginx平滑升级、防盗链)的配置
- Nginx配置总结
- Nginx+FastCGI运行原理
- nginx安装出错
- Windows下Nginx的启动、停止等命令
- Lua:Nginx Lua环境配置,使用openresty
- 1-5 监控nginx服务器开机时间
- linux下yum安装和卸载nginx
- nginx控制单个ip连接数及流量控制
- 使用Haproxy搭建web群集
- Linux下安装Nginx教程
- centos+nginx+c
- nginx方面的书籍资料链接
- ubuntu 12.04下的nginx+php安装和配置
- 架构设计:负载均衡层设计方案(3)——Nginx进阶
- 通过配置CPU参数 worker_cpu_affinity 提升nginx性能
- nginx启用php