Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Distcc & distccmon not working [SOLVED]

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
19 posts • Page 1 of 1
Author
Message
HeXiLeD
Veteran
Veteran
User avatar
Posts: 1160
Joined: Sat Aug 20, 2005 5:41 pm
Location: Online

Distcc & distccmon not working [SOLVED]

  • Quote

Post by HeXiLeD » Mon Nov 07, 2011 3:25 am

After setting up distcc it seems something is failing to work properly.
  • a) compilation does not use the server
    b) distccmon-gui outputs nothing on server system

Packages installed:

Code: Select all

sys-devel/distcc-3.1-r5  USE="-avahi -gnome gtk -hardened -ipv6 (-selinux) -xinetd
Computers used: 2
- server/desktop
- netbook eeepc1015ped


Dual core server:

Code: Select all

 # cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Pentium(R) 4 CPU 3.20GHz
stepping        : 3
cpu MHz         : 3203.000
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc pebs bts nopl pni dtes64 monitor ds_cpl est cid cx16 xtpr
bogomips        : 6401.09
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual

Code: Select all

Portage 2.1.10.11 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.12.2-r0, 3.0.6 x86_64)
=================================================================
System uname: Linux-3.0.6-x86_64-Intel-R-_Pentium-R-_4_CPU_3.20GHz-with-gentoo-2.0.3
Timestamp of tree: Sun, 06 Nov 2011 09:30:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:          4.1_p9
dev-lang/python:          2.7.2-r3, 3.1.4-r3
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -mtune=nocona -fforce-addr -ftracer -mmmx -msse3 -mfpmath=sse -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/games/angband/edit/ /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/sound/events /etc/terminfo"
CXXFLAGS="-march=nocona -O2 -mtune=nocona -fforce-addr -ftracer -mmmx -msse3 -mfpmath=sse -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical"
FEATURES="assume-digests binpkg-logs ccache distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://gentoo.netnitco.net http://gentoo.mirrors.tds.net/gentoo http://gentoo.mirrors.tera-byte.com/ http://gentoo.arcticnetwork.ca/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_CA pt pt_PT"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X a52 aac acl acpi alsa amd64 apache2 apic audiofile berkdb bluetooth bts bzip2 cdparanoia cdr cid clflush cli cmov constant_tsc cracklib crypt cups cx16 cx8 cxx dbus de dri ds_cpl dtes64 dts dv dvb dvd dvdr est fbcon ffmpeg flac fortran fpu ftp fxsr gdbm gif glx gnutls gphoto2 gpm gstreamer gtk ht iconv ieee1394 imagemagick jack jpeg jpeg2k lm mad mca mce mime mmx modules monitor mozilla mp3 mp4 mpeg msn msr mtrr mudflap multilib mysql mysqli ncurses nptl nptlonly nx ogg openal opengl openmp oss pae pam pat pbe pcre pdf pebs pge php png pni pppd pse pse36 qt3support quicktime readline samba scanner sdl sep session smp spell ss sse sse2 ssl syscall sysfs syslog tcpd tm truetype tsc udev unicode usb v4l v4l2 vme xorg xtpr xvid zlib" ALSA_CARDS="emu10k1 hda-intel snd-hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_defaultauthz_groupfile authz_host authz_owner authz_user autoindex cache dbd deflate dir disk_cache env expires ext_filterfile_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="mouse keyboard evdev joystick virtualbox" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_CA pt pt_PT" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" SANE_BACKENDS="canon qcam test" USERLAND="GNU" VIDEO_CARDS="nvidia nv nouveau v4l v4l2 directfb vesa vga fbdev virtualbox" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Code: Select all

 # cat /etc/distcc/hosts
<ip-netbook> <ip-server>

Code: Select all

 # cat /etc/conf.d/distccd
# /etc/conf.d/distccd: config file for /etc/init.d/distccd

DISTCCD_OPTS=""

# this is the distccd executable
DISTCCD_EXEC="/usr/bin/distccd"

# this is where distccd will store its pid file
DISTCCD_PIDFILE="/var/run/distccd/distccd.pid"

# set this option to run distccd with extra parameters
# Default port is 3632.  For most people the default is okay.
DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632"

# Logging
# You can change some logging options here:
# --log-file FILE
# --log-level LEVEL  [critical,error,warning, notice, info, debug]
#
# Leaving --log-file blank will log to syslog
# example: --log-file /dev/null --log-level warning
# example: --log-level critical

DISTCCD_OPTS="${DISTCCD_OPTS} --log-level critical error  warning  notice info"

# SECURITY NOTICE:
# It is HIGHLY recomended that you use the --listen option
# for increased security. You can specify an IP to permit connections
# from or a CIDR mask
# --listen accepts only a single IP
# --allow is now mandatory as of distcc-2.18.
# example:  --allow 192.168.0.0/24
# example:  --allow 192.168.0.5 --allow 192.168.0.150
# example:  --listen 192.168.0.2

DISTCCD_OPTS="${DISTCCD_OPTS} --allow ip-netbook"
DISTCCD_OPTS="${DISTCCD_OPTS} --listen ip-server"

# set this for niceness
# Default is 15
DISTCCD_OPTS="${DISTCCD_OPTS} -N 15"

Code: Select all

 
# netstat -nap | grep distcc
tcp        0      0 ip-server:3632           0.0.0.0:*               LISTEN      4019/distccd

Dual core Netbook eeepc:

Code: Select all

 # cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 28
