I'd like to optimize an Odoo-installation with Varnish 4. Odoo uses Python / Werkzeug to deliver HTML. Odoo 8.0rc1 and Varnish 4.0.1-2~trusty on Ubuntu 14.04. Both Odoo/Varnish are installed on the same server. With a simple test using ab I got 117 requests per second without Varnish (on port 8069) and 116 with Varnish. On the serverside I got the Odoo-server slightly more loaded (10%) not using Varnish.
Any ideas?
This is directly to Odoo:
aw@lian:~$ ab -n 1000 -c 20 http://myodoo.example.com:8069/web
This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking xxx (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
Completed 1000 requests
Finished 1000 requests
Server Software: Werkzeug/0.9.4
Server Hostname:
Server Port: 8069
Document Path: /web
Document Length: 251 bytes
Concurrency Level: 20
Time taken for tests: 8.516 seconds
Complete requests: 1000
Failed requests: 0
Non-2xx responses: 1000
Total transferred: 476000 bytes
HTML transferred: 251000 bytes
Requests per second: 117.42 [#/sec] (mean)
Time per request: 170.323 [ms] (mean)
Time per request: 8.516 [ms] (mean, across all concurrent requests)
Transfer rate: 54.58 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 29 33 2.5 33 38
Processing: 43 136 28.0 133 226
Waiting: 43 135 28.0 133 225
Total: 73 169 28.3 167 259
Percentage of the requests served within a certain time (ms)
50% 167
66% 178
75% 186
80% 192
90% 209
95% 221
98% 235
99% 242
100% 259 (longest request)
This is via Varnish:
aw@lian:~$ ab -n 1000 -c 20 http://myodoo.example.com/web
This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking xxxx (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
Completed 1000 requests
Finished 1000 requests
Server Software: Werkzeug/0.9.4
Server Hostname:
Server Port: 80
Document Path: /web
Document Length: 251 bytes
Concurrency Level: 20
Time taken for tests: 8.603 seconds
Complete requests: 1000
Failed requests: 0
Non-2xx responses: 1000
Total transferred: 536197 bytes
HTML transferred: 251000 bytes
Requests per second: 116.23 [#/sec] (mean)
Time per request: 172.067 [ms] (mean)
Time per request: 8.603 [ms] (mean, across all concurrent requests)
Transfer rate: 60.86 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 29 33 2.5 33 38
Processing: 66 138 31.7 132 272
Waiting: 66 137 30.1 132 255
Total: 95 171 32.1 166 305
Percentage of the requests served within a certain time (ms)
50% 166
66% 178
75% 186
80% 194
90% 212
95% 233
98% 262
99% 279
100% 305 (longest request)
aw@lian:~$