In order to know whether the application would make the right decision for using compression, we did experiments on data transmission with and without compression separately, measuring and comparing their execution time. The experiment pseudocode is shown in Fig. 7 and Fig. 8; the data is split into multiple chunks, and it process one chunk each loop. We believe this is the most general way of transferring large data set. We repeat the same experiment 20 times with the size of the data involved in network transmission increased by 1MB each loop, where the data size starts from 1MB, and the data source is a large binary code file. We take the averaged value as the final measurement. We repeat the same experiment, with competing traffic changing from 0 to 8Mbps.
Fig. 9(a) shows the predicted and measured total execution time for both in compression and in uncompression mode. Although in some cases, the absolute error in this figure is not minor, the predicted relationship between the elapsed time with and without compression is the same as that of the measured values. When the available bandwidth is less than 7Mbps, compression mode is faster than uncompression mode; and the uncompression mode shows its advantage when the available bandwidth is bigger than 7Mbps. That means that the application in Section 2 would make the correct decision.
Fig. 9(b) shows the application measured local compression time and the network transmission time when we use compression in data transmission. We can see that the local compression time does not show significant changes, which is easy to understand, since it is not affected by the available bandwidth. But the network transmission time looks strange: it does not change very much as the available bandwidth changes from 3Mbps to 10Mbps, unlike the predicted value, which decreases proportionally with the increase of available bandwidth. The reason, which will be discussed in detail in Section 4, is that with the interleaving of local compression and network transmission, there exists execution overlap between the Compression Module and the Network Module, and the application measured network overhead is actually not the real data transmission time. That basically invalidates the simple model shown in formulas (1) - (5).