model name      : Intel(R) Atom(TM) CPU N475   @ 1.83GHz
stepping        : 10
cpu MHz         : 1000.000
cache size      : 512 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dts
bogomips        : 3665.96
clflush size    : 64
cache_alignment : 64
address sizes   : 32 bits physical, 48 bits virtual
power management:

Code: Select all

Portage 2.1.10.11 (!../usr/local/portage/profiles/default/linux/amd64/10.0/desktop, gcc-4.4.5, glibc-2.12.2-r0, 3.0.6 x86_64)
=================================================================
System uname: Linux-3.0.6-x86_64-Intel-R-_Atom-TM-_CPU_N475_@_1.83GHz-with-gentoo-2.0.3
Timestamp of tree: Sun, 06 Nov 2011 11:45:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [enabled]
ccache version 2.4 [enabled]
app-shells/bash:          4.1_p9
dev-lang/python:          2.7.2-r3, 3.1.4-r3
dev-util/ccache:          2.4-r9
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.4.5, 4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -mtune=generic -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/sound/events /etc/terminfo"
CXXFLAGS="-march=core2 -O2 -mtune=generic -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical"
FEATURES="assume-digests binpkg-logs ccache distcc distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://mirror.datapipe.net/gentoo http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_CA pt pt_PT"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync5.ca.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 aperfmperf apic apm arch_perfmon berkdb bluetooth branding bts bzip2 cairo ccache cdda cdr clflush cli cmov consolekit constant_tsc cracklib crypt cups cx16 cx8 cxx dbus de dri ds_cpl dtes64 dts dvd dvdr emboss encode est exif fam fbcon firefox flac fortran fpu fxsr gdbm gdu gif gnutls gpm gtk ht iconv jpeg lahf_lm lcms libnotify lm mad mca mce mmx mng modules monitor movbe mp3 mp4 mpeg msr mtrr mudflap multilib ncurses nptl nptlonly nx ogg opengl openmp pae pango pat pbe pcre pdcm pdf pebs pge png pni policykit ppds pppd pse readline rep_good sdl sep session smp spell ss sse sse2 ssl ssse3 startup-notification svg syscall sysfs tcpd tiff tm tm2 truetype truetypem tsc udev unicode usb vga vme vorbis wifi x264 xcb xml xorg xtpr xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard synaptics mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_CA pt pt_PT" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel fbdev vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS

make.conf

Code: Select all

DISTCC_DIR="${PORTAGE_TMPDIR}/.distcc"

Code: Select all

# cat /etc/distcc/hosts
<ip-netbook> <ip-server>

Code: Select all

 # cat /etc/conf.d/distccd
# /etc/conf.d/distccd: config file for /etc/init.d/distccd

DISTCCD_OPTS=""

# this is the distccd executable 
DISTCCD_EXEC="/usr/bin/distccd"

# this is where distccd will store its pid file
DISTCCD_PIDFILE="/var/run/distccd/distccd.pid"

# set this option to run distccd with extra parameters
# Default port is 3632.  For most people the default is okay.
DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632"

# Logging
# You can change some logging options here:
# --log-file FILE
# --log-level LEVEL  [critical,error,warning, notice, info, debug]
#
# Leaving --log-file blank will log to syslog
# example: --log-file /dev/null --log-level warning
# example: --log-level critical

DISTCCD_OPTS="${DISTCCD_OPTS} --log-level critical debug"

# SECURITY NOTICE:
# It is HIGHLY recomended that you use the --listen option
# for increased security. You can specify an IP to permit connections 
# from or a CIDR mask
# --listen accepts only a single IP
# --allow is now mandatory as of distcc-2.18.
# example:  --allow 192.168.0.0/24
# example:  --allow 192.168.0.5 --allow 192.168.0.150
# example:  --listen 192.168.0.2
DISTCCD_OPTS="${DISTCCD_OPTS} --allow <ip-server>"
DISTCCD_OPTS="${DISTCCD_OPTS} --listen <ip-netbook>"

# set this for niceness
# Default is 15
DISTCCD_OPTS="${DISTCCD_OPTS} -N 15"

Code: Select all

 # netstat -nap | grep distcc
tcp        0      0 <ip-netbook>:3632           0.0.0.0:*               LISTEN      1626/distccd 
I searched the forum for related topics but the results were not helpful. Any other ideas on what may be causing this issue ?
Last edited by HeXiLeD on Fri Dec 30, 2011 1:57 am, edited 1 time in total.
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Top
blotto
Tux's lil' helper
Tux's lil' helper
Posts: 116
Joined: Thu Jul 03, 2003 9:25 pm
Location: Whitehaven UK

  • Quote

Post by blotto » Thu Nov 10, 2011 11:48 am

One quick one
b) distccmon-gui outputs nothing on server system
distccmon-gui only displays what is being done on the system doing the distribution i.e. the client and does not show anything on the server.
Code:

# cat /etc/distcc/hosts
<ip-netbook> <ip-server>
This tells distcc to use the netbook for compiling first, I have usually found it best to leave the client of the list especially if it is much slower than the server.
Also the client will be used for bits that have to be compiled locally anyhow.
Try...

Code: Select all

#/etc/distcc/hosts 
<ip-server>]
[/quote]
Lastly I always find that getting /etc/conf.d/distccd right can be tricky, I simply use a basic setting for allow and dont set listen
In my case

Code: Select all

# /etc/conf.d/distccd: config file for /etc/init.d/distccd

DISTCCD_OPTS=""

# this is the distccd executable 
DISTCCD_EXEC="/usr/bin/distccd"

# this is where distccd will store its pid file
DISTCCD_PIDFILE="/var/run/distccd/distccd.pid"

