Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems getting distcc to work.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Kasumi_Ninja
Veteran
Veteran


Joined: 18 Feb 2006
Posts: 1825
Location: The Netherlands

PostPosted: Sun Dec 09, 2007 12:32 pm    Post subject: Problems getting distcc to work. Reply with quote

I followed the manual to the letter bit still distcc sin't working. Who knows how I can get distcc working? I made sure distcc was running on all (2) hosts

Without distcc
Code:
# /etc/init.d/distccd stop
# time emerge -v abiword

real    13m35.486s
user    11m32.510s
sys     1m43.570s


With distcc
Code:
# /etc/init.d/distccd start
# time emerge -v abiword
real    13m17.823s
user    11m32.090s
sys     1m42.900s


# cat /etc/conf.d/distccd
Code:
# /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.2.1"
#DISTCCD_OPTS="${DISTCCD_OPTS} --listen 192.168.0.2"

# set this for niceness
# Default is 15


distcc-config --set-hosts
Code:
# distcc-config --set-hosts "192.168.2.1** 192.168.2.1**"


# cat /etc/make.conf
Code:
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /etc/make.conf.example for a more detailed example.
CFLAGS="-march=i686 -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
# This should not be changed unless you know exactly what you are doing.  You
# should probably be using a different stage, instead.
CHOST="i686-pc-linux-gnu"
MAKEOPTS="-j4"
USE="7zip Xaw3d a52 aac addbookmarks additions administrator aim alias amr
     apache2 arj asm atm autoreplace avahi bash-completion bindist bluetooth
     bonusscripts branding caps cdda cddb cdinstall cdparanoia cisco
     connectionstatus contactnotes cpudetection css dga dhcp dialup divx djvu
     doc dv exif fat ffmpeg flac foomaticdb freeimage gadu gimp gimpprint
     gmedia gphoto2 gs gtk2 hbci hfs history hou httpd icon ieee1394
     imagemagick imap imlib ipod irc jabber java jikes jingle joystick jpeg2k
     kqemu lha libnotify live logitech-mouse madwifi maildir maps matroska
     mdnsresponder-compat mmx mmxex modkit mono moviepack moviesounds mp4
     mpeg2 mplayer msn musepack music musicbrainz mysql net netmeeting nfs
     nocd nowin nowlistening nsplugin ntfs nvidia offensive ofx openal openexr
     opensslcrypt openvpn pcmcia pda php plugins postgres profile
     query-browser quotes rar rdesktop real realmedia roe rogue rt2400pci
     rt2500pci rt2500usb rt61pci rt73usb rtc samba sametime scanner server
     slang slp smp sms sou sound sounds speex sqlite statistics stream
     subtitles svga texteffect themes theora threadsafe thumbnail tk transcode
     translator trayicon usb utempter v4l v4l2 vcd videos visualization
     wavpack webpresence wifi winpopup wma wmf wmp workbench wxwindows x264
     xatrix xface xfs xine xinerama xprint xvid yahoo zip -gnome -samba -apache2 -gs -mono -cups"
INPUT_DEVICES="evdev joystick keyboard mouse acecad aiptek digitaledge elographics fpit hyperpen jamstudio magellan mutouch palmax spaceorb summa synaptics tek4957 ur98 vmmouse void wacom"
VIDEO_CARDS="nvidia nv vesa apm ark chips cirrus cyrix dummy epson fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vga via vmware voodoo"
PORTAGE_ELOG_CLASSES="info warn error log"
PORTAGE_ELOG_SYSTEM="save"
FEATURES="buildpkg distcc"



SYNC="rsync://rsync.gentoo.org/gentoo-portage"
GENTOO_MIRRORS="http://gentoo.tiscali.nl/ "

_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 27780
Location: 56N 3W

PostPosted: Sun Dec 09, 2007 12:49 pm    Post subject: Reply with quote

Aniruddha,

A few things,
Code:

DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.2.1"
permits only a single host (with IP 192.168.2.1) to send jobs to this node, which might be ok.

Code:
distcc-config --set-hosts "192.168.2.1** 192.168.2.1**"
is very odd. I'm not sure what the ** means
but if this was the master and 192.168.2.1 was the helper, I would have
Code:
distcc-config --set-hosts "192.168.2.1/2  localhost/2"
which runs 2 parallel makes on the helper at 192.168.2.1 and when its full, allocates a maximum of 2 jobs locally too. You need to set MAKEOPTS="-j4" on the local box too.

The machine ordering in distcc-config is important. Jobs are allocated round helpers in the order they appear here. You want localhost to be last as it has to run all the ./config and link steps. If its first in the list, its possible for it to be so busy, it can't ./configure enough jobs to have remote machines help.

