Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can I trust distccmon-text for pump check?
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
dboat
n00b
n00b


Joined: 30 Dec 2016
Posts: 23

PostPosted: Wed Jan 18, 2017 7:02 am    Post subject: Can I trust distccmon-text for pump check? Reply with quote

Orig Subject: Does pump distcc always send Preprocess job to helper?
------------------------------------------------------------------------------------------------------------------------------------------------------------------

I want to revitalize my old eeePC 901. After quite some readings and testings, I get distcc working (including crossdev on my x86-64 for i686 of eeepc).

Would like to clarify the captioned question first because if it is a false-negative indicator (that I am already using pump), then I will and can do nothing to further improve the performance much.

I run "distccmon-text 1" on eeepc and find that all Preprocess jobs are done on localhost only.
I check the /tmp folder on the helper machine and find no /tmp/distcc-pump* there.
What else can I check to confirm if I am or am not using pump?

Thanks for your help


Last edited by dboat on Thu Jan 19, 2017 6:39 am; edited 1 time in total
Back to top
View user's profile Send private message
dboat
n00b
n00b


Joined: 30 Dec 2016
Posts: 23

PostPosted: Thu Jan 19, 2017 5:46 am    Post subject: Reply with quote

While I am awaiting for advice, I tried the bootstrap on distcc wiki and have the following observation when I compile the kernel.

If I fire
Code:
# make -j6 bzImage

I saw some warning messages that I am not using pump.
On /tmp of the helper machine, there are lot of temp files but no temp folder.

If I fire
Code:
# pump make -j6 bzImage

The warning message of not using pump gone.
On /tmp of the helper machine, besides temp files, there are at most 6 temp folders.

I cannot run distccmon-text because I am in chroot mode, cannot confirm if I can see Preprocess on helper.

But still, can I conclude that I should not trust distccmon-text for pump check?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Jan 19, 2017 11:14 am    Post subject: Reply with quote

dboat,

First a hint at using the Forum. Until your opening post in a topic has a reply, it will appear in the View unanswered posts search. By replying to yourself, your topic is seen as answered. If you want to add new information, you should edit your original post, as many times as is needed, until another forums user responds.

distcc and distcc in pump mode both work in the chroot, as does distccmon-text.
You need to configure distcc inside the chroot.

What is in your /etc/distcc/hosts in the chroot on the eeePC 901?
_________________
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
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Thu Jan 19, 2017 1:11 pm    Post subject: Reply with quote

wrt the original query, "Does pump distcc always send Preprocess job to helper?"
I thought distcc did preprocessing on the main host only? Perhaps this is something new, though..
Back to top
View user's profile Send private message
dboat
n00b
n00b


Joined: 30 Dec 2016
Posts: 23

PostPosted: Thu Jan 19, 2017 3:55 pm    Post subject: Reply with quote

NeddySeasoon,

Thanks for your reply and hints about the forum, will follow.

About
NeddySeagoon wrote:

distcc and distcc in pump mode both work in the chroot, as does distccmon-text.

I think I can run either emerge or distccmon-text at one time, but not simultaneously. For a running OS, I can ssh several terminals. But when I bootstrap distcc to compile the first kernel, I can't run distccmon-text while running emerge/make, or, is there any skill to ssh into a chroot environment? I don't know much about chroot. :oops: [chroot happened in my 2nd post only, not 1st. Hope I have not made too much confusion.]


I had messed up eeepc by pressing too much time ctrl-c during emerge. Meanwhile, I am doing test on another vm with i686 build to learn. For easy communication, I will still call them eeepc and the helper (both are vm now).

eeepc: 192.168.0.2, 2-cores
helper: 192,168,0.6. 6-cores

On eeepc
in /etc/portage/make.conf, I have
Code:
   FEATURES="distcc distcc-pump"
   MAKEOPTS="-j7"     (I tried "-j17 -l2" before, 17=(2+6)x2+1, but seems it makes more jobs done locally)

in /etc/distcc/hosts
Code:
   192.168.0.6/6,cpp,lzo    (I tried "192.168.0.6/6,cpp,lzo localhost/1", also get more jobs done locally before)


On helper
in /etc/portage/make.conf, I have
Code:
   FEATURES="distcc distcc-pump"
   MAKEOPTS="-j7"