# set this option to run distccd with extra parameters
# Default port is 3632.  For most people the default is okay.
DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632"

# Logging
# You can change some logging options here:
# --log-file FILE
# --log-level LEVEL  [critical,error,warning, notice, info, debug]
#
# Leaving --log-file blank will log to syslog
# example: --log-file /dev/null --log-level warning
# example: --log-level critical

DISTCCD_OPTS="${DISTCCD_OPTS} --log-level critical"

# SECURITY NOTICE:
# It is HIGHLY recomended that you use the --listen option
# for increased security. You can specify an IP to permit connections 
# from or a CIDR mask
# --listen accepts only a single IP
# --allow is now mandatory as of distcc-2.18.
# example:  --allow 192.168.0.0/24
# example:  --allow 192.168.0.5 --allow 192.168.0.150
# example:  --listen 192.168.0.2
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.0.0/24"

# set this for niceness
# Default is 15
DISTCCD_OPTS="${DISTCCD_OPTS} -N 15"

# Enable zeroconf support in distccd
#DISTCCD_OPTS="${DISTCCD_OPTS} --zeroconf"
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Thu Nov 10, 2011 5:40 pm

your firewall rules allow them ?
Top
HeXiLeD
Veteran
Veteran
User avatar
Posts: 1160
Joined: Sat Aug 20, 2005 5:41 pm
Location: Online

  • Quote

Post by HeXiLeD » Sun Nov 27, 2011 2:31 am

I am using both systems on lan and there is no firewall between both systems. I also tested the connectivity by telneting to host:port and i was able to connect. Both systems can see each other and ping each other.

I edited all the conf files in order to follow the advise given above but even so i get no information with distccmon-gui or *-text about the compiling. Is there any other way to see if the host distcc is being used ?

Using netstat -nap | grep distcc shows listening ports but nothing connecting.

Maybe i am missing something on make.conf. Could someone post their make.conf and both computers distcc example configurations ?
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Sun Nov 27, 2011 3:50 am

I use distcc thru ssh, so distccd is always stop/unuse

Code: Select all

# /etc/conf.d/distccd: config file for /etc/init.d/distccd

DISTCCD_OPTS=""

# this is the distccd executable 
DISTCCD_EXEC="/usr/bin/distccd"

# this is where distccd will store its pid file
DISTCCD_PIDFILE="/var/run/distccd/distccd.pid"

# set this option to run distccd with extra parameters
# Default port is 3632.  For most people the default is okay.
DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632"

# Logging
# You can change some logging options here:
# --log-file FILE
# --log-level LEVEL  [critical,error,warning, notice, info, debug]
#
# Leaving --log-file blank will log to syslog
# example: --log-file /dev/null --log-level warning
# example: --log-level critical

DISTCCD_OPTS="${DISTCCD_OPTS} --log-level warning --log-file /var/log/distcc.log"

# SECURITY NOTICE:
# It is HIGHLY recomended that you use the --listen option
# for increased security. You can specify an IP to permit connections 
# from or a CIDR mask
# --listen accepts only a single IP
# --allow is now mandatory as of distcc-2.18.
# example:  --allow 192.168.0.0/24
# example:  --allow 192.168.0.5 --allow 192.168.0.150
# example:  --listen 192.168.0.2
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.0.0/24"
#DISTCCD_OPTS="${DISTCCD_OPTS} --listen 192.168.0.2"

# set this for niceness
# Default is 15
DISTCCD_OPTS="${DISTCCD_OPTS} -N 15"

Code: Select all

cat /etc/distcc/hosts 
@beleg/8 @hurin/4 localhost/2

Code: Select all

# Copyright 2000-2003 Daniel Robbins, Gentoo Technologies, Inc.
# Contains local system settings for Portage system
# $Header: /home/cvsroot/gentoo-src/portage/cnf/make.conf,v 1.57 2003/03/11 11:33:07 carpaski Exp $

# Please review 'man make.conf' for more information.
SOURCE="/etc/portage/make.conf"
# Build-time functionality
# ========================
#
# The USE variable is used to enable optional build-time functionality. For
# example, quite a few packages have optional X, gtk or GNOME functionality
# that can only be enabled or disabled at compile-time. Gentoo Linux has a
# very extensive set of USE variables described in our USE variable HOWTO at
# http://www.gentoo.org/doc/use-howto.html
#
# The available list of use flags with descriptions is in your portage tree.
# Use 'less' to view them:  --> less /usr/portage/profiles/use.desc <--
#
# 'ufed' is an ncurses/dialog interface available in portage to make handling
# useflags for you. 'emerge app-admin/ufed'
#
# Example:
USE="-kde -cups -gnome -X -ipv6"
#USE=" a52 aac aalib acpi alsa amarok audacious avahi branding cdr \
#     dbase dbus divx dvd dvdread exif fbsplash ffmpeg firefox consolekit \
#     flac ftp glitz gmedia gnome gstreamer gtk hal hddtemp imap \
#     ipod java javascript jpeg jpeg2k lame libcaca live \
#     lm_sensors logrotate lzo maildir matroska mdnsresponder-compat \
#     mikmod mjpeg mng modplug moznomail moznoxft mp3 mp4 mp4live \
#     mpeg mpeg2 mplayer msn musepack network nfs nsplugin ntfs \
#     ogg openal opengl png sdl-image sensord skins slang smp \
#     startup-notification stream subtitles svg tga theora threads \
#     thunderbird tiff timidity truetype unicode usb v4l v4l2 vcd \
#     vlm vorbis wma wmf wxwindows X x264 xcb xcomposite xine embedded \
#     xinerama xosd xulrunner xv xvid zip webkit vdpau extras -ipv6 sqlite"
ALSA_CARDS="intel8x0"
VIDEO_CARDS="vesa nvidia"
INPUT_DEVICES="keyboard mouse evdev"
LINGUAS="fr fr_FR"