Lastly, I'm not sure if your test app, abiword, forces MAKEOPTS="-j1" - check its ebuild. (glibc is a good test). Timing may not show much gain as you have the network overhead of sending source out to the helper and getting compiled code back. Its not always faster than a local compile. Thats why distcc over the internet is a bad idea. It works but it takes longer unless you have huge bandwidth.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Kasumi_Ninja
Veteran
Veteran


Joined: 18 Feb 2006
Posts: 1825
Location: The Netherlands

PostPosted: Sun Dec 09, 2007 1:13 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Aniruddha,

A few things,
Code:

DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.2.1"
permits only a single host (with IP 192.168.2.1) to send jobs to this node, which might be ok..

I meant to set all hosts ending within my network. I have three computer and that should be used for distcc

Quote:
Code:
distcc-config --set-hosts "192.168.2.1** 192.168.2.1**"
is very odd. I'm not sure what the ** means
but if this was the master and 192.168.2.1 was the helper, I would have
Code:
distcc-config --set-hosts "192.168.2.1/2  localhost/2"
which runs 2 parallel makes on the helper at 192.168.2.1 and when its full, allocates a maximum of 2 jobs locally too. You need to set MAKEOPTS="-j4" on the local box too..

With * I meant wildcard. I actually used something like this to set my hosts:
Code:
distcc-config --set-hosts "192.168.2.111 192.168.2.112"


Quote:
The machine ordering in distcc-config is important. Jobs are allocated round helpers in the order they appear here. You want localhost to be last as it has to run all the ./config and link steps. If its first in the list, its possible for it to be so busy, it can't ./configure enough jobs to have remote machines help.

How do I set localhost last?

Quote:
Lastly, I'm not sure if your test app, abiword, forces MAKEOPTS="-j1" - check its ebuild. (glibc is a good test). Timing may not show much gain as you have the network overhead of sending source out to the helper and getting compiled code back. Its not always faster than a local compile. Thats why distcc over the internet is a bad idea. It works but it takes longer unless you have huge bandwidth.

Thanks for the tip. I use glibc instead. Since I am on a local network distcc should speed things up right?
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
Back to top
View user's profile Send private message
Kasumi_Ninja
Veteran
Veteran


Joined: 18 Feb 2006
Posts: 1825
Location: The Netherlands

PostPosted: Sun Dec 09, 2007 1:59 pm    Post subject: Reply with quote

I have changed /etc/conf.d/distccd and filled in all ip addresses of my local machine. Currently I am running a test with glibc, but as far I can see primarily locahost is compiling:

Code:
# DISTCC_DIR="/var/tmp/portage/.distcc/" distccmon-text 1

  5143  Compile     strtod_l.c                                    localhost[0]
  5150  Compile     system.c                                      localhost[1]
  5145  Compile     strtold_l.c                                   localhost[2]
  5141  Compile     strtof_l.c                                    localhost[3]

  5143  Compile     strtod_l.c                                    localhost[0]
  5157  Compile     canonicalize.c                                localhost[1]
  5145  Compile     strtold_l.c                                   localhost[2]
  5141  Compile     strtof_l.c                                    localhost[3]

  5143  Compile     strtod_l.c                                    localhost[0]
  5161  Compile     a64l.c                                        localhost[1]
  5145  Compile     strtold_l.c                                   localhost[2]
  5141  Compile     strtof_l.c                                    localhost[3]

  5143  Compile     strtod_l.c                                    localhost[0]
  5165  Compile     l64a.c                                        localhost[1]
  5145  Compile     strtold_l.c                                   localhost[2]
  5141  Compile     strtof_l.c                                    localhost[3]

  5143  Compile     strtod_l.c                                    localhost[0]
  5173  Compile     strfmon.c                                     localhost[1]
  5145  Compile     strtold_l.c                                   localhost[2]
  5141  Compile     strtof_l.c                                    localhost[3]

  5143  Compile     strtod_l.c                                    localhost[0]
  5177  Compile     strfmon_l.c                                   localhost[1]
  5145  Compile     strtold_l.c                                   localhost[2]
  5141  Compile     strtof_l.c                                    localhost[3]

_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 27780
Location: 56N 3W

PostPosted: Sun Dec 09, 2007 2:51 pm    Post subject: Reply with quote

Aniruddha,

Quote:
How do I set localhost last?
you list it last in the distcc-config statement.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Kasumi_Ninja
Veteran
Veteran


Joined: 18 Feb 2006
Posts: 1825
Location: The Netherlands

PostPosted: Sun Dec 09, 2007 3:05 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Aniruddha,

Quote:
How do I set localhost last?
you list it last in the distcc-config statement.


Hmm, this is strange I didn't set localhost at all (as adviced in the documentation). Howcome localhost still does most of the work?

Update
Here are the results for emerge glibc

Code:
# time emerge glibc
real    100m58.168s
user    87m14.600s
sys     12m54.400s

# /etc/init.d/distccd stop
# time emerge glibc
real    101m1.889s
user    87m22.100s
sys     12m45.880s

_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum