Let us understand when MySQL compressed protocol should be used −
The compression operation is used only if both client and server support ‘zlib’ compression, and the client requests compression.
The advantage of using compression is that it reduces the size of the payload.
On the other hand, the disadvantage of using compression is that it increases the computation time.
Performance benefits will depend largely on the size of the result set which is being sent.
In addition to this, the network bandwidth and latency between the database server and its clients also matters.
The larger the result set, the larger will be the latency.
In other words, the lesser the bandwidth, the more likely the user would see the benefit of compression.
The maximum level of service is limited to the smallest bottleneck. Hence, it is required to analyse the position regarding network and CPU resources in the current time.
The most optimized database server would utilize 100% of its CPU 100% of the time, otherwise the computing resources get wasted if it has a processor that is sitting idle.