# Host Setting
# ============
#
# If you are using a Pentium Pro or greater processor, leave this line as-is;
# otherwise, change to i586, i486 or i386 as appropriate. All modern systems
# (even Athlons) should use "i686-pc-linux-gnu"
#
CHOST="i686-pc-linux-gnu"

# Host and optimization settings 
# ==============================
#
# For optimal performance, enable a CFLAGS setting appropriate for your CPU.
#
# Please note that if you experience strange issues with a package, it may be
# due to gcc's optimizations interacting in a strange way. Please test the
# package (and in some cases the libraries it uses) at default optimizations
# before reporting errors to developers.
#
# -mcpu=<cpu-type> means optimize code for the particular type of CPU without
# breaking compatibility with other CPUs.
#
# -march=<cpu-type> means to take full advantage of the ABI and instructions
# for the particular CPU; this will break compatibility with older CPUs (for
# example, -march=athlon-xp code will not run on a regular Athlon, and
# -march=i686 code will not run on a Pentium Classic.
#
# CPU types supported in gcc-3.2 and higher: athlon-xp, athlon-mp,
# athlon-tbird, athlon, k6, k6-2, k6-3, i386, i486, i586 (Pentium), i686
# (PentiumPro), pentium, pentium-mmx, pentiumpro, pentium2 (Celeron), pentium3.
# Note that Gentoo Linux 1.4 and higher include at least gcc-3.2.
# ATHLON-4 will generate invalid SSE instructions; use 'athlon' instead.
# PENTIUM4 will generate invalid instructions; use 'pentium3' instead.
# 
# CPU types supported in gcc-2.95*: k6, i386, i486, i586 (Pentium), i686
# (Pentium Pro), pentium, pentiumpro Gentoo Linux 1.2 and below use gcc-2.95*
#
# Decent examples:
#
#CFLAGS="-mtune=pentium3 -pipe"
CFLAGS="-march=core2 -O2 -pipe -mfpmath=sse"

# If you set a CFLAGS above, then this line will set your default C++ flags to
# the same settings.
CXXFLAGS="${CFLAGS}"

# Advanced Masking
# ================
#
# Gentoo is using a new masking system to allow for easier stability testing
# on packages. KEYWORDS are used in ebuilds to mask and unmask packages based
# on the platform they are set for. A special form has been added that
# indicates packages and revisions that are expected to work, but have not yet
# been approved for the stable set. '~arch' is a superset of 'arch' which
# includes the unstable, in testing, packages. Users of the 'x86' architecture
# would add '~x86' to ACCEPT_KEYWORDS to enable unstable/testing packages.
# '~ppc', '~sparc', '~sparc64' are the unstable KEYWORDS for their respective
# platforms. DO NOT PUT ANYTHING BUT YOUR SPECIFIC ~ARCHITECTURE IN THE LIST.
# IF YOU ARE UNSURE OF YOUR ARCH, OR THE IMPLICATIONS, DO NOT MODIFY THIS.
#
ACCEPT_KEYWORDS="x86"

# Portage Directories
# ===================
#
# Each of these settings controls an aspect of portage's storage and file
# system usage. If you change any of these, be sure it is available when
# you try to use portage. *** DO NOT INCLUDE A TRAILING "/" ***
#
# PORTAGE_TMPDIR is the location portage will use for compilations and
#     temporary storage of data. This can get VERY large depending upon
#     the application being installed.
PORTAGE_TMPDIR=/var/tmp
#
# PORTDIR is the location of the portage tree. This is the repository
#     for all profile information as well as all ebuilds. This directory
#     itself can reach 200M. WE DO NOT RECOMMEND that you change this.
#PORTDIR=/usr/portage
#
# DISTDIR is where all of the source code tarballs will be placed for
#     emerges. The source code is maintained here unless you delete
#     it. The entire repository of tarballs for gentoo is 9G. This is
#     considerably more than any user will ever download. 2-3G is
#     a large DISTDIR.
#DISTDIR=${PORTDIR}/distfiles
#DISTDIR=/mnt/faramir/distfiles
#
# PKGDIR is the location of binary packages that you can have created
#     with '--buildpkg' or '-b' while emerging a package. This can get
#     upto several hundred megs, or even a few gigs.
#PKGDIR=${PORTDIR}/packages
#
# PORT_LOGDIR is the location where portage will store all the logs it
#     creates from each individual merge. They are stored as YYMMDD-$PF.log
#     in the directory specified. This is disabled until you enable it by
#     providing a directory. Permissions will be modified as needed IF the
#     directory exists, otherwise logging will be disabled.
#PORT_LOGDIR=/var/log/portage
#
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
#     concern that they will be deleted by rsync updates. Default is not
#     defined.
PORTDIR_OVERLAY=/usr/local/portage

