码迷,mamicode.com
首页 > 其他好文 > 详细

nginx1.11.9 apt即源码编译各平台测试

时间:2017-02-11 12:39:41      阅读:322      评论:0      收藏:0      [点我收藏+]

标签:系统   benchmark   ssi   测试工具   org   www   request   ebe   debug   

测试系统:ubuntu16.04 server,debian8.7 netinstall,centos7 mini.

系统配置:使用virtualbox安装,内存1G,cpu单核,物理CPU  i5-4460 3.20GHz

测试目标:源码编译nginx-1.11.9,源码编译openresty/1.11.2.2,ubuntu apt nginx-1.10,debian apt nginx-1.6

测试工具:ab 2.3

测试方法:安装完成后,使用index.html内容为“helloworld!”12字节内容。

测试结果:debian apt安装的nginx并发最高。

nginx.conf内容:

worker_processes 1;
error_log logs/error.log debug;
events {
    worker_connections 1024;
}
http {

    server {
        listen 8080;

        location / {
            root html/;
            index index.html;
        }

    }
}

 

测试输出:

ubuntu:
apt:
liuxuzzz@liuxuzzz:~/Downloads$ ab -n50000 -c10 http://192.168.1.82/
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.82 (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests


Server Software:        nginx/1.10.0
Server Hostname:        192.168.1.82
Server Port:            80

Document Path:          /
Document Length:        12 bytes

Concurrency Level:      10
Time taken for tests:   8.717 seconds
Complete requests:      50000
Failed requests:        0
Total transferred:      12550000 bytes
HTML transferred:       600000 bytes
Requests per second:    5735.68 [#/sec] (mean)
Time per request:       1.743 [ms] (mean)
Time per request:       0.174 [ms] (mean, across all concurrent requests)
Transfer rate:          1405.91 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.4      0       7
Processing:     0    2   0.2      2      15
Waiting:        0    2   0.2      2      15
Total:          1    2   0.4      2      16

Percentage of the requests served within a certain time (ms)
  50%      2
  66%      2
  75%      2
  80%      2
  90%      2
  95%      2
  98%      2
  99%      5
 100%     16 (longest request)

source:
liuxuzzz@liuxuzzz:~/Downloads$ ab -n50000 -c10 http://192.168.1.82:8080/
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.82 (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests


Server Software:        nginx/1.11.9
Server Hostname:        192.168.1.82
Server Port:            8080

Document Path:          /
Document Length:        12 bytes

Concurrency Level:      10
Time taken for tests:   10.341 seconds
Complete requests:      50000
Failed requests:        0
Total transferred:      12100000 bytes
HTML transferred:       600000 bytes
Requests per second:    4834.97 [#/sec] (mean)
Time per request:       2.068 [ms] (mean)
Time per request:       0.207 [ms] (mean, across all concurrent requests)
Transfer rate:          1142.64 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.4      0       7
Processing:     0    2   0.3      2       5
Waiting:        0    2   0.3      2       5
Total:          1    2   0.4      2       9

Percentage of the requests served within a certain time (ms)
  50%      2
  66%      2
  75%      2
  80%      2
  90%      2
  95%      2
  98%      3
  99%      4
 100%      9 (longest request)

openresty:
liuxuzzz@liuxuzzz:~/Downloads$ ab -n50000 -c10 http://192.168.1.82:8080/
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.82 (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests


Server Software:        openresty/1.11.2.2
Server Hostname:        192.168.1.82
Server Port:            8080

Document Path:          /
Document Length:        12 bytes

Concurrency Level:      10
Time taken for tests:   10.157 seconds
Complete requests:      50000
Failed requests:        0
Total transferred:      12400000 bytes
HTML transferred:       600000 bytes
Requests per second:    4922.87 [#/sec] (mean)
Time per request:       2.031 [ms] (mean)
Time per request:       0.203 [ms] (mean, across all concurrent requests)
Transfer rate:          1192.26 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.3      0       6
Processing:     0    2   0.1      2       5
Waiting:        0    2   0.1      2       5
Total:          1    2   0.3      2       7

Percentage of the requests served within a certain time (ms)
  50%      2
  66%      2
  75%      2
  80%      2
  90%      2
  95%      2
  98%      2
  99%      3
 100%      7 (longest request)

###############################################################
centos:
source:
liuxuzzz@liuxuzzz:~/Downloads$ ab -n50000 -c10 http://192.168.1.215:8080/
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.215 (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests


Server Software:        nginx/1.11.9
Server Hostname:        192.168.1.215
Server Port:            8080

Document Path:          /
Document Length:        12 bytes

Concurrency Level:      10
Time taken for tests:   11.895 seconds
Complete requests:      50000
Failed requests:        0
Total transferred:      12100000 bytes
HTML transferred:       600000 bytes
Requests per second:    4203.31 [#/sec] (mean)
Time per request:       2.379 [ms] (mean)
Time per request:       0.238 [ms] (mean, across all concurrent requests)
Transfer rate:          993.36 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.4      0       4
Processing:     0    2   0.2      2       5
Waiting:        0    2   0.2      2       5
Total:          1    2   0.4      2       7

Percentage of the requests served within a certain time (ms)
  50%      2
  66%      2
  75%      2
  80%      2
  90%      2
  95%      3
  98%      3
  99%      5
 100%      7 (longest request)

openresty:
liuxuzzz@liuxuzzz:~/Downloads$ ab -n50000 -c10 http://192.168.1.215:8080/
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.215 (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests


Server Software:        openresty/1.11.2.2
Server Hostname:        192.168.1.215
Server Port:            8080

Document Path:          /
Document Length:        12 bytes

Concurrency Level:      10
Time taken for tests:   11.773 seconds
Complete requests:      50000
Failed requests:        0
Total transferred:      12400000 bytes
HTML transferred:       600000 bytes
Requests per second:    4246.88 [#/sec] (mean)
Time per request:       2.355 [ms] (mean)
Time per request:       0.235 [ms] (mean, across all concurrent requests)
Transfer rate:          1028.54 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.4      0       6
Processing:     1    2   0.2      2       6
Waiting:        1    2   0.2      2       6
Total:          1    2   0.4      2       8

Percentage of the requests served within a certain time (ms)
  50%      2
  66%      2
  75%      2
  80%      2
  90%      2
  95%      3
  98%      3
  99%      5
 100%      8 (longest request)

#######################################################
debian:
apt:
liuxuzzz@liuxuzzz:~/source/nginx/conf$ ab -n50000 -c10 http://192.168.1.129/
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.129 (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests


Server Software:        nginx/1.6.2
Server Hostname:        192.168.1.129
Server Port:            80

Document Path:          /
Document Length:        12 bytes

Concurrency Level:      10
Time taken for tests:   8.066 seconds
Complete requests:      50000
Failed requests:        0
Total transferred:      12050000 bytes
HTML transferred:       600000 bytes
Requests per second:    6198.91 [#/sec] (mean)
Time per request:       1.613 [ms] (mean)
Time per request:       0.161 [ms] (mean, across all concurrent requests)
Transfer rate:          1458.92 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.3      0       5
Processing:     0    2   1.5      1      21
Waiting:        0    2   1.5      1      21
Total:          0    2   1.6      1      21

Percentage of the requests served within a certain time (ms)
  50%      1
  66%      1
  75%      1
  80%      2
  90%      2
  95%      2
  98%      9
  99%     10
 100%     21 (longest request)

source:
liuxuzzz@liuxuzzz:~/source/nginx/conf$ ab -n50000 -c10 http://192.168.1.129:8080/
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.129 (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests


Server Software:        nginx/1.11.9
Server Hostname:        192.168.1.129
Server Port:            8080

Document Path:          /
Document Length:        12 bytes

Concurrency Level:      10
Time taken for tests:   9.487 seconds
Complete requests:      50000
Failed requests:        0
Total transferred:      12100000 bytes
HTML transferred:       600000 bytes
Requests per second:    5270.18 [#/sec] (mean)
Time per request:       1.897 [ms] (mean)
Time per request:       0.190 [ms] (mean, across all concurrent requests)
Transfer rate:          1245.49 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.4      0       7
Processing:     0    2   0.2      2       8
Waiting:        0    2   0.1      2       8
Total:          1    2   0.4      2       8

Percentage of the requests served within a certain time (ms)
  50%      2
  66%      2
  75%      2
  80%      2
  90%      2
  95%      2
  98%      2
  99%      4
 100%      8 (longest request)

openresty:
liuxuzzz@liuxuzzz:~/source/nginx/conf$ ab -n50000 -c10 http://192.168.1.129:8080/
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.129 (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests


Server Software:        openresty/1.11.2.2
Server Hostname:        192.168.1.129
Server Port:            8080

Document Path:          /
Document Length:        12 bytes

Concurrency Level:      10
Time taken for tests:   9.551 seconds
Complete requests:      50000
Failed requests:        0
Total transferred:      12400000 bytes
HTML transferred:       600000 bytes
Requests per second:    5235.12 [#/sec] (mean)
Time per request:       1.910 [ms] (mean)
Time per request:       0.191 [ms] (mean, across all concurrent requests)
Transfer rate:          1267.88 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.4      0       4
Processing:     1    2   0.2      2       9
Waiting:        0    2   0.2      2       9
Total:          1    2   0.4      2       9

Percentage of the requests served within a certain time (ms)
  50%      2
  66%      2
  75%      2
  80%      2
  90%      2
  95%      2
  98%      2
  99%      5
 100%      9 (longest request)

 

nginx1.11.9 apt即源码编译各平台测试

标签:系统   benchmark   ssi   测试工具   org   www   request   ebe   debug   

原文地址:http://www.cnblogs.com/liuxuzzz/p/nginx.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!