Search code examples
apachebenchmarkingmod-deflate

Apache benchmark load-test: mod_deflate enabled vs disabled


I'm running a simple load test with apache benchmark:

ab -n 1 http://localhost/mysite/index/index/

I want to see performance with/without mod_deflate

In my httpd.conf:

#mod_deflate enabled
LoadModule deflate_module modules/mod_deflate.so
#mod_deflate disabled
#LoadModule deflate_module modules/mod_deflate.so 

enter image description here

  • It looks like server without mod_deflate is performing better than with mod_deflate enabled (see "time taken for tests","Requests per seconds" and "time per requests").

  • Plus I dont understand why total transferred is bigger with deflate enabled

Please explain me

thanks

Luca


Solution

  • apachebench (ab.exe) will run without compression enabled by default.

    To enable compression you have to add an additional header to the request.

    ab -n 1 -H "Accept-Encoding: gzip,deflate" "http://localhost/mysite/index/index/"