# Fetching files 
# ==============
#
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /etc/profile if
# all users on your system should use them.
#
# Portage uses wget by default. Here are some settings for some alternate
# downloaders -- note that you need to merge these programs first before they
# will be available.
#
# Default fetch command (5 tries, passive ftp for firewall compatibility)
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
#
# Using wget, ratelimiting downloads
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
#
# Lukemftp (BSD ftp):
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
#RESUMECOMMAND="/usr/bin/lukemftp -s -a -R -o \${DISTDIR}/\${FILE} \${URI}"
#
# Prozilla (turbo downloader)
#FETCHCOMMAND='/usr/bin/proz --no-getch -s ${URI} -P ${DISTDIR}'
#
# Portage uses GENTOO_MIRRORS to specify mirrors to use for source retrieval.
# The list is a space seperated list which is read left to right. If you use
# another mirror we highly recommend leaving the default mirror at the end of
# the list so that portage will fall back to it if the files cannot be found
# on your specified mirror. We _HIGHLY_ recommend that you change this setting
# to a nearby mirror by merging and using the 'mirrorselect' tool.
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org ftp://mirror.ovh.net/gentoo-distfiles http://gentoo.mirror.sdv.fr/ 
http://gentoo.oregonstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/gentoo"

# Advanced Features
# =================
#
# MAKEOPTS provides extra options that may be passed to 'make' when a
#     program is compiled. Presently the only use is for specifying
#     the number of parallel makes (-j) to perform. The suggested number
#     for parallel makes is CPUs+1.
MAKEOPTS="-j8"
#
# AUTOCLEAN enables portage to automatically clean out older or overlapping
#     packages from the system after every successful merge. This is the
#     same as running 'emerge -c' after every merge. Set with: "yes" or "no".
#     This does not affect the unpacked source. See 'noclean' below.
AUTOCLEAN="yes"
#
# FEATURES are settings that affect the functionality of portage. Most of
#     these settings are for developer use, but some are available to non-
#     developers as well. 'buildpkg' is an always-on setting for the emerge
#     flag of the same name. It causes binary packages to be created of all
#     packages that are merged. 'distcc' enables distcc support for via CC.
#     'userpriv' allows portage to drop root privleges while it is compiling
#     as a security measure, and as a side effect this can remove sandbox
#     access violations for users. 'usersandbox' enables sandboxing while
#     portage is running under userpriv. 'noclean' prevents portage from
#     removing the source and temporary files after a merge -- for debugging
#     purposes only. 'noauto' is a feature which causes ebuild to perform
#     the action requested and not any other required actions like clean or
#     unpack -- for debugging purposes only. 'cvs' is a feature for developers
#     that causes portage to enable full settings and USE flags in SRC_URI and
#     has wide effects -- don't set this unless you're ready for it. 'keeptemp'
#     prevents the clean phase from deleting the temp files ($T) from a merge.
#     'keepwork' prevents the clean phase from deleting the $WORKDIR.
#FEATURES="sandbox buildpkg ccache distcc userpriv usersandbox noclean noauto cvs keeptemp keepwork"
FEATURES="distcc sandbox parallel-fetch unmerge-orphans"
#
# CCACHE_SIZE sets the space use limitations for ccache. The default size is
#     2G, and will be set if not defined otherwise and ccache is in features. 
#     Portage will set the default ccache dir if it is not present in the
#     user's environment: ${PORTAGE_TMPDIR}/ccache (/var/tmp/ccache).
#     Sizes are specified with 'G' 'M' or 'K'.
#     '4G' for 4 gigabytes, '4096M' for 4 gigabytes, etc... Default is 2G
#CCACHE_SIZE="2G"
#
# RSYNC_RETRIES sets the number of times portage will attempt to retrieve
#     a current portage tree before it exits with an error. This allows
#     for a more successful retrieval without user intervention most times.
#RSYNC_RETRIES="3"
#
# RSYNC_TIMEOUT sets the length of time rsync will wait before it times out
#     on a connection. Most users will benefit from this setting as it will
#     reduce the amount of 'dead air' they experience when they run across
#     the occasional, unreachable mirror. Dialup users might want to set this
#     value up around the 300 second mark.
#RSYNC_TIMEOUT=180
#
# RSYNC_EXCLUDEFROM is a file that portage will pass to rsync when it updates
#     the portage tree. Specific chucks of the tree may be excluded from
#     consideration. This may cause dependency failures if you are not careful.
#     The file format is one pattern per line, blanks and ';' or '#' lines are
#     comments. See 'man rsync' for more details on the exclude-from format.
#RSYNC_EXCLUDEFROM=/etc/portage/rsync_excludes
PORTAGE_ELOG_SYSTEM="save"
PORTAGE_ELOG_CLASSES="warn error info log qa"
DISTCC_DIR=${PORTAGE_TMPDIR}/portage/.distcc/
EMERGE_DEFAULT_OPTS="--buildpkg --jobs=2"
Top
HeXiLeD
Veteran
Veteran
User avatar
Posts: 1160
Joined: Sat Aug 20, 2005 5:41 pm
Location: Online

  • Quote

Post by HeXiLeD » Sun Nov 27, 2011 3:27 pm

I am now able to use distcc after a small detail on make.conf. Thanks for your conf.

Distcc runs on it' s own user and connects from the netbook to the server. However it does not stay connected during the whole compile. It connects; uses the server and disconnects for a few seconds and reconnects again.

I am able to see it working by doing:

Code: Select all

# htop -u distcc  or # top -u  distcc 
# netstat -nap | grep distcc
Question1: Is it normal that the client connects and disconnects several times during a compile ?

I am also able to use it having both directives set: --allow host and --listen host

After reading the official documentation i realised that we dont need need to run distccd in both machines (client and server). So i stoped distccd on the client.

https://distcc.googlecode.com/svn/trunk ... b/faq.html

As for the -j level to use in the client /etc/make.conf i increased mine from -j3 (without distcc) to -j5 and then -j8 and then -j10 .

