ccache
ccache is a compiler cache. It speeds up recompilation by caching previous compilations and detecting when the same compilation is being done again. Supported languages are C, C++, Objective-C and Objective-C++.
Mac:
|
|
Ubuntu:
|
|
distcc on Ubuntu
distcc is a program to distribute compilation of C or C++ code across several machines on a network. distcc should always generate the same results as a local compile, is simple to install and use, and is often two or more times faster than a local compile.
Install:
|
|
Usage:
|
|
Cost:
normal | ccache | distcc | distcc + ccache | |
---|---|---|---|---|
cost | 4.069s | 0.134s | 1.301s | 1.296s |
P.S. distcc: 2 quad-core pc, -j12
normal | make | make -j4 |
---|---|---|
cost | 4.069s | 1.403s |
Use with ccache:
NOTE: This use of ccache is incompatible with use of distcc’s “pump” mode.
distcc on Mac
Install:
|
|
Usage:
|
|
Note: It is recommended that using distcc splits different platforms.
dmucs on Ubuntu
DMUCS is a system that allows a group of users to share a compilation farm. Each compilation request from each user will be sent to the fastest available machine, every time.
Install:
|
|
P.S. Unfortunately, this fix doesn’t work on my Ubuntu, although
start_loadavg
result is ok ==.You could log the output of “/etc/init.d/dmucs” script, add this at the top:
12 exec 1>/tmp/init.log 2>&1set -x
Server machine (e.g. 192.168.199.210):
|
|
Each host (e.g. 192.168.199.104 192.168.199.247):
|
|
Usage:
|
|
Issue: loadavg
get wrong host on Ubuntu 14.04, then dmucs
not recognize the hosts
Run loadavg -s 192.168.199.210 -D
, see “Writing –>127.0.1.1 …<– to the server”.
Easily avoid this issue as follows:
|
|
However, it will affect dnsmasq at least.
Learn more, plz google “127.0.1.1”, “ubuntu dnsmasq 127.0.1.1”.