Reputation: 37136
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
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
Upvotes: 5
Views: 3354
Reputation: 6522
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/"
Upvotes: 7
Reputation: 131841
This hardly depends what is transferred. If you just send a simple "Hello world" the overhead of the compression may be bigger, than the compressed content itself. The bigger the payload is, the better a compression can work. In your example I see 7kB data, which also contains the http headers, that cannot get compressed (at least because there is mentioned, that the data is compressed an how ;)).
Also note, that a "benchmark", with one sample is nearly useless (especially with such a small sample size). Once again in your example I see not one better and one worse request, I see two nearly identical request. The difference is negligible.
Upvotes: 0