From -j3 (without distcc) to -j5 a test compile with fluxbox went from 8min and 42 secs to 5 minutes and 16 secs.

From -j5 to -j8 the same test compile went from 5 minutes and 16 secs to 2 minutes and 23 secs. (around 4 times less time and 3 times less time than compiling the same package on the server and for the server - This was changed later when adding -j5 on the server make.conf)

With -j10 no performance increase was seen. It stayed the same as -j8

when starting a compilation, the how to says to use -j8 . is this optimal ? anything else i should be using for better performance ?

For plain (that is, non-pump) mode, you should use about twice the total number of CPUs available, but it depends on your network, program being compiled, available memory, etc. Experiment with different values.

Client machines tend to be saturated at about 10-20 jobs, so using values above -j10 is rarely useful. (Perhaps higher levels would work well on clients with two or more CPUs and very fast network connections, memory and disk.)
Server cpu is a dual core 3.2 ghz emt 64bit with xeon flags
Client cpu is a dual core atom 1.8 ghz
Network is LAN on 100mbit with 3 to 6 feet size cables.


Question2: At first i thought we could combine both cpus horse power to have better compile. The idea was to see the compile being made by 3.2ghz+1.8ghz= 5ghz i believe i was wrong. This is not possible or is it ?

Using ccache + distcc helps speeding the compilation however i read some documentation that mentions that is recommended to have ccache set before then distcc.

If you don't use distcc's "pump" mode, then they work pretty well as separate programs that call each other. You can either set CC='ccache distcc gcc', or arrange for both ccache and distcc to be "masqueraded" on the path. (See the manual for information on how to install this.)
Normally it is better for ccache to be run before distcc.

This is very nearly as efficient as making them both part of a single program. The preprocessor will only run once and the preprocessed source will be passed from ccache straight to distcc. Having them separate allows them to be tested, debugged and released separately.
I set it before and after on /etc/make.conf and saw nor performance difference.

Question3: can anyone confirm performance enhancements or loss with this change ?

I have also read about pump mode and would like to make use of it but i have not seem any setting in distcc configuration files.

Question4: Is pump mode set by default somewhere ? How can we make use of it.
However, all of that said, now that we have "pump" mode, the trade-offs have changed. Using ccache prevents the use of "pump" mode. It would make sense to integrate caching into distcc so that you can get distributed preprocessing, distributed compilation, and caching all at the same time. This would make a great project for someone...
Question5: aside this detail and turning off ccache on the client machine how can se use pump mode ?

Question6: how much more can i improve/increase/enhance compile times using distcc, ccache and pump mode.

... yes i am all about the rice :wink:

Problems still to resolve:

I cannot see/get distccmon-gui or text working and outputting any stats and or results. Any ideas how to solve it ?
Another problem i have is that i cannot get distcc to create it's on log file in /var/log/distcc.log even tho it is set on the conf.
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Top
dwbowyer
Apprentice
Apprentice
Posts: 155
Joined: Fri Apr 18, 2008 1:18 am

  • Quote

Post by dwbowyer » Sun Nov 27, 2011 6:00 pm

Some time ago I was going to post a HOWTO covering ccache, distcc and distcc with pump, that compared the timings and setting between an AMD64x2 2.41GHz pc and a pentium3 600MHz.

I never got around to actually posting it, but will now. But to give you a short answer, the best result I got was using the AMD64 as a build and bin-host, and installing binary packages on the pentium3. Next best result was with distcc-pump and having the pentium3 only unpack, configure and install. Offloading ALL compile and preprocessing possible to the faster computer was better than any other combination of ccache or distcc options and allowd me to set

Code: Select all

#/etc/make.conf on the Pentium3 client
MAKEOPTS="-j10 --jobs=2"
#YES j10 not a typo

The AMD64 neared 100% cpu usage this way while still remaining responsive, able to watched videos, play games, etc. The Pentium3 was fully tasked.

Even with 1.8 GHz cores a notebook would be better having it's software built entirely on a faster and more powerful desktop system, and then installing binary packages, in my opinion. This is especially true if you have an SSD drive. Using app-admin/gentoo-buildhoster (unmaintained set of scripts that I had to modify slightly to get working) was my best answer for my case.

In any case, I'll post my results in the proper forum and you can view if for my detailed results.

edit: Regarding distcc-mon, have you remembered to point it to the proper directory?
edit2:Testing Emerge with ccache, distcc and pump emerge
Top
destroyedlolo
l33t
l33t
Posts: 846
Joined: Fri Jun 17, 2011 10:28 am
Location: Close to Annecy (France)
Contact:
Contact destroyedlolo
Website

  • Quote

Post by destroyedlolo » Sun Nov 27, 2011 6:41 pm

dwbowyer wrote:the best result I got was using the AMD64 as a build and bin-host, and installing binary packages on the pentium3. Next best result was with distcc-pump and having the pentium3 only unpack, configure and install. Offloading ALL compile and preprocessing possible to the faster computer was better than any other combination of ccache or distcc options
I did the same experience with an old Duron 700Mhz. The problem is not only the compilation itself but some helpers scripts running before (alocal, m4, ...) : they have to be done by definition on the master machines ... and when the master is a sssslllooowwww machine, any compilation takes age even with brunch of very fast distcc-ed companions.

Consequently, I'm doing binhost from the faster machine I have (a Celeron 2.6 Ghz), which is helped by several P4s during compilation.
The only exception is some libraries needing specific CPU flags (sse / 3dnow) which are forced to be compiled localy on older machine. But as they are few and small, it's ok.
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun Nov 27, 2011 7:19 pm

