ID #1005
Apache Webserver testen (Benchmark)
Beispiel:
$ su
$ ab -kc 10 -t 30 http://localhost/
|
oder
$ sudo ab2 -kc 10 -t 30 http://localhost/
|
Wichtig ist der Slash am Ende der URL!
Erläuterung:
Es wird mit 10 Anfragen parallel rausgeschickt. Dabei wird für die Anfragen ein Timeout von 30 Sekunden gesetzt. Danach gibt es eine Auswertung.
Ausgabe/Auswertung:
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient) Completed 5000 requests Completed 10000 requests Completed 15000 requests Completed 20000 requests Finished 21886 requests Server Software: Apache/2.0.53 Server Hostname: localhost Server Port: 80
Document Path: / Document Length: 1693 bytes
Concurrency Level: 10 Time taken for tests: 30.6090 seconds Complete requests: 21886 Failed requests: 0 Write errors: 0 Keep-Alive requests: 21674 Total transferred: 43434176 bytes HTML transferred: 37052998 bytes Requests per second: 729.39 [#/sec] (mean) Time per request: 13.710 [ms] (mean) Time per request: 1.371 [ms] (mean, across all concurrent requests) Transfer rate: 1413.58 [Kbytes/sec] received
Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 1.3 0 40 Processing: 1 13 16.3 12 1158 Waiting: 0 12 16.2 11 1158 Total: 1 13 16.5 12 1158
Percentage of the requests served within a certain time (ms) 50% 12 66% 12 75% 13 80% 14 90% 17 95% 22 98% 41 99% 65 100% 1158 (longest request)
|
Online-Hilfe
$ ab2 --help
b2: wrong number of arguments Usage: ab2 [options] [http://]hostname[:port]/path Options are: -n requests Number of requests to perform -c concurrency Number of multiple requests to make -t timelimit Seconds to max. wait for responses -p postfile File containing data to POST -T content-type Content-type header for POSTing -v verbosity How much troubleshooting info to print -w Print out results in HTML tables -i Use HEAD instead of GET -x attributes String to insert as table attributes -y attributes String to insert as tr attributes -z attributes String to insert as td or th attributes -C attribute Add cookie, eg. 'Apache=1234. (repeatable) -H attribute Add Arbitrary header line, eg. 'Accept-Encoding: gzip' Inserted after all normal header lines. (repeatable) -A attribute Add Basic WWW Authentication, the attributes are a colon separated username and password. -P attribute Add Basic Proxy Authentication, the attributes are a colon separated username and password. -X proxy:port Proxyserver and port number to use -V Print version number and exit -k Use HTTP KeepAlive feature -d Do not show percentiles served table. -S Do not show confidence estimators and warnings. -g filename Output collected data to gnuplot format file. -e filename Output CSV file with percentages served -h Display usage information (this message)
|
Tags: Apache, Benchmark
Verwandte Artikel:
1047/39%Letzte Änderung des Artikels: 2007-05-16 14:12
Verfasser des Artikels: Florian Schrön
Revision: 1.0
Kommentieren nicht möglich