Skip to content

Instantly share code, notes, and snippets.

@darkhelmet
Created August 29, 2009 23:37
Show Gist options
  • Save darkhelmet/177750 to your computer and use it in GitHub Desktop.
Save darkhelmet/177750 to your computer and use it in GitHub Desktop.
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking blog.darkhax.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Finished 400 requests
Server Software: Apache/2.2.8
Server Hostname: blog.darkhax.com
Server Port: 80
Document Path: /
Document Length: 117077 bytes
Concurrency Level: 10
Time taken for tests: 4.027 seconds
Complete requests: 400
Failed requests: 0
Write errors: 0
Total transferred: 47249752 bytes
HTML transferred: 46972774 bytes
Requests per second: 99.32 [#/sec] (mean)
Time per request: 100.682 [ms] (mean)
Time per request: 10.068 [ms] (mean, across all concurrent requests)
Transfer rate: 11457.40 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 13 2.8 13 20
Processing: 33 87 9.4 86 125
Waiting: 1 24 7.5 23 65
Total: 34 99 9.7 99 127
Percentage of the requests served within a certain time (ms)
50% 99
66% 102
75% 105
80% 106
90% 110
95% 113
98% 120
99% 123
100% 127 (longest request)
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking blog.darkhax.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Finished 400 requests
Server Software: Apache/2.2.8
Server Hostname: blog.darkhax.com
Server Port: 80
Document Path: /
Document Length: 117077 bytes
Concurrency Level: 10
Time taken for tests: 112.432 seconds
Complete requests: 400
Failed requests: 1
(Connect: 0, Receive: 0, Length: 1, Exceptions: 0)
Write errors: 0
Total transferred: 47082350 bytes
HTML transferred: 46830350 bytes
Requests per second: 3.56 [#/sec] (mean)
Time per request: 2810.809 [ms] (mean)
Time per request: 281.081 [ms] (mean, across all concurrent requests)
Transfer rate: 408.95 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.6 0 4
Processing: 1742 2802 446.6 2786 4471
Waiting: 1718 2714 417.2 2679 4346
Total: 1742 2802 446.7 2786 4471
Percentage of the requests served within a certain time (ms)
50% 2786
66% 2981
75% 3130
80% 3189
90% 3429
95% 3584
98% 3753
99% 3830
100% 4471 (longest request)
# default backend config
backend webserver {
.host = "127.0.0.1";
.port = "81";
}
# this is the main config
sub vcl_recv {
# do not cache POST requests
if (req.request == "POST") {
pipe;
}
# cache multimedia
if (req.request == "GET" && req.url ~ "\.(jpg|jpeg|gif|ico|png)$") {
lookup;
}
# cache other static files
if (req.request == "GET" && req.url ~ "\.(css|js|pdf|xls|vsd|doc|ppt|iso)$") {
lookup;
}
# ignore my tracks install
if (req.http.host ~ "tracks\.darkhelmetlive\.com") {
pipe;
}
# too hard
if (req.http.Expect) {
pipe;
}
if (req.http.If-None-Match) {
pass;
}
# pass to backend if we have HTTP authentication
if (req.http.Authenticate || req.http.Authorization) {
pass;
}
# speed up wordpress
if (req.http.host ~ "blog") {
# but ignore these things, since they are outside admin
if (req.url ~ "(one-click-plugin-updater|kimili)") {
pipe;
}
# keep cookies for admin
if (!(req.url ~ "wp-(login|admin)")) {
unset req.http.cookie;
}
}
lookup;
}
sub vcl_hash {
set req.hash += req.url;
if (req.http.host) {
set req.hash += req.http.host;
} else {
set req.hash += server.ip;
}
hash;
}
sub vcl_fetch {
if (!obj.cacheable) {
pass;
}
# Handle X-Accel-Redirect
if (obj.http.x-accel-redirect ~ ".*") {
set req.url = obj.http.x-accel-redirect;
restart;
}
if (req.http.host ~ "blog") {
if (!(req.url ~ "wp-(login|admin)")) {
unset obj.http.cookie;
}
}
deliver;
}
sub vcl_hit {
if (!obj.cacheable) {
pass;
}
deliver;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment