Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Do I need to install ab on apache?

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article uses simple and easy to understand examples to introduce you need to install apache ab?, The code is very detailed, interested friends can refer to it, I hope it can help everyone.

ab is Apache's own website stress testing tool, very simple and convenient to use, not only can Apache server for website access stress testing, but also for other types of servers for stress testing, such as nginx,tomcat, IIS, etc., can be installed as needed.

1: Installation

First of all, download and install it.

Here only talk about window under download installation

Official download address: ,(https://www.apachehaus.com/cgi-bin/download.plx)

Unzip after download

I unzipped it directly into apacheab on disk d.

Modify the port configuration of the conf/httpd.conf file under the unzipped root directory. The default is port 80, which should be occupied and cannot be installed. You can modify it yourself. I modified it here to port 8088.

Extract the file to the local folder, if not extract it in drive c, you need to set the parameters:

My decompression to D disk, need to set parameters, conf->httpd.conf open using a text editor,

There are three areas that need to be modified:

start testing

If you need to type ab test under any path on the command line, you can add the bin directory path to the path of the environment variable

I opened the command line in the bin directory

Note that you need to add/path after the domain name

ab -n 100 -c 10 http://www.baidu.com/s

-n is the number of requests, -c is the number of concurrency.

s is path, indicating that the test address is specified. If it is not specified, an "ab: invalid url" error may be reported.

And then there's-t, which is how many concurrent requests are made in s.

The test results are as follows:

D:\apacheab\Apache24\bin>ab -n 100 -c 10 http://www.baidu.com/sThis is ApacheBench, Version 2.3 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking www.baidu.com (be patient)..... done

Server Software: BWS/1.1 ##Server Software and Version

Server Hostname: www.baidu.com

##Requested address/domain name

Server Port: 80 ##

Document Path: /s

##The requested path

Document Length: 112435 bytes

##Page data/Amount of data returned

Concurrency Level: 10 ##Number of Concurrency

Time taken for tests: 4.764 seconds

##How much time has it taken

Complete requests: 100 ##Number of requests

Failed requests: 99 ##Why did Baidu fail so many times? Baidu should have taken precautions.

(Connect: 0, Receive: 0, Length: 99, Exceptions: 0)

Total transferred: 11342771 bytes

##Total number of bytes transferred, including http header information, etc.

HTML transferred: 11247622 bytes

##html bytes, actual page transfer bytes

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

##How many requests per second, this is a very important parameter value, server throughput

Time per request: 476.427 [ms] (mean)

##Average user request wait time

Time per request: 47.643 [ms] (mean, across all concurrent requests)

##Server average processing time, which is the reciprocal of server throughput

Transfer rate: 2325.00 [Kbytes/sec] received

##Length of data retrieved per second

Connection Times (ms)

min mean[+/-sd] median max

Connect: 22 41 12.4 39 82##Minimum time to connect, mean, median, maximum

Processing: 113 386 211.1 330 1246##Processing time

Waiting: 25 80 43.9 73 266##Waiting time

Total: 152 427 210.1 373 1283##Total time

Percentage of the requests served within a certain time (ms) 50% 373 ## 50% of the requests returned within 373ms

66% 400 ## 60% of requests returned within 400ms

75% 426

80% 465

90% 761

95% 930

98% 1192

99% 1283

100% 1283 (longest request)

Because ab tool consumption is small, so some people also used to carry out ddos attack, count as a ddos attack tool

Do you need to install ab on apache? Share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report