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

Detailed explanation of pressure testing tool ab (Apache)

2025-01-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

Small preface: compared with several lightweight stress testing tools. Siege http_load ab webbench.siege eats too much memory (ab consumes relatively less resources under the same number of requests and concurrency)

Introduction to ab:

The full name of ab is: apache bench, and the official note is:

Apache Hypertext transfer Protocol (HTTP) performance testing tool. It is designed to describe the execution performance of the currently installed Apache, mainly to show how many requests your installed Apache can handle per second. Apache comes with stress testing tools. Ab is very practical. It can be used not only for website access stress testing of apache servers, but also for other types of servers. Such as nginx, tomcat, IIS and so on.

I. installation

You can install the Apache tool directly under Linux.

Yum install-y httpd-tools

2. Use

Eg.

Ab-n 200000-c 10000 "http://jd.com/"

-n is the number of requests

-c is the concurrent number

After executing the command, you can see the following test report:

III. Frequently asked questions

1. Sometimes when you set a large concurrency parameter, such as 1000 or 10000cycles, the following error will be reported when executing the command:

Explanation: check the application server and database are not reported error, the connection is reset, apr_socket_recv is a parameter of the OS kernel, high concurrency, the kernel will think that the system is subjected to SYN flood***, will send cookies (possible SYN flooding on port 80. Sending cookies), which slows down the speed of requests, so large concurrency testing can be done by setting this parameter to 0 on the application server to disable system protection.

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

Internet Technology

Wechat

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

12
Report