📄 readme
字号:
Connection length [replies/conn]: 1.000** "Request" ResultsThe first line in the "Request"-related results give the rate at whichHTTP requests were issued and the period-length that the ratecorresponds to. In the example below, the request rate was 10.1requests per second, which corresponds to 99.1 milliseconds perrequest. Request rate: 10.1 req/s (99.1 ms/req)As long as no persistent connections are employed, the "Request"results are typically very similar or identical to the "Connection"results. However, when persistent connections are used, severalrequests can be issued on a single connection in which case theresults would be different.The next line gives the average size of the HTTP request in bytes. Inthe line show below, the average request size was 57 bytes. Request size [B]: 57.0** "Reply" ResultsFor simple measurements, the section with the "Reply" results isprobably the most interesting one. The first line gives statistics onthe reply rate: Reply rate [replies/s]: min 10.0 avg 10.0 max 10.0 stddev 0.0 (1 samples)The line above indicates that the minimum ("min"), average ("avg"),and maximum ("max") reply rate was ten replies per second. Giventhese numbers, the standard deviation is, of course, zero. The lastnumber shows that only one reply rate sample was acquired. Thepresent version of httperf collects one rate sample about once everyfive seconds. To obtain a meaningful standard deviation, it isrecommended to run each test long enough so at least thirty samplesare obtained---this would correspond to a test duration of at least150 seconds, or two and a half minutes.The next line gives information on how long it took for the server torespond and how long it took to receive the reply. The line belowshows that it took 4.1 milliseconds between sending the first byte ofthe request and receiving the first byte of the reply. The time to"transfer", or read, the reply was too short to be measured, so itshows up as zero (as we'll see below, the entire reply fit into asingle TCP segment and that's why the transfer time was measured aszero). Reply time [ms]: response 4.1 transfer 0.0Next follow some statistics on the size of the reply---all numbers arereported in bytes. Specifically, the average length of reply headers,the average length of the content, and the average length of replyfooters are given (HTTP/1.1 uses footers to realize the "chunked"transfer encoding). For convenience, the average total number ofbytes in the replies is also given. In the example below, the averageheader length ("header") was 219 bytes, the average content length("content") was 204 bytes, and there were no footers ("footer"),yielding a total reply length of 423 bytes on average. Reply size [B]: header 219.0 content 204.0 footer 0.0 (total 423.0)The final piece in this section is a histogram on the status codesreceived in the replies. The example below shows that all 100 replieswere "successful" replies as they contained a status code of 200(presumably): Reply status: 1xx=0 2xx=100 3xx=0 4xx=0 5xx=0** Miscellaneous ResultsThis section starts with a summary of the CPU time the clientconsumed. The line below shows that 2.71 seconds were spent executingin user mode ("user"), 7.08 seconds were spent executing in systemmode ("system") and that this corresponds to 27.4% user mode executionand 71.5% system execution. The total utilization was almost exactly100%, which is expected given that httperf is a CPU hog: CPU time [s]: user 2.71 system 7.08 (user 27.4% system 71.5% total 98.8%)Note that any time the total CPU utilization is significantly lessthan 100%, some other processes must have been running on the clientmachine while httperf was executing. This makes it likely that theresults are "polluted" and the test should be rerun.The next line gives the average network throughput in kilobytes persecond (where a kilobyte is 1024 bytes) and in megabits per second(where a megabit is 10^6 bit). The line below shows an averagenetwork bandwidth of about 4.7 kilobyte per second. The megabit persecond number is zero due to rounding errors. Net I/O: 4.7 KB/s (0.0*10^6 bps)The network bandwidth is computed from the number of bytes sent andreceived on TCP connections. This means that it accounts for thenetwork payload only (i.e., it doesn't account for protocol headers)and does not take into account retransmissions that may occur at theTCP level.** "Errors"The final section contains statistics on the errors that occurredduring the test. The "total" figure shows the total number of errorsthat occurred. The two lines below show that in our example run therewere no errors: Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0 Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0The meaning of each error is described below: total: The sum of all following error counts. client-timo: Each time a request is made to the server, a watchdog timer is started. If no (partial) response is received by the time the watchdog timer expires, httperf times out that request a increments this error counter. This is the most common error when driving a server into overload. socket-timo The number of times a TCP connection failed with a socket-level time out (ETIMEDOUT). connrefused The number of times a TCP connection attempt failed with a "connection refused by server" error (ECONNREFUSED). connreset The number of times a TCP connection failed due to a reset (close) by the server. fd-unavail The number of times the httperf client was out of file descriptors. Whenever this count is bigger than zero, the test results are meaning less because the client was overloaded (see discussion on setting --timeout below). addrunavail The number of times the client was out of TCP port numbers (EADDRNOTAVAIL). This error should never occur. If it does, the results should be discarded. ftab-full The number of times the system's file descriptor table was full. Again, this error should never occur. If it does, the results should be discarded. other The number of times other errors occurred. Whenever this occurs, it is necessary to track down the actual error reason. This can be done by compiling httperf with debug support and specifying option --debug 1.** Selecting appropriate timeout valuesSince the client machine has only a limited set of resource available,it cannot sustain arbitrarily high HTTP request rates. One limit isthat there are only roughly 60,000 TCP port numbers that can be in useat any given time. Since, on HP-UX, it takes one minute for a TCPconnection to be fully closed (leave the TIME_WAIT state), the maximumrate a client can sustain is about 1,000 requests per second.The actual sustainable rate is typically lower than this becausebefore running out of TCP ports, a client is likely to run out of filedescriptors (one file descriptor is required per open TCP connection).By default, HP-UX 10.20 allows 1024 file descriptors per process.Without a watchdog timer, httperf could potentially quickly use up allavailable file descriptors, at which point it could not induce any newload on the server (this would primarily happen when the server isoverloaded). To avoid this problem, httperf requires that the webserver must respond within the time specified by option --timeout. Ifit does not respond within that time, the client considers theconnection to be "dead" and closes it (and increases the "client-timo"error count). The only exception to this rule is that after sending arequest, httperf allows the server to take some additional time beforeit starts responding (to accommodate HTTP requests that take a longtime to complete on the server). This additional time is called the"server think time" and can be specified by option --think-timeout.By default, this additional think time is zero, so by default theserver has to be able to respond within the time allowed by the--timeout option.In practice, we found that with a --timeout value of 1 second, an HP9000/735 machine running HP-UX 10.20 can sustain a rate of about 700connections per second before it starts to run out of file descriptor(the exact rate depends, of course, on a number of factors). Toachieve web server loads bigger than that, it is necessary to employseveral independent machines, each running one copy of httperf. Atimeout of one second effectively means that "slow" connections willtypically timeout before TCP even gets a chance to retransmit (theinitial retransmission timeout is on the order of 3 seconds). This isusually OK, except that one should keep in mind that it has the effectof truncating the connection life time distribution.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -