Web server pressure measurement tool siege, AB

Source: Internet
Author: User
Tags benchmark server port

There are also a lot of Web server pressure testing tools, here are only the two types of--siege (for Linux), AB (for Windows) I used.

First, siege

1, Introduction:

Siege is an open-source stress testing tool designed to evaluate the affordability of Web applications under pressure. Multiple user concurrent access to a Web site can be configured to record the corresponding time of each user's request process and repeat under a certain number of concurrent accesses. Siege can request a random URL from the preset list of your choice. So siege can be used to simulate user request loads, while AB does not. But do not use siege to perform the highest performance benchmark calibration test, which is a lot more accurate AB.

2. Installation:

Official: http://www.joedog.org/
Siege Download: http://www.joedog.org/pub/siege/siege-latest.tar.gz
Extract:
# TAR-ZXF Siege-latest.tar.gz
Go to unzip directory:
# CD siege-latest.tar.gz/
Installation:
#./configure; Make
#make Install

3. Detailed Parameters:

4. Use:

Siege-c 100-r "https://www.baidu.com/"

-C 100 for concurrent impersonation of 100 user concurrency,-r 10 for repeat 10 times

* * SIEGE 3.0.8
* * Preparing concurrent users for battle.
The server is now under siege. Done.

transactions:909 hits #完成909次处理
availability:90.90% #成功率
Elapsed time:71.83 secs #总共耗时
Data transferred:0.15 MB #总共传输数据量
Response time:1.66 secs #响应时间
Transaction rate:12.65 trans/sec #平均每秒处理数
throughput:0.00 mb/sec #平均每秒传输数据量
concurrency:20.98 #实际最大并发数
Successful transactions:909 #成功处理数
Failed transactions:91 #失败处理数
Longest transaction:63.17 #单次最长耗时
Shortest transaction:0.02 #单次最短耗时

FILE:/var/log/siege.log
Can disable this annoying message by editing
The. siegerc file in your home directory; Change
The directive ' Show-logfile ' to false.

Second, AB

1. Introduction

The full name of AB is Apachebench, a gadget included with Apache, dedicated to the benchmark testing of HTTP Server, which can simultaneously simulate multiple concurrent requests

2. Download

http://apache.mirrors.pair.com/httpd/

or install Apache with your own

3. Use:

Send 10 requests (-N 10) to the www.google.com, and send 10 requests (-C 10) at a time--that is, all at once.

c:\users\admin>ab-n 10-c http://www.google.com/


This is apachebench, Version 2.3 < $Revision: 1748469 $>
Copyright 1996 Adam Twiss, Zeus technology LTD, http://www.zeustech.net/
Licensed to the Apache software Foundation, http://www.apache.org/

Benchmarking www.google.com (Be patient) ... done


Server SOFTWARE:GWS
Server Hostname:www.google.com
Server port:80

Document Path:/
Document length:390 bytes

Concurrency level:10
Time taken for tests:0.274 seconds
Complete Requests:10
Failed requests:0
Non-2xx responses:10
Total transferred:11330 bytes
HTML transferred:3900 bytes
Requests per second:36.47 [#/sec] (mean)
Time per request:274.207 [MS] (mean)
Time per request:27.421 [MS] (mean, across all concurrent requests)
Transfer rate:40.35 [Kbytes/sec] Received

Connection Times (MS)
Min MEAN[+/-SD] Median max
CONNECT:24 24 0.4 24 25
PROCESSING:31 113 67.4 121 218
WAITING:31 113 67.4 121 218
TOTAL:55 138 67.5 145 243

Percentage of the requests served within a certain time (MS)
50% 145
66% 170
75% 194
80% 218
90% 243
95% 243
98% 243
99% 243
100% 243 (Longest request)

/* Duration of the entire test * *

Time taken for tests:3.234651 seconds

/* Number of requests completed */

Complete Requests:10

/* Number of failed requests */

Failed requests:0

Write errors:0

Non-2xx responses:10

Keep-alive requests:10

/* network traffic in the entire scene */

Total transferred:6020 bytes

/* The amount of HTML content transferred throughout the scene */

HTML transferred:2300 bytes

/* One of the most concerned indicators, equivalent to the number of transactions per second in LR, followed by mean in parentheses indicates that this is an average */

Requests per second:3.09 [#/sec] (mean)

/* One of the two most concerned indicators, equivalent to the average transaction response time in LR, followed by mean in parentheses indicates that this is an average */ This is the average user request wait time.

Time per request:3234.651 [MS] (mean)

/* This is the server average request processing time */

Time per request:323.465 [MS] (mean, across all concurrent requests)

/* Average traffic on the network per second can help eliminate the problem of extended response times due to excessive network traffic */

Transfer rate:1.55 [Kbytes/sec] Received

/* Decomposition of the time consumed on the network, the specific algorithm of each data is not very clear */

Connection Times (MS)

Min MEAN[+/-SD] Median max

Connect:20 318 926.1 30 2954

processing:40 2160 1462.0 3034 3154

waiting:40 2160 1462.0 3034 3154

Total:60 2479 1276.4 3064 3184

/ * The following content is the response for all requests in the entire scene. Each request in the scene has a response time, where 50% of the user's response time is less than 3064 milliseconds, 60 of the user response time is less than 3094 milliseconds, and the maximum response time is less than 3184 milliseconds * /

Percentage of the requests served within a certain time (MS)

50% 3064

66% 3094

75% 3124

80% 3154

90% 3184

95% 3184

98% 3184

99% 3184

100% 3184 (Longest request)

Due to concurrent requests, the CPU is not actually processed at the same time, but instead is rotated on a per-request basis, so basically the first time of the request is approximately equal to the second time per request multiplied by the number of concurrent requests.

Reference:

1, http://www.cnblogs.com/yangxia-test/archive/2012/12/06/2804801.html

2, http://www.ha97.com/4663.html

Web server pressure measurement tool siege, AB

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.