首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

http跟https通道性能比较

2012-09-20 
http和https通道性能比较通过ab压力测试,apache走https通道,单个apache节点,在1000的并发下,获取几百字节

http和https通道性能比较


通过ab压力测试,apache走https通道,单个apache节点,在1000的并发下,获取几百字节的图片这样简单请求,也需要几秒钟的时间。


io和cpu负载均不高, 用nginx也是一样慢。 只有当并发降到100时,请求返回时间才正常。


单个ab做压力测试,是无法压到1000并发的,ab自身占的cpu已经到100%了。所以需要启动10个ab,每个100并发,是可以模拟1000并发的。并且,对ab所在的机器配置也有要求。


================= http ===============

ab -n 1000 -c 1000 http://10.249.192.168/images/404_ico.png


Concurrency Level:      1000
Time taken for tests:   3.11487 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      9941916 bytes
HTML transferred:       6708040 bytes
Requests per second:    3320.62 [#/sec] (mean)
Time per request:       301.149 [ms] (mean)
Time per request:       0.301 [ms] (mean, across all concurrent requests)
Transfer rate:          3223.66 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        1   14 189.3      2    3001
Processing:     1   26 128.9      4    1484
Waiting:        1   25 128.9      3    1483
Total:          3   40 228.4      6    3007

Percentage of the requests served within a certain time (ms)
  50%      6
  66%      8
  75%     12
  80%     13
  90%     17
  95%     27
  98%    242
  99%    651
 100%   3007 (longest request)


============= https ===================

ab -n 10000 -c 1000 https://10.249.192.168/images/404_ico.png

Document Path:          https://images/404_ico.png
Document Length:        670 bytes
Concurrency Level:      1000
Time taken for tests:   44.608465 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      9943902 bytes
HTML transferred:       6709380 bytes
Requests per second:    224.17 [#/sec] (mean)
Time per request:       4460.846 [ms] (mean)
Time per request:       4.461 [ms] (mean, across all concurrent requests)
Transfer rate:          217.67 [Kbytes/sec] received


Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:      296 2908 1406.6   2986   10321
Processing:     4 1521 975.0   1204    4042
Waiting:        3  625 613.3    484    3210
Total:        377 4430 1319.2   4323   14324


Percentage of the requests served within a certain time (ms)
  50%   4323
  66%   4494
  75%   4642
  80%   4750
  90%   5848
  95%   7246
  98%   7361
  99%   9251
 100%  14324 (longest request)


===================== 8点激增请求 ===================

big then 1 second 10450
total: 142962, 约1000 tps

/openapi/id/aliyunid?oauth_consumer_key=YriliqpMgFTYsUxA 39691

/innerapi/oauth/access_token_cap?oauth_consumer_key=YyunmiqXJw6WOhFT  81160

f5显示并发达到4000个session

每台机器的apache 443端口连接数到1500, apache进程达到23个,其中10台apache平均cpu占用20%

jboss进程cpu达到100%,jstack线程数=?,其中应用线程阻塞在?

每台机器的redis连接到100上限

瓶颈所在的redis server连接数: ? cpu已经到达100%


ipmap: 30235, 一天总ip(132055 / 台)
('110.75.167.221', 16706)
('110.75.167.213', 16483)
('110.75.167.220', 16445)
('121.31.251.61', 503)
('112.97.30.1', 429)
('121.31.250.61', 280)
('112.96.30.30', 200)
('219.148.23.36', 176)
('112.97.30.2', 174)
('58.223.0.39', 168)
('58.223.0.40', 142)
reverse ----------------
('49.92.15.43', 1)
('49.91.104.135', 1)
('202.99.106.195', 1)
('113.126.57.143', 1)
('223.215.114.55', 1)
('112.84.82.17', 1)
('1.198.3.8', 1)
('112.193.94.27', 1)
('183.42.202.128', 1)
('180.98.50.130', 1)
('27.128.89.12', 1)
ip number map--------------
(1, 17425)
(2, 5709)
(3, 1700)
(4, 1165)
(5, 849)
(6, 654)
(7, 474)
(8, 320)
(9, 246)
(10, 193)
(11, 192)
api map----------------
apimap: 99
('/innerapi/oauth/access_token_cap', 81160)
('/openapi/id/aliyunid', 41827)
('/openapi/util/timestamp', 11267)
('/openapi/id/load', 1910)
('/innerapi/id/aliyunid_by_accesstoken_kp', 1825)
('/innerapi/id/aliyunid_by_kp', 1379)
('/innerapi/oauth/check_access_token', 1074)
('/openapi/id/aliyunid_kp', 803)
('/openapi/sp/taobao/taobaoid', 267)
('/innerapi/id/kp_by_aliyunid', 262)
('/innerapi/oauth/access_token_by_ticket', 173)
('/openapi/id/mobile_number', 146)
('/oauth/request_token', 127)
('/innerapi/id/load_by_aliyunid', 90)
('/openapi/id/check', 83)

热点排行