in /etc/distcc/hosts
Code:
   localhost

in /etc/conf.d/distccd
I only edit the --allow ip, fix the log. I have not added "-j N" that I notice someone did.
I start the distccd daemon

When I check /tmp of helper, there are 6 temp folders and 1x temp files especially when the cpu is full load. But they just flash too fast that I cannot look inside to confirm if temp folder means Preprocess job.

What bother me is that I see a lot of examples on forum that people get Preprocess jobs run by helper on their distccmon-text output. So far, I never catch a single one. :?
Back to top
View user's profile Send private message
dboat
n00b
n00b


Joined: 30 Dec 2016
Posts: 23

PostPosted: Thu Jan 19, 2017 4:11 pm    Post subject: Reply with quote

steveL wrote:
wrt the original query, "Does pump distcc always send Preprocess job to helper?"
I thought distcc did preprocessing on the main host only? Perhaps this is something new, though..


Check these posts
https://forums.gentoo.org/viewtopic-t-920630.html
https://forums.gentoo.org/viewtopic-p-6897952.html
https://forums.gentoo.org/viewtopic-t-1004782.html

search "preprocess" and you'll see a lot of preprocesses were done by helper.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Jan 19, 2017 4:30 pm    Post subject: Reply with quote

dboat,

You have five Virtual Terminals by default. When you boot your live media, the root prompt appears on VT-1.
VT-2..5 are unused and present the login prompt.
Try Alt-Fn ... where n is 2..5. This may not look usefal as the root password has been randomised, so you cant, log in as root.

Go back to VT-1 (Alt-F1) and set the root password. Give the passwd command.
Now you know the root password you can use the other VTs.

On the helper(s) all that matters for distcc is the content of /etc/conf.d/distccd and that distccd is running.
make.conf is not used. Job control comes from the eeepc.

On the eeepc, /etc/distcc/hosts tells about helpers.
Code:
192.168.0.6/6,cpp,lzo
is correct.
That says to send a maximum of 6 jobs to 192.168.0.6 and use compression, which is required for pump mode.

distcc will fall back to localhost, even if its not listed in /etc/distcc/hosts. It does not always distribute as some things break with distcc.
Even with pump mode selected, pump mode is not always used.

Get into the chroot in two VTs or ssh sessions. emerge in one and run distccmon-text in the other.

steveL,

pump mode lets helpers do pre processing. It compresses all the required files and sends them to the helper.
Its far from perfect. Here, pump mode often fails for "Unsafe Absolute Includes" which I gather is a 'feature' of the package being built, rather than distcc.
_________________
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
dboat
n00b
n00b


Joined: 30 Dec 2016
Posts: 23

PostPosted: Fri Jan 20, 2017 7:15 am    Post subject: Reply with quote

NeddySeagoon,

Thanks a lot for your detail explanation.

During a fresh installation, I install distcc *after* chroot. When I change to VT-2, am I still in chroot mode or it is a livecd environment? Or, I am supposed to install again distcc for livecd and run
Code:
DISTCC_DIR="/mnt/gentoo/var/tmp/portage/.distcc/" distccmon-text 10

in the livecd environment?


Regarding the pump mode, I am looking for evidence for already running it, so that, not much performance improvement is available on this vector. I understand there are cases that distcc will fall back to localhost. But as I mentioned, I got zero record that preprocess job is done by helper on distccmon output (earlier learnings not related to chroot).

It took me almost three hours to install an eselect-profile-1 os onto my eeepc. I don't know if it is normal, and should proceed the installation with the distcc I emerge/set.

Regards,
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Jan 20, 2017 10:19 am    Post subject: Reply with quote

dboat,

When you login at VT-2 you are outside the chroot. VT-1 is inside it.
If you set different root passwords inside and outside the chroot while you are on VT-1,
which password works on VT-2 ?

The chroot still exists and everything its doing is still running.
To get into the chroot from VT-2, after you are 'in' on VT-1, there is noting to mount - that's already done.

Try df or mount or both. This will hep you see where you are.
Consider the VT as a window on your one running system.
You can have several windows into different places.

Its
Code:
chroot /mnt/gentoo /bin/bash
source /etc/profile
env-update
<fix_prompt>


