This one is a little less obvious and there are two components. For starters, if you’re compressing files that are smaller than the MTU size of a TCP packet, you’re wasting your time. 1500 bytes is the MTU size for the internet since that is the largest size allowed at the network layer. If you take a file that is 1300 bytes and compress it to 800 bytes, it’s still transmitted in that same 1500 byte packet regardless, so you’ve gained nothing. That being the case, you should restrict the gzip compression to files with a size greater than a single packet, 1400 bytes (1.4KB) is a safe value.
What is recommended minimum object size for gzip performance benefits?
The reasons 860 bytes is the minimum size for compression is twofold: (1) The overhead of compressing an object under 860 bytes outweighs performance gain. (2) Objects under 860 bytes can be transmitted via a single packet anyway, so there isn’t a compelling reason to compress them.
View HTTP Request and Response Headers
Check filesize and gzip compression
PostgreSQL Performance Monitoring
VividCortex is the easiest, safest, and most detailed way to monitor PostgreSQL. Unlike other tools that just capture a few status metrics or check that a SELECT 1 query executes OK, VividCortex measures every query, every process, and every metric on your entire system, down to the microsecond, in industry-leading 1-second resolution, with no performance impact to the system itself.