HeXiLeD wrote:Is it normal that the client connects and disconnects several times during a compile ?
Yes. Since distcc is inserted in front of gcc, each new call to gcc spawns a new distcc client process, which must then connect to the distcc server. Creating new connections is unavoidable. At best, some tricks could be played to have an aggregator daemon on the client that receives loopback connections from the distcc-gcc processes and sends them over a persistent connection to the server. However, I doubt the performance gain would be enough to justify the complexity.
HeXiLeD wrote:At first i thought we could combine both cpus horse power to have better compile. The idea was to see the compile being made by 3.2ghz+1.8ghz= 5ghz i believe i was wrong. This is not possible or is it ?
As destroyedlolo mentioned, not all the work can be sent off to the slaves. However, it is even slightly worse than he stated. He stated that the pre-build steps like running configure are not substantially improved by distcc, which is true. Some steps in the compilation proper are also restricted to running on the master. Linking is always done only on the master. In non-pump mode, preprocessing is done only on the master. Projects that are substantially constrained in one of these phases will see much less benefit than the theoretical perfect case.
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Sun Nov 27, 2011 11:53 pm

It's not combining cpu power as 3.2+1.8 but building using parrellism and horse power of helper.

For 2 tasks:
- You gain because the 3.2 will build at 3.2
- And you gain because the 1.8 will build at 1.8 as it have no other task to do

I've post one day how to better fine tune your hosts with distcc : look here, it's not a howto, feel free to ask something if it's not clear : http://forums.gentoo.org/viewtopic-p-66 ... ml#6654117
Or look again my previous post for my distcc/hosts config, it should show you that this one was get from my weakest host :)

Keep also in mind distcc greateast weakness, even if you set -j100 if "make" only feed 2 parrallel jobs, you'll end with 2 tasks done by distcc.
There's really few ebuild that could feed 10 jobs in parrallel, generally you could expect high boost from ebuild that use lot of codecs or plugins as they could be made in parrallel.
But if you have a makefile with 3 jobs and 1 depend on the 2 others, distcc will feed 2 tasks, wait for them to end, then feed the 3rd.
Top
HeXiLeD
Veteran
Veteran
User avatar
Posts: 1160
Joined: Sat Aug 20, 2005 5:41 pm
Location: Online

  • Quote

Post by HeXiLeD » Tue Nov 29, 2011 1:25 pm

krinn wrote:It's not combining cpu power as 3.2+1.8 but building using parallelism and horse power of helper.

For 2 tasks:
- You gain because the 3.2 will build at 3.2
- And you gain because the 1.8 will build at 1.8 as it have no other task to do
I checked your other explanation but i got a bit confused.
Can you give me a simple configuration example how i can use my dual core 3.2cpu and 1.8 cpu in parallelism in order to enhance compilation times ?

Do i have to run distccd on the netbook to have this kind of parallelism ?

Another general question is regarding binhost. Compiling all in the host/3.2cpu and have the binary installed on the netbook.
As far as i could understand will i not have issues with (make.conf) flags ? Specifically cpu flags ? will the final binary be "made"for the server's arch and flag setup or is there a way to compile it using the flag setup of the netbook ?
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Top
destroyedlolo
l33t
l33t
Posts: 846
Joined: Fri Jun 17, 2011 10:28 am
Location: Close to Annecy (France)
Contact:
Contact destroyedlolo
Website

  • Quote

Post by destroyedlolo » Tue Nov 29, 2011 10:17 pm

Regarding flags to use, I suggest having a look on [topic=897030]this thread[/topic].
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Wed Nov 30, 2011 12:42 am

HeXiLeD wrote: I checked your other explanation but i got a bit confused.
Can you give me a simple configuration example how i can use my dual core 3.2cpu and 1.8 cpu in parallelism in order to enhance compilation times ?

Do i have to run distccd on the netbook to have this kind of parallelism ?

Another general question is regarding binhost. Compiling all in the host/3.2cpu and have the binary installed on the netbook.
As far as i could understand will i not have issues with (make.conf) flags ? Specifically cpu flags ? will the final binary be "made"for the server's arch and flag setup or is there a way to compile it using the flag setup of the netbook ?
The parrallelism comes from the -j option, if make can't build in parrallel, make will only build one job at a time, this lower multi-core cpu efficiency and of course distcc too.

From what i know about binhost, you'll end with a binary build with cflags and use flags the server have. So you must make sure you setup the server use and cflags == to the laptop one.
Top
HeXiLeD
Veteran
Veteran
User avatar
Posts: 1160
Joined: Sat Aug 20, 2005 5:41 pm
Location: Online

  • Quote

Post by HeXiLeD » Wed Nov 30, 2011 11:39 am

krinn wrote: The parrallelism comes from the -j option, if make can't build in parrallel, make will only build one job at a time, this lower multi-core cpu efficiency and of course distcc too.
Do you mean the -j option alone or the -j option plus --jobs like --jobs=2.
What does exactly --jobs does in regards to the -j option ?
Could you elaborate ? I did try --jobs=2 but without fully understand it.
How many --jobs do you think it is reasonable to have ?
krinn wrote: From what i know about binhost, you'll end with a binary build with cflags and use flags the server have. So you must make sure you setup the server use and cflags == to the laptop one.

netbook: CFLAGS="-march=atom -O2 -pipe"

server: CFLAGS="-march=nocona -O2 -mtune=nocona -fforce-addr -ftracer -mmmx -msse3 -mfpmath=sse -pipe"

