In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces you Apache analysis of ab performance test results, the content is very detailed, interested friends can refer to, hope to be helpful to you.
I've always used Loadrunner for performance testing. Loadrunner is actually a very heavy performance testing tool. His function is very comprehensive, is a very good knife.
If we just need to do a simple performance test on a page, using Loadruner is not a good choice.
So I found a knife-ab to try. This knife is really light and sharp, here is a record of some of my own understanding of the ab testing process.
Let's sacrifice the knife with the home page of Baidu. First of all, you have to have a knife, that is, install Apache, and a lot of online tutorials will not be repeated. This article uses the ab command that comes with MacBook for testing.
Test scenario: simulate 10 users and initiate a total of 100 requests to Baidu home page.
Test command: ab-n 100-c 10 https://www.baidu.com/index.html
Mainly aims at the ab test report to carry on the analysis, about the ab use method to open again another day to communicate.
Test report:
The following line by line to explain my understanding, the following notes have access to online materials, but the content is written by hand after their own understanding, hoping to add their own understanding to make it easier for readers to understand.
Bogon:~ tang$ ab-n 100-c 10 https://www.baidu.com/index.html
This 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/
/ / the above is the version information of apache, which has nothing to do with this test
Benchmarking www.baidu.com (be patient). Done
/ / the above shows the completion of the test. The number of requests initiated by this test is small, the completion is fast, and there is no intermediate process to show. When the number of requests is large, the branch displays the current number of completions.
Server Software: bfe/1.0.8.14 / / the software information used by the server under test. Here we use the reverse proxy Baidu Front End developed by Baidu itself, similar to nginx.
Server Hostname: www.baidu.com / / hostname under test
Server Port: 443 / / the service port number of the host under test. Generally speaking, the default port number for http requests is 80cine https using port 443 by default.
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048128 / / encryption protocol
Document Path: / index.html / / specific file of the request
Document Length: 227 bytes / / requested file index.html size
Concurrency Level: 10 / / concurrency level, that is, the number of concurrency, the number specified by the-c parameter in the request
Time taken for tests: 1.093 seconds / / Total time spent on this test
Complete requests: 100 / / Total number of requests initiated in this test
Failed requests: 0 / / number of failed requests. Due to network reasons or server performance reasons, all requests may not be successful. The failure rate of requests can be calculated by dividing this number by Complete requests, which can be used as an important reference for test results.
Total transferred: 103314 bytes / / the total amount of data transmitted, which refers to the total amount of data received by ab from the server under test, including the text content and request header information of index.html.
HTML transferred: 22700 bytes / / the total size of the index.html file received from the server, equal to Document Length*Complete requests=227bytes*100=22700 bytes
Requests per second: 91.50 [# / sec] (mean) / average (mean) number of requests completed per second: QPS, which is an average, equal to Complete requests/Time taken for tests=100/1.093=91.50
Time per request: 109.287 [ms] (mean) / / from the user's point of view, the time it takes to complete a request (because there are more than one user and the server completes 10 requests, on average, each user receives a complete return, so this value is 10 times the next value. )
Time per request: 10.929 [ms] (mean, across all concurrent requests) / / the time it takes the server to complete a request.
Transfer rate: 92.32 [Kbytes/sec] received / / network transmission speed. For request testing of large files, this value can easily become a system bottleneck. To determine whether this value is a bottleneck, you need to know the network between the client and the server under test, including information such as network bandwidth and network card speed.
Connection Times (ms)
Min mean [+ /-sd] median max
Connect: 47 74 12.9 74 106
Processing: 9 32 20.2 32 106
Waiting: 9 29 19.1 27 98
Total: 66 106 20.8 106 195
/ / the table composed of these rows is mainly broken down and counted for the response time, that is, the first Time per request. The response time of a request can be divided into three parts: network link (Connect), system processing (Processing) and waiting (Waiting). In the table, min represents the minimum; mean represents the average; and [+ /-sd] represents the standard deviation (Standard Deviation), also known as the mean variance (mean square error). This concept has been learned in math class in middle school, indicating the degree of discretization of the data. The higher the value, the more scattered the data, the more unstable the response time of the system. Median represents the median; max, of course, represents the maximum.
/ / it should be noted that the Total in the table is not equal to the addition of the first three rows of data, because the data of the first three rows are not collected in the same request. The network latency of a request may be the shortest, but the system processing time is the longest. So Total is counted in terms of the time required for the entire request. Here you can see that the slowest request cost 195ms, which can be validated in the table below.
Percentage of the requests served within a certain time (ms)
50% 106
66% 109
75% 111
80% 114
90% 118
95% 154
98% 176
99% 195
100% 195 (longest request)
/ / the first row of this table indicates that 50% of the requests are completed within 106ms, and you can see that this value is relatively close to the average system response time (first Time per request: 109.287 [ms] (mean))
And so on, 90% of requests are less than or equal to 118ms. Just now we saw that the request with the longest response time is 195ms, so it is obvious that the time of all requests (100%) is less than or equal to 195ms, that is, the data in the last row of the table must be the request with the longest time (longest request).
On the Apache analysis of ab performance test results are shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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