Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a server that currently does a lot of processing in my application and the target users are those who have a very good internet connection.

The output that is sent from the server is always text/html and we do not use any media (audio/video) only images (static site images like logo,etc).

We are experiencing severe performance issues and I wonder if turning off gzip/mod_deflate on the server so that the server would avoid compressing the output. Will this cause an improvement in performance?

share|improve this question

migrated from stackoverflow.com Mar 9 '11 at 18:54

This question came from our site for professional and enthusiast programmers.

    
Impossible to answer without more detailed information, but I think it's unlikely to be the compression... Anyway, voting to migrate to serverfault.com –  Pekka 웃 Mar 9 '11 at 13:44
    
there is only one way to find out for sure. –  vidstige Mar 9 '11 at 13:48
add comment

3 Answers

In theory disabling compression should free up the CPU somewhat but it is impossible to say exactly how much. Your best bet would be to use a benchmarking application like ApacheBench or siege and test your server's capabilities with compression enabled and disabled. If your server is under heavy load and can't be easily benchmarked you can try just disabled compression and see if the CPU load changes noticeably (a monitoring application would help here).

Speaking from experience, though, if you're in a situation where you have to disable compression due to high loads you're going to have to look at other solutions as well (bigger server, more servers, different architecture, application optimization, etc...).

share|improve this answer
add comment

For text / html having gzip is normally a good thing. The question is: What exactly is the perf issue, and is it caused by your application code, or by the gzip overhead?

In our experience, gzip adds approx %1-9 of CPU user, over the CPU use of our app. IOW, the CPU load is all in our app.

Another consideration SSL: If your web server terminates SSL (has ssl cert, etc) this overhead can be considerable. We recently installed SSL certs into our loadbalancer, and CPU use on the web server went down by almost half. (We primarily serve a REST API, so the SSL is rebuilt all the time for transactional conversations.).

Our setup is IIS 6 and IIS 7, fwiw, but the above would apply to any OS.

share|improve this answer
add comment

Compression is good for static content (things that haven't been compressed already too, don't try to recompress images and zip files). Compression is generally bad for dynamic content as the overhead eats up any potential gains.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.