Tiny Core Extensions > TCE Q&A Forum
Setting up distcc
polikuo:
Hi Rich.
I think I found something
--- Quote from: polikuo on January 24, 2022, 11:29:45 AM ---Compile Flags:
--- Code: ---CFLAGS='-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -flto -fuse-linker-plugin -fno-exceptions'
CXXFLAGS='-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -flto -fuse-linker-plugin -fno-exceptions -fno-rtti'
LDFLAGS='-Wl,-O1'
--- End code ---
--- End quote ---
I usually compile with LTO enabled.
When I remove that from the flags, pi3 receives the packages.
Then I take the chance and try that out with fltk-1.3.8
--- Code: ---# with gcc on pi4
time make -j5
real 0m 42.95s
user 2m 30.94s
sys 0m 17.59s
# with distcc
time make -j10
real 2m 57.41s
user 0m 11.21s
sys 0m 10.55s
--- End code ---
polikuo:
OK, I think I have things sort out.
Before I pack the extensions,
I'd like to hear out your opinions and leave my notes here.
Distcc has various modes: pump TCP, plain TCP, ssh ... etc
I'm using pump mode TCP, I believe it's more favorable in most use case.
I could setup the tce.installed script for that.
However, there are Client/Worker and Server(s)/Volunteer(s), different machine require different setting.
I'm planning to start the TCP daemon as server by default.
This way, folks can build clusters much easier, just load up the compiler and headers, no extra configuration needed.
This is what I use for my pies (Volunteer, pi3).
--- Code: ---distccd --daemon --allow 192.168.0.40 --verbose --log-file=/home/tc/distccd.log
--- End code ---
To make it more general purpose, I could go:
--- Code: ---# touch /var/log/distccd.log
# chmod 666 /var/log/distccd.log
# distccd --daemon --allow 192.168.0.0/24 --allow 192.168.1.0/24 --allow 10.0.0.0/24 --allow 10.1.1.0/24 --verbose --log-file=/var/log/distccd.log
--- End code ---
Note that "/24" is a CIDR mask.
For the Worker (pi4)
--- Code: ---$ vi ~/.distcc/hosts
localhost
192.168.0.30,lzo,cpp
--- End code ---
The ",lzo,cpp" suffix tells distcc to pump for this server.
You don't need that for localhost, it will only slow down the compilation.
For the record, you can limit the job counts (threads) here.
--- Code: ---localhost/2
192.168.0.30/2,lzo,cpp
--- End code ---
Here, "/2" states job limit, not a CIDR mask
To compile (on pi4):
Export PATH with /usr/lib/distcc (can't post the code because forum error)
Configure like you normally would
--- Code: ---pump make -j10
--- End code ---
P.S. The internal IP of my pies
Pi3: 192.168.0.30
Pi4: 192.168.0.40
P.P.S. It's faster now that things are sorted
--- Code: ---pump make -j10
real 0m 57.49s
user 1m 32.38s
sys 0m 13.43s
--- End code ---
polikuo:
Here's an update.
I just compiled gfortran with these pies.
The result is quite satisfying. (gcc 10.2.0, piCore64 13.1)
--- Code: ---$ time pump make -j10
real 39m 30.38s
user 2h 1m 20s
sys 11m 38.38s
--- End code ---
Compare to Juanito's note. (gcc 10.1.0, piCore64 12)
--- Quote ---make [1h 49m 48s]
--- End quote ---
@Juanito, if you're reading this, mind if I post this for you ?
There's some adjustment I'd like to add for gfortran to be compatible with distcc.
Juanito:
Please go ahead
Rich:
Hi polikuo
--- Quote from: polikuo on January 25, 2022, 04:48:25 AM --- ... To make it more general purpose, I could go:
--- Code: ---# touch /var/log/distccd.log
# chmod 666 /var/log/distccd.log
# distccd --daemon --allow 192.168.0.0/24 --allow 192.168.1.0/24 --allow 10.0.0.0/24 --allow 10.1.1.0/24 --verbose --log-file=/var/log/distccd.log
--- End code ---
...
--- End quote ---
Just wanted to point out, --allow 192.168.0.0/23 is the same as --allow 192.168.0.0/24 --allow 192.168.1.0/24.
Also, the man page mentions a predefined option for private networks (LAN):
--- Quote -----allow-private
Allow private networks (10.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12, and
127.0.0.0/8).
--- End quote ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version