After enabling gzip compression during my Apache server (mod_deflate) I discovered consistently that consumer had been offered normally 200 ms reduced than uncompressed reactions.

It was unpredicted and so i modified the compression directive to simply compress text/HTML reactions, thrilled wireshark and checked out the network dump pre and post compression.

Listed here are my findings of the GET with minimum traffic within the network

Before Compression

Transactions around the wire: 46

Total time for 46 trans: 791ms

  i. TCP seq/ack:       14ms

 ii. first data segment: 693ms

iii. Remaining:         83ms (27/28 data models moved + tcp/ip handshakes)

After Compression

Transactions around the wire: 10

Total time for 46 trans: 926ms

  i. TCP seq/ack:       14ms

 ii. first data segment: 746ms

iii. Remaining:        165ms  (5 from 6 data models transfered)

Following the compression was place it is obvious and understandable that the amount of transactions around the wire are considerably less than uncompressed.

However, the compressed data unit required a lot more extended period to transfer from source to destination.

It seems the additional work of compression is naturally spending time but could not realise why each data sent was considerably reduced when compressed.

My knowledge of the compression process is:

  1. GET Request is received by Apache

  2. Apache identifies resource

  3. Compress the resource

  4. Respond with compressed response

With this particular plan, I'd think that 3rd step is (the step before the initial segment from the response would take a longer period since we're -- blending + reacting -- however the relaxation from the portions I believed should take normally equal time because the uncompressed portions but they're not.

Can anybody let me know why... or suggest an easy method to evaluate this. Also does anybody possess a pre and post comparison... I'd appreciate any feedback/comments/questions

I had been using inadequate test to check the 2 situations (i believe under 100 assets). With plenty of tests -- a lot more than 6000 web addresses, it demonstrated the compressed response time for you to first byte was faster by 200 milliseconds in serving text/html, while TTLB was faster by 25 milliseconds around the average.

I've not load examined this that we expect to do increase this answer.