Compression working in distcc
I got LZO compression working for distcc in CVS last night. The compressed:plain ration for preprocessed source is typically 25%, and about on 70% on non-debug object files. In other words the amount of network traffic is cut by a factor of nearly four, since source files are typically much larger than the output.
This should help compile times when the network is a limiting factor. That is, when there are many remote machines, or the network is quite slow because it's wireless or already loaded. It might even help in other cases because the compiler can start relatively earlier, and we need to do a few less IOs and therefore less work on the kernel. The drawback is a little more work in userspace to do compression, and we can no longer use sendfile() for transmission.
Early tests indicate that for three machines on a 100Mbps network it is roughly the same speed as uncompressed traffic. It's within experimental variation, which is about 10s for a 5 minute build of Samba or the Linux kernel. The network is not saturated, so I think the extra CPU overhead of doing compression is cancelled out by the reduced network transit time.
Compression completely dominates the CPU usage of the distcc client, although it is quite small compared to preprocessing and compiling.
Note that the version in CVS is currently not compatible with earlier releases, although it will be by the time 2.9 is out.
Given all this I think it will not be on by default, because it's not compatible with older servers. It should be good to turn it on primarily if you are on a slow or high-latency network, and in particular for wireless networks.
posted Tue 15 Jul 2003 in /projects/distcc | link
Archives 2008: Apr Feb 2007: Jul May Feb Jan 2006: Dec Nov Oct Sep Aug Jul Jun Jan 2005: Sep Aug Jul Jun May Apr Mar Feb Jan 2004: Dec Nov Oct Sep Aug Jul Jun May Apr Mar Feb Jan 2003: Dec Nov Oct Sep Aug Jul Jun May
Copyright (C) 1999-2007 Martin Pool.