ab

ab is a tool for benchmarking your Hypertext Transfer Protocol (HTTP) server. It is designed to give you an impression of how your current Apache installation performs. This especially shows you how many requests per second your Apache installation is capable of serving.

Gnuplot

Gnuplot is a free, command-driven, interactive, function and data plotting program.

Benchmark

We run ab2 against my site, http://lotto-kim.net with 1000 requests and 100 concurrent connections and store the request time with -g.

kim@lotta:~> ab2 -g http_benchmark.txt -n 1000 -c 100 http://lotto-kim.net/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking interira.no.ezpublish10.ezdeal.no (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests


Server Software:        Apache/2.2.3
Server Hostname:        lotto-kim.net
Server Port:            80

Document Path:          /
Document Length:        11313 bytes

Concurrency Level:      100
Time taken for tests:   27.395710 seconds
Complete requests:      1000
Failed requests:        9
   (Connect: 0, Length: 9, Exceptions: 0)
Write errors:           0
Total transferred:      11725880 bytes
HTML transferred:       11271195 bytes
Requests per second:    36.50 [#/sec] (mean)
Time per request:       2739.571 [ms] (mean)
Time per request:       27.396 [ms] (mean, across all concurrent requests)
Transfer rate:          417.99 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   62 152.5      0    1047
Processing:   228 2652 859.6   2751    6719
Waiting:      191 1966 764.0   2006    5679
Total:        229 2715 851.5   2780    6719

Percentage of the requests served within a certain time (ms)
  50%   2780
  66%   3030
  75%   3210
  80%   3312
  90%   3697
  95%   4023
  98%   4318
  99%   4660
 100%   6719 (longest request)

Results

kim@lotta:~> gnuplot
set terminal png
set output "http_benchmark.png"
set xlabel "request"
set ylabel "ms"
plot "http_benchmark.txt" using 7 with lines title "ctime", \
 "http_benchmark.txt" using 8 with lines title "dtime", \
 "http_benchmark.txt" using 9 with lines title "ttime", \
"http_benchmark.txt" using 10 with lines title "wait"

Here is the result of the benchmark plotted into a graph.

WebDAV is an abbreviation for "Web-based Distributed Authoring and Versioning" (published as an open standard under RFC 2518). WebDAV is a set of extensions to the HTTP protocol which allows users to collaboratively edit and manage files on a web server. Using a WebDAV compatible client, the user connects to the server and is able to browse and manage files in a similar way as with a network share or an FTP server. In other words, what this protocol does is that it makes it possible to browse, create, remove, upload, download, rename, etc. files and directories on a web server. One of the most important advantages of this technology is that it uses port 80 for network traffic. This means that if you are able to surf the site from your workstation, you can also use WebDAV to administer it.

Configuration

The first you need to do is to set up a virtualhost for your webserver.

Apache HTTPD

<VirtualHost 89.250.126.18>
ServerName webdav.lotto-kim.net
        <Directory /home/sites/lotto-kim.net/www>
                Options indexes FollowSymLinks
                AllowOverride None
                Order allow,deny
                Allow from All
        </Directory>
        DocumentRoot /home/sites/lotto-kim.net/www
        RewriteEngine On
        RewriteRule !\.(css|jar|js|html|php)$ 
/home/sites/lotto-kim.net/www/webdav.php
        CustomLog "|/usr/sbin/rotatelogs2
 /var/log/sites/www.lotto-kim.net/www 3600" combined
        ErrorLog "/var/log/sites/www.lotto-kim.net/error_log
        RewriteLog /var/log/sites/www.lotto-kim.net/rewrite_log
        RewriteLogLevel 0
        <Location />
                php_admin_value upload_tmp_dir /home/sites/lotto-kim.net/tmp
                php_admin_value open_basedir /home/sites/lotto-kim.net:
/usr/local/bin:/usr/local/imagemagick/bin:
        </Location>
</VirtualHost>

Lighttpd

$HTTP["host"] == "webdav.lotto-kim.net" {
 var.server_name = "webdav.lotto-kim.net"
 server.name = server_name
 server.document-root = server_root + "lotto-kim.net/www"
 accesslog.filename          = "/var/log/sites/lotto-kim.net/www"
 url.rewrite-once = ("^/.*$" => "/webdav.php")
}

Enable WebDav in eZ Publish

WebDav is disabled in eZ Publish as default, so we need to be enable it to get it working.

# echo -e "[GeneralSettings]\nEnableWebDAV=true\n" >> webdav.ini.append.php

Testing

I'm using cadaver to check if webdav is working on my domain, you can of course use other clients as well.

# cadaver webdav.lotto-kim.net
dav:/> ls site
Listing collection `/site/': Authentication required for eZ publish WebDAV
 interface on server `webdav.lotto-kim.net':
Username: admin
Password:
Retrying: succeeded.
Coll:   Content                                0  Aug 23 21:11
Coll:   Media                                  0  Aug 23 21:11
dav:/> ls
Listing collection `/': succeeded.
Coll:   eng                                    0  Aug 23 21:11
Coll:   site                                   0  Aug 23 21:11
Coll:   siteadmin                              0  Aug 23 21:11
dav:/> cd site
dav:/site/> ls
Listing collection `/site/': succeeded.
Coll:   Content                                0  Aug 23 21:11
Coll:   Media                                  0  Aug 23 21:11
dav:/site/> cd Content
dav:/site/Content/> ls
Listing collection `/site/Content/': succeeded.
Coll:   Blog                                   0  Aug 23 21:47
Coll:   Contact                                0  Aug 27 23:05
Coll:   Photos                                 0  Aug 27 23:06
Coll:   Projects                               0  Aug 27 23:07

my blog

Mon Tue Wed Thu Fri Sat Sun
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        
eZ publish™ copyright © 1999-2008 eZ systems as