In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
PS: website performance stress testing is an essential part of the performance tuning process. Only when the server is under high pressure can the problems exposed by various settings be truly reflected. Apache has a built-in program called ab that can perform website access stress tests on Apache or other types of servers.
The principle of ApacheBench command:
The ab command creates many concurrent access threads that simulate multiple visitors accessing a URL address at the same time. Its testing goal is based on URL, so it can be used to test not only the load pressure of Apache, but also the pressure of other Web servers such as nginx, lighthttp, tomcat, IIS and so on. The ab command requires very little of the computer that issues the load, neither a high CPU nor a lot of memory, but it places a huge load on the target server, similar to CC***. You should also pay attention to the use of your own testing, otherwise too much load at one time may cause the target server to run out of resources, or even lead to a crash.
Format: # ab [options] [http://]hostname[:port]/path parameter description:-the number of requests executed by n requests Number of requests to perform// in the test session (the total number of times to visit the page in this test). By default, only one request is executed. -the number of requests (concurrency) generated by c concurrency Number of multiple requests to make// at a time means that multiple concurrency must be processed at the same time, and the processing is one transaction. The default is one at a time.
ApacheBench usage details: in the Linux system, generally after the installation of Apache can be directly executed
Result analysis:
Document Path: / test.php
# pages for testing
Document Length: 15 bytes
# Page size
Concurrency Level: 100
# the number of concurrency of tests, also the-c option
Time taken for tests: 0.575 seconds
# duration of the entire test
Complete requests: 1000
# number of completed requests
Failed requests: 0
# number of failed requests
Write errors: 0
Total transferred: 171171 bytes
# Network traffic in the whole process
HTML transferred: 15015 bytes
# the amount of HTML content transferred throughout the process
Requests per second: 1739.26 [# / sec] (mean)
# one of the most important metrics, equivalent to the number of transactions per second in LR. The mean in parentheses indicates that this is an average.
Time per request: 57.496 [ms] (mean)
# the second of the most important metrics is equivalent to the average transaction response time in LR. The mean in parentheses indicates that this is an average-"calculation formula: transaction volume = nmax c, transaction average response time = total elapsed time / transaction volume
Time per request: 0.575 [ms] (mean, across all concurrent requests)
# average of the actual elapsed time per connection request
Transfer rate: 290.73 [Kbytes/sec] received
# average traffic per second on the network, which can help eliminate the problem of excessive network traffic leading to longer response time
Connection Times (ms) min mean [+ /-sd] median maxConnect: 0 68.5 1 28Processing: 1 49 18.4 51 113Waiting: 0 46 17.2 49 91 Total: 11 55 19.5 54 140
# the response of all requests in the entire scenario. There is a response time for each request in the scenario, in which 50% of users have a response time of less than 54 milliseconds, 66% of users have a response time of less than 58 milliseconds, and the maximum response time is less than 140 milliseconds. Cpu does not actually process concurrent requests at the same time, but rotates them one by one according to the time slices obtained by each request, so basically the first Time per request time is approximately equal to the second Time per request time multiplied by the number of concurrent requests.
Summary: the effect of remote stress testing on web servers is often not ideal (because of excessive network latency). It is recommended to use another or more servers in the private network to test through the private network. The data obtained in this way will be much more accurate. If there is only a single server, it can be tested directly locally, which is more accurate than remote testing.
This article is from a personal blog: http://www.forgecode.cn/250.html
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.