From outside the chroot,
Code:
DISTCC_DIR="/mnt/gentoo/var/tmp/portage/.distcc/" distccmon-text 10
probably won't work as distccmon-text isn't in your $PATH there.
At least, not on the Gentoo liveCD.
You would need to give the full path to distccmon-text inside the chroot.

Do the chroot in VT-2 and
Code:
DISTCC_DIR="/var/tmp/portage/" distccmon-text 10

I don't think you need /.distcc in the DISTCC_DIR= but I'm not 100% sure.
_________________
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
dboat
n00b
n00b


Joined: 30 Dec 2016
Posts: 23

PostPosted: Sun Jan 22, 2017 4:30 pm    Post subject: Reply with quote

NeddySeagoon,

Thanks for giving me a new understanding on chroot. It is definitly more useful than solving the preprocess query.

I tried it on vm instead of VT. I ssh a 2nd time, chroot, run distccmon-text, and it works! But still, I see 100% preprocess job done at localhost.

I still need the /.distcc in DISTCC_DIR. This folder was not there until I ran once emerge.

-----------------
Advice to all eeepc 901 owners

Use the Atom cpu to build a eselect-profile-1 OS first. Then, you can use crossdev on other helper machines to speed up the rest installation charmfully.

Reason 1: To use bootstrap distcc, your helper machine should better be i686 arch. I can't make crossdev to help at this stage, I gave up trying. (I built an i686 vm helper to do the above testings)

Reason 2: I have a 3G partition for a slim XP. Os-prober failed to recognize it when I used bootstrap distcc. I had tried all combination of re-install grub:2, os-prober, re-mkconfig, reboot; all failed. But when I use the Atom cpu to build the first OS, os-prober just did its job instantly.

-----------------
The preprocess query is still outstanding. I will pause here. Thanks NeddySeagoon again for your help.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Jan 22, 2017 5:33 pm    Post subject: Reply with quote

dboat,

How do you use pump mode?
That's what tells distcc to try to do preprocessing.

You cat set it in the eeepc FEATURES or use
Code:
pump emerge ...

_________________
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
dboat
n00b
n00b


Joined: 30 Dec 2016
Posts: 23

PostPosted: Mon Jan 23, 2017 3:24 am    Post subject: Reply with quote

NeddySeagoon wrote:
dboat,

How do you use pump mode?
That's what tells distcc to try to do preprocessing.

You cat set it in the eeepc FEATURES or use
Code:
pump emerge ...


I tried all combinations: either one or both. In all three cases, I saw flashing folders in /tmp on helper.

I tend to believe that pump mode is active but there is a minor bug on how distccmon is reporting it. i686 is a fading arch and deserve less attention naturally. So, I will report here if I find something looks different in future distcc version. What I have learnt now will definitely help in future. :D
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Fri Feb 03, 2017 6:22 pm    Post subject: Reply with quote

steveL wrote:
I thought distcc did preprocessing on the main host only?

dboat wrote:
search "preprocess" and you'll see a lot of preprocesses were done by helper.

NeddySeagoon wrote:
pump mode lets helpers do pre processing. It compresses all the required files and sends them to the helper.
Its far from perfect. Here, pump mode often fails for "Unsafe Absolute Includes" which I gather is a 'feature' of the package being built, rather than distcc.

Ah OK, thanks for the info.. something new every day :-)
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Sat Feb 04, 2017 2:28 pm    Post subject: Reply with quote

More than anything, people always mistake distcc is never sending system headers.
You can see people using different gcc/glibc or kernel headers for distcc normal mode, but pump not only compile files, it also link them, it is the worst of the worst case.

While it would be obvious to everyone you should not build a project with a mix of glibc headers and uclibc. people don't get you're not sane to do that with different glibc/kernel headers...

and in pump mode, people do really nasty things
local: binutils-config --linker ld.bfd
helper: binutils-config --linker ld.gold

And you will see: my distcc works, but when using pump it fail :(
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sat Feb 04, 2017 4:25 pm    Post subject: Reply with quote

krinn: Yeah, linking is another problem; I recall Neddy using a config file to disable distcc for certain packages like perl or python, for RPi cross-compilation, where native linking is/was required.

Both (linkage and system headers) mitigate toward having a chroot for each distcc helper, keeping sync with toolchain.. oh wait that's really a SYSROOT, and it's what crossdev uses.
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