One cpu is very much xeon/emt family on its cpu flags the other is atom. So it seems that binhost option would make things a little bit messed.
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Top
destroyedlolo
l33t
l33t
Posts: 846
Joined: Fri Jun 17, 2011 10:28 am
Location: Close to Annecy (France)
Contact:
Contact destroyedlolo
Website

  • Quote

Post by destroyedlolo » Wed Nov 30, 2011 12:27 pm

HeXiLeD wrote: netbook: CFLAGS="-march=atom -O2 -pipe"

server: CFLAGS="-march=nocona -O2 -mtune=nocona -fforce-addr -ftracer -mmmx -msse3 -mfpmath=sse -pipe"

One cpu is very much xeon/emt family on its cpu flags the other is atom. So it seems that binhost option would make things a little bit messed.
What[topic=897030] I did[/topic], is to choose the CFLAGS the most common b/w all arch. So in my case, it's

Code: Select all

-O2 -march=i686 -pipe -fomit-frame-pointer
which is adequate from the slowest K7 to the faster P4.

Then, playing with USEs "sse*, 3dnow, mmx, ...", I'm forcing for a local compilation but only for components using them.

So all in all :
  • I won for compilation time as I have the benefit of BINHOST for 90% of the system
  • I won also in performances as SIMD are used and matching the host processors for components needing them.
The price is only a local compilation if host's SIMD doesn't match binhost one. It's automatically managed by USE and emerge's --binpkg-respect-use,

The only thing I'm specifically optimise for the processor is the kernel itself.
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Wed Nov 30, 2011 1:59 pm

HeXiLeD wrote:
krinn wrote: The parrallelism comes from the -j option, if make can't build in parrallel, make will only build one job at a time, this lower multi-core cpu efficiency and of course distcc too.
Do you mean the -j option alone or the -j option plus --jobs like --jobs=2.
What does exactly --jobs does in regards to the -j option ?
Could you elaborate ? I did try --jobs=2 but without fully understand it.
How many --jobs do you think it is reasonable to have ?
the -j is an option for make to building upto -jX tasks in parrallel, it's not always possible, and even settings so -j10 if make can only run 2 you'll endup with the -j2 equivalent.
the --jobs=X is an option for portage to run X emerge in parrallel, it's also not always possible too.

They are doing the same thing, just the context is different, for -j you need a makefile that can build many tasks and for --jobs you need emerging more than 1 programs that aren't dependencies.

Now if you set per example --jobs=3 -j4 you in fact tell emerge, you will allow it to spawn upto 12 gcc to handle the work.


For the binhost, you might not need to lower your optimizations down to that i686 generic, look at both cpu, and check what arch options they have in common, i'm pretty sure -march=pentium4 would fit for both of them, but certainly something higher is possible.
Top
HeXiLeD
Veteran
Veteran
User avatar
Posts: 1160
Joined: Sat Aug 20, 2005 5:41 pm
Location: Online

  • Quote

Post by HeXiLeD » Wed Nov 30, 2011 2:47 pm

krinn wrote: the -j is an option for make to building upto -jX tasks in parrallel, it's not always possible, and even settings so -j10 if make can only run 2 you'll endup with the -j2 equivalent.
the --jobs=X is an option for portage to run X emerge in parrallel, it's also not always possible too.
Will having more -j<numer> and --jobs=<number> higher than what can be handled; affect performance in a negative way or will just simply be ignored and the system will just work with what it can do ?

I am probably skip binhost possibility and would like to know more about distcc pump mode.
According to the docs it is said that it cannot work with ccache.
For those who use pump mode and tried ccache; which setup offers better performance with distcc ? pump mode or ccache and hot to setup pump mode or its is enabled by default?
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Wed Nov 30, 2011 3:02 pm

I never use ccache, just because it could produce bad code, look in the forum you'll see how many users get strange failure to build something because of ccache.

if you ask --jobs=100 and emerge -uND world pull in 100 differents parckage that have 0 dependencies, then portage will build 100 packages, and with a low -j2 you might endup with upto 200 gcc running.

It's somehow easier for -j as i already told you few, few makefile produce more than 10 tasks. So even setting -j20 you will generally endup with ~10 tasks only at max.
This should also gave you a limit for a distcc farm efficiency when building one program : as you add your cpu ressource to the farm, you might break that limit with only 2 cpus (2 amd 6 cores per example, would have the power to build upto 12 tasks).
And if you build a program that could handle 3 tasks, you then end with your farm using only 3 cores out of your 12 total.
That's where --jobs comes to help, adding another emerge that will need itself another 4 tasks, your farm goes to use 7 of 12 total
...

to make clear, having a huge --jobs will drain your performance bad
having a high -j won't impact your performance because the limit is within the makefile anyway, but if --jobs comes in play, you might this time impact your performance, just because -j8 --jobs=4 could end with 32 tasks to be done. Even in my example with the 12 cores to handle that, your cpus will produce it at a lower performance as their cache efficiency will be lowered as always fill.
Top
HeXiLeD
Veteran
Veteran
User avatar
Posts: 1160
Joined: Sat Aug 20, 2005 5:41 pm
Location: Online

  • Quote

Post by HeXiLeD » Fri Dec 30, 2011 2:03 am

Finally everything is working.
I also have specified ips in all confs (client and server) for listen and allow without any problems.
Distccmon-text and distccmon-gui also work without any problems from root user or regular user with access to portage.

Code: Select all

DISTCC_DIR="/var/tmp/portage/" distccmon-text 1 &
I am using it with ccache and without problems.

Thank you guys for the tips :)

Problem is SOLVED
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Top
Post Reply

19 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic