用户
 找回密码
 入住 CI 中国社区
搜索
查看: 4054|回复: 2
收起左侧

[讨论/交流] ci在并发压力测试时,表现不大好

[复制链接]
发表于 2012-1-12 14:04:40 | 显示全部楼层 |阅读模式
用apache的ab工具
ab -n 1000 -c 10 http://localhost
控制器只是默认的:
public function index()
    {

        $this->load->view('welcome_message');

    }
结果为:

C:\Apache2.2\bin>ab -n 1000 -c 10 http://localhost/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache/2.2.21
Server Hostname:        localhost
Server Port:            80

Document Path:          /
Document Length:        1926 bytes

Concurrency Level:      10
Time taken for tests:   13.475 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      2114000 bytes
HTML transferred:       1926000 bytes
Requests per second:    74.21 [#/sec] (mean)
Time per request:       134.748 [ms] (mean)
Time per request:       13.475 [ms] (mean, across all concurrent requests)
Transfer rate:          153.21 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.6      0      16
Processing:    47  134  50.6    125     359
Waiting:       47  134  50.6    125     359
Total:         47  134  50.6    125     359

Percentage of the requests served within a certain time (ms)
  50%    125
  66%    156
  75%    172
  80%    172
  90%    187
  95%    219
  98%    265
  99%    297
100%    359 (longest request)

每秒只能处理74次请求,这正常么?

发表于 2012-1-12 15:13:04 | 显示全部楼层
发表于 2013-8-31 14:41:50 | 显示全部楼层
这个测试不具有实际意义,这个关键还是看人吧。

本版积分规则