Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fun With Distcc
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
unheatedgarage
n00b
n00b


Joined: 19 Sep 2016
Posts: 60

PostPosted: Wed Jul 04, 2018 2:28 pm    Post subject: Fun With Distcc Reply with quote

Edit: Yeah, no, this was dumb. That's not how this works--THAT'S NOT HOW ANY OF THIS WORKS:

Conclusion: I've had best results with setting --randomize and multiplying every host's processor by two (over distcc's recomendations) in /etc/distcc/hosts. It makes a big difference to remember to double-up the number of potential jobs [considering the number of each helper's cores] in your /etc/distcc/hosts file, as well as your make.conf. I'm also not afraid to do emerge -uDNavt @world at the same time between computers, as they're all doing their own things at their own times. It's rare that they clash, the one time being one of them decided to build clang and rust at the same time. All it did was slow things down--in the end there were no errors.

Questions: Does it really matter how many -jobs I set in MAKEOPTS so long as my --load is sane? Couldn't I just throw maximun number of jobs and let the load setting manage it?

I also set EMERGE_DEFAULT_OPTS="--jobs 2 --load-average 0.9". So I'm thinking so long as the load average isn't over 0.9 that it won't try to start emerging another package, but if it does, will it send the same amount of jobs as set in MAKEOPTS for another package? In other words: would the computer then be sending out double the jobs it was sending before? On top of the first emerged/emerging package?

Sometimes I'm just fit-to-be-tied over how intelligent Portage is. I mean, really? Cool!

For as long as I've read (not that long) its been dogma for us to set our -j* settings to double whatever cores we have running if we're using Distcc. Assuming we all have -zeroconf in our make.conf, here's how I go about setting up my build cluster for maximum CPU saturation:

Our own Neddy has stated (paraphrasing) that computers spend most of their time waiting for user input. So in the interest of economizing through-put, I place here my questions on why the man pages of distcc tout such great increases in build-time for our computers, yet my own results (out-of-the-box) have been so thoroughly mediocre.

Setting it up as per the instructions, everything hums along nicely, but I've wondered why (if my cranky old single core) is sending jobs out to all the other computers, it's loaded up so much, yet my other honking fast (for me) quad core is getting in barely a trickle of work to process

Lets assume I have a teensy little single core sending out signals to a hulking quad core. Standard operating procedure would have you set your MAKEOPTS at "-j10" and then walk away happy, but in the distcc man pages it states that:

Quote:
/LIMIT
A decimal limit can be added to any host specification to restrict the number of jobs that this client will send to the machine. The limit defaults to four per host (two for localhost), but may be further restricted by the server. You should only need to increase this for servers with more than two processors.


So I set my /etc/distcc/hosts to look like this:

tiny-core quad-core --randomize

Hurray! We're talking! Lights are flashing on the router and things are diddling. But...snooze...things really arent' building faster, and my quad-cores cpus are just playing with themselves--no real computation going on here, so lets' try this:

quad-core

Nope, not really much difference, but the Tiny Core is still loaded sending jobs

Fine. The man pages say each helper only uses four jobs by default, so lets crank that up:

quad-core/8

NOW WERE TALKING. Full usage of all the cores, meanwhile tiny-core is able to happily hum along sending jobs.

In this case, cranking up the jobs sent to quad core made a huuuuge difference. Also, removing tiny-core (localost) also improved things--giving tiny-core the much needed resources it needed to run the distcc daemon and all it's pre-op work.

Every case is different. If I were running the same job from my quad-core, I might exclude the tiny-core, but more than likely I would keep it included,
Or you could just run Distcc in simple compression mode. I've run tests to compare the same package, with the same computers, with different settings, and the results are really interesting if you're into statistics. :)

The distcc defaults are four jobs per-host, but I have four processors (five in this case--quite a bit more depending on what's plugged into the network) and they say you can double-up on your MAKEOPTS. Doubling up on your MAKEOPTS doesn't hurt things, but it's doing jack-squat if you're not sending those extra jobs to your helpers.

But if we were to add in a couple of more computers into the mix and want to update them all at once? Can you do that? YOU'RE DAMN RIGHT YOU CAN.

All of these procesors process things at a different time and pace, so if tiny-core is still thinking about one job while it's at only %40, while quad-core is sending out a job to it, tiny core can handle it. Meanwhile our other computers are also processing and sending/recieving their jobs--what ends up is no one computer is overloaded, because we've set our EMERGE_DEFAULT_OPTS="--jobs 2 --load-average 0.9" (or whatever's sane for that computer's processor). Setting your load average per computer is important too, that way if it's working hard doing a job for one computer it won't start another job for itself, and this goes vice/versa for all the other 'puters on the network too.

I really have no idea how all this works, but it's fascinating and I want to learn more!

I've seen it with my own eyes, by god. I sent my cluster off running a full --empty-tree, and for the most part it was a-ok. As a user who's tried to break it, I find Distcc to be extremely robust and flexible--having changed hosts, added/removed pump and/or compression on-the-fly without a hiccup. The program is great by its defaults, but once you get it tweaked, it's stunning.

But then, wondering if these computers all working together to bring each other up to snuff, and considering something about the tide and how it brings all the other boats up, or how the slowest computer in the chain holds everyone else back...doesn't it all just work out to be the same? I can't help but think this whole thing is nothing but mental masturbation, but hey, just like jerking off; it's fun, it feels good, and it hurts no one.

Happy computing, everyone!
_________________
I'm not even mad; I'm impressed!


Last edited by unheatedgarage on Sat Jul 14, 2018 1:03 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Jul 04, 2018 7:38 pm    Post subject: Reply with quote

unheatedgarage,

unheatedgarage wrote:
So I set my /etc/distcc/hosts to look like this:

tiny-core quad-core --randomize


The order in which hosts appear in /etc/distcc/hosts is important.
With hostA/8 hostB/8 ... hostZ/8, until hostA has 8 jobs running, nothing will go to hostB.
Until both A and B are busy, nothing will go to hostC, so localhost should not appear in /etc/distcc/hosts or if it does, it should be at the end.
If --randomize helps throughput. you are sending too many jobs to your helpers as all it does is spread the load.
That might be a bit simplistic as the helpers will be doing their own thing too.

locathost still has to do the configuration, linking and possibly the preprocessing too.
With distcc, it has to keep the network busy and in pump mode, run compression, so distcc is not all gains.
_________________
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
unheatedgarage
n00b
n00b


Joined: 19 Sep 2016
Posts: 60

PostPosted: Thu Jul 05, 2018 12:54 am    Post subject: Reply with quote

That's good to know. I'll keep playing with it and see what works best. Thanks, Neddy!
_________________
I'm not even mad; I'm impressed!
Back to top
View user's profile Send private message
johngalt
Apprentice
Apprentice


Joined: 09 Sep 2004
Posts: 258
Location: 3rd Rock

PostPosted: Thu Jul 05, 2018 5:37 am    Post subject: Reply with quote

@unheatedgarage - Thanks for this post. My Core i7 965 EE has some work to do for my two pitiful laptops lol.

@Neddy - as always, thanks for your fixes and explanations.
_________________
desultory wrote:
If you want to retain credibility as a functional adult; when you are told that you are acting boorishly, the correct response is to consider that possibility and act accordingly to correct that behavior.


Amen.
Back to top
View user's profile Send private message
R0b0t1
Apprentice
Apprentice


Joined: 05 Jun 2008
Posts: 264

PostPosted: Fri Jul 06, 2018 2:22 am    Post subject: Reply with quote

What is the average cores to GB of RAM ratio in your cluster? Is there a way to track machine utilization?

I have been wanting to set up a distcc farm on cheap ARM boards instead of buying a server.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Jul 06, 2018 4:29 pm    Post subject: Reply with quote

R0b0t1,

You need about 1GB/core for some C++ code, which is why its not possible to build some things on small ARM borads.
On the other hand, is that very much worst case.
With 96 cores working hard, I've not got over 60G RAM used, which suggests the average RAM/core is much lower.

Lots of small RAM ARM boards won't help you build the things that need 1G RAM per core.
_________________
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
unheatedgarage
n00b
n00b


Joined: 19 Sep 2016
Posts: 60

PostPosted: Sat Jul 14, 2018 12:59 am    Post subject: Reply with quote

Nevermind! Don't do that! This was a bad idea from the beginning, and I should feel bad for having thought of it--this is why we can't have nice things!

I write this from a computer that's herking-and-jerking from swapping too much. I set both my laptop and my helper to do some building and it just about crashed everything (thank goodness for large swap partitions!), and I have been experiencing these issues just about ever since I made the first post.

HOW EMBARASSING

So it's back to the sane distcc defaults for me--no more overloading everything.

Hope I didn't crash anyone elses computers. :oops:

Happy distributing, everyone!
_________________
I'm not even mad; I'm impressed!
Back to top
View user's profile Send private message
unheatedgarage
n00b
n00b


Joined: 19 Sep 2016
Posts: 60

PostPosted: Sat Jul 14, 2018 4:00 am    Post subject: Reply with quote

In this case, say my helper: tiny-core is set to

MAKEOPTS="-J100 -l1"
EMERGE_DEFAULT_OPTS=" --jobs 100 --load-average 0.9"

It was my hope that Portage would be smart enough to know to balance things based on the "-l" and "--load-average" settings in MAKEOPTS and EMERGE_DEFAULT_OPTS, respectively, but this doesn't seem to be so.

As we speak, tiny-core is stuck grinding into swap trying to emerge dev-libs/popt and sys-libs/glibc at the same time, so it seems likely that emerging more than job at once (depending on the size and intensity of the jobs) will overload the processor, and portage won't be able to keep the number of jobs set in MAKEOPTS to a sane level.

When my desktop quad-core was seizing up earlier, it was recieving jobs from both tiny-core and laptop. Not sure which packages they were emerging at the time, but it was definitely enough to clog up quad's tubes and bring things to a near stand-still.

So, if I were to continue setting both tiny-core and laptop to build at the same time (with both sending jobs to quad-core), it certainly makes sense to keep distcc at its defaults.

But...

Maybe I could keep the not-so-sane settings I was talking about earlier in both tiny-core and laptop's /etc/distcc/hosts, but make sure to not set EMERGE_DEFAULT_OPTS at more than one --job, maybe then that wouldn't completely overrun either quad-core, or tiny-core/laptop.

Note: I'm no longer running localhost in either tiny-core or laptop, and they're just sending jobs to quad-core, not each other.

I like the idea of Portage beginning to process another package while the system is building another (as long as it's not overloaded), that's why I was all for setting more than one job in EMERGE_DEFAULT_OPTS, once I read about it, but if Portage is not meant (or not capable of) dealing with multiple jobs and distcc, then it's all for naught.

Well anyway, it's a blast--having a ball. I'm still on the path to get my computer science degree and become a Gentoo developer, it's just a long (expensive) path. Meanwhile, I'm standing on the shoulders of giants, and I know that you juggernauts are here to help me along.

It's funny how when your Windows system breaks, and you install Ubuntu as a patch (all the while proclaiming you hate computers and just want them to "work"), things flip. You spend your life wrenching on cars and motorcycles, then you go install one system--you do ONE THING, and the next thing you know your path and interests have completely changed.

And, well, here we are.

Thanks, everyone. Thanks everyone so much.
_________________
I'm not even mad; I'm impressed!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Jul 14, 2018 7:44 am    Post subject: Reply with quote

unheatedgarage,

The helpers make.conf is never consulted when its running distcc for helping other systems.
Its distccd listens for incoming jobs and runs them, regardless of make.conf.

Code:
MAKEOPTS="-J100"
is incorrect - its -j, not -J.
This sets the number of parallel jobs a single package can start. In this case', its as good as unlimited.
_________________
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
unheatedgarage
n00b
n00b


Joined: 19 Sep 2016
Posts: 60

PostPosted: Sun Jul 15, 2018 5:09 am    Post subject: Reply with quote

Mr. Seagoon,

Thank you, sir! As always, I place your input on the highest pedistal (you have no idea how much you've helped me over the years).

Yessir, that MAKEOPTS was a typo, rest assured it was correct in the make.conf--thank you very much for your observations!

I've found, using these absurd MAKEOPTS, glibc does not respect the load setting, at least not while it's installing. While it's building all seems all is well, but if I keep MAKEOPTS at -j100 -l1, the installation goes haywire--load spikes, swap starts, it's a mess. But if I set -j1 (like any sane person would do), tiny-core goes ahead and installs it (although it takes a while!).

What I ended up doing was setting a build environment for glibc called sane-makeopts and pointing glibc to it in package.env.

What I'm still curious about, though is: how does Portage treat two packages. How does Portage two-fist two packages, and how does it treat the "-l" setting in MAKEOPTS and the "--load-average" in EMERGE_DEFAULT_OPTS?

What's the magic with parallel builds, Distcc, and Portage?

None of this is urgent--just curious. Should I just get on IRC (it frightens and confuses me) and ask these questions there?

I'm grateful for your time!

Edited for spelling.
_________________
I'm not even mad; I'm impressed!
Back to top
View user's profile Send private message
johngalt
Apprentice
Apprentice


Joined: 09 Sep 2004
Posts: 258
Location: 3rd Rock

PostPosted: Sun Jul 15, 2018 5:16 am    Post subject: Reply with quote

I asked a similar question in the Installing Gentoo forum regarding MAKEOPTS and EMERGE_DEFAULT_OPTS:

https://forums.gentoo.org/viewtopic-t-1083538.html

I've still not quite got my head wrapped around it, but I've resorted to MAKEOPTS="-j{#cores +1} -l{#cores} for CPU utilization and EMERGE_DEFAULT_OPTS="--jobs=2 --load-average=2 --with-bdeps=y" on my Core i7 965 Extreme (Nehalem, aka 1st gen core). So, in my case, it's -j9 -l8
_________________
desultory wrote:
If you want to retain credibility as a functional adult; when you are told that you are acting boorishly, the correct response is to consider that possibility and act accordingly to correct that behavior.


Amen.
Back to top
View user's profile Send private message
unheatedgarage
n00b
n00b


Joined: 19 Sep 2016
Posts: 60

PostPosted: Mon Jul 16, 2018 6:39 am    Post subject: Reply with quote

Jeez. I really screwed up by posting this, then, because your thread was pretty much the same thing as mine. Hu always gives great, thorough, answers.

Thanks, Hu!

Thank you for your reply johngalt.

Just discovered this tonight: I've been running --quiet-build for so long, I forgot to watch the output of each package. You know how some packages won't build with distcc-pump enabled? I had created a build environment just for them called disable-pump. In that I had:

Code:
FEATURES="distcc -distcc-pump"


This worked, but what I didn't realize (after watching the output of portage) was that distcc was failing to distribute.

You see, I thought I could leave
Code:
,cpp,lzo
enabled in /etc/distcc/hosts and Distcc wouldn't care about whether or not I had enabled (or disabled) pump or compression in my build environment.

That's wrong, wrong, wrong.

Anytime I set disable-pump, that just broke it unless I removed
Code:
,cpp
from each of the helpers in the hosts file. Then Distcc started to work each system again.

Turns out I've been sucking my own dick this entire time, without even having the pleasure of knowing it.
_________________
I'm not even mad; I'm impressed!
Back to top
View user's profile Send private message
unheatedgarage
n00b
n00b


Joined: 19 Sep 2016
Posts: 60

PostPosted: Tue Jul 31, 2018 11:20 am    Post subject: Warning warning warning Reply with quote

Two of my systems seem to be really, really broken since the python 3_6 upgrade, and I do believe it's because of using distcc in pump mode:

Code:
>>> Jobs: 144 of 153 complete, 1 running, 1 failed  Load avg: 3.78, 4.43, 4.80Exception in callback PipeLogger._output_handler(12)
handle: <Handle PipeLogger._output_handler(12)>
Traceback (most recent call last):
  File "/usr/lib64/python3.6/asyncio/events.py", line 145, in _run
    self._callback(*self._args)
  File "/usr/lib64/python3.6/site-packages/portage/util/_async/PipeLogger.py", line 124, in _output_handler
    log_file.flush()
OSError: [Errno 28] No space left on device
--Return--
> /usr/lib64/python3.6/site-packages/portage/util/_eventloop/asyncio_event_loop.py(76)_internal_caller_exception_handler()->None
-> pdb.set_trace()
(Pdb)

Exiting on signal 2


I cannot upgrade anything.

I cannot install anything.

Obviously I'm out of my depth here, but I've been having my misgivings about 'pump' for quite some time now. These were the only two systems I was using pump mode on. There have been other (rather adamant) rumblings about it around here too. Just know I'm writing from a broken (un-updatable) and really flaky system right now. My laptop rebooted fine but is also suffering from the same Portage error.
_________________
I'm not even mad; I'm impressed!
Back to top
View user's profile Send private message
unheatedgarage
n00b
n00b


Joined: 19 Sep 2016
Posts: 60

PostPosted: Tue Jul 31, 2018 11:43 am    Post subject: Reply with quote

Maybe it's from having this in my /etc/fstab?

Code:
tmpfs                   /var/tmp/portage tmpfs          size=6G,uid=portage,gid=portage,mode=775,noatime         0 0


I'm pretty sure I wasn't running that in my laptop, though. And as far as disk space goes, this is a 1TB drive.

Parted shows:

Code:
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                           
Model: ATA ST31000528AS (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  1000GB  1000GB  primary  ext4


Hmmmmm....
_________________
I'm not even mad; I'm impressed!
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Tue Jul 31, 2018 2:18 pm    Post subject: Reply with quote

report the output of

$ df

... it is reporting you're out of space, but don't know where. Appears to be a logfile.

Since tmpfs is cleared on boot, if the problem persisted through reboots I'd be surprised.
You could just clear out the contents of your tmpfs too if needed, especially if it was full of failed builds.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21602

PostPosted: Wed Aug 01, 2018 12:23 am    Post subject: Reply with quote

For this case, I'd suggest df --o, which will give us both blocks and inodes in a single step. Exhausting either resource leads to ENOSPC, which can confuse users who check their free blocks, find space, and wonder why there is "No space left on device."
Back to top
View user's profile Send private message
unheatedgarage
n00b
n00b


Joined: 19 Sep 2016
Posts: 60

PostPosted: Wed Aug 01, 2018 12:46 am    Post subject: Reply with quote

df --o after doing a reboot:
Code:
Filesystem     Type       Inodes   IUsed    IFree IUse% 1K-blocks      Used     Avail Use% File Mounted on
none           tmpfs     1011118     622  1010496    1%   4044472      1048   4043424   1% -    /run
udev           devtmpfs  1009723     467  1009256    1%     10240         0     10240   0% -    /dev
tmpfs          tmpfs     1011118      56  1011062    1%   4044472     21704   4022768   1% -    /dev/shm
/dev/sda1      ext4     61054976 2229744 58825232    4% 961301832 123760748 788686700  14% -    /
tmpfs          tmpfs     1011118       5  1011113    1%   4044472         0   4044472   0% -    /sys/fs/cgroup
tmpfs          tmpfs     1011118      29  1011089    1%   4044472       176   4044296   1% -    /tmp
tmpfs          tmpfs     1011118   61619   949499    7%   6291456   1935876   4355580  31% -    /var/tmp/portage
tmpfs          tmpfs     1011118      22  1011096    1%    808892        24    808868   1% -    /run/user/1000

And yeah, I checked the tmpfs before I rebooted and it was full.

eccerr0r and Hu,

Thank you for taking the time to read and comment. I'm very, very appreciative.

eccerr0r, you were absolutely right. It was late, I was tired--never had that error before, so I panicked, posted, and went to bed. After a reboot this morning, everything was just fine--as you predicted.

I was in the process of doing an --emptytree @world, because I have been having some very strange, mysterious problems on my system. Pages not rendering correctly, being unable to read some of my emails in Thunderbird, but not all of them, spell checker not working in any of my programs, bizarre (to my inexperienced mind) build failures that I could find no real reference to on the internet except for dark, cobwebby BSD corners. So I decided to try an --emptytree with pump mode enabled, then try again in good-old fashioned plain mode to see if it's cured.

Again, sorry for the late-night panic post, and thanks again for your time and consideration.
_________________
I'm not even mad; I'm impressed!
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Thu Aug 02, 2018 1:51 pm    Post subject: Reply with quote

Is is safe to have a distcc for rust so firefox-60 will build faster?
It would be called distrust after all.

<flees from the thrown rotten tomatoes>
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
unheatedgarage
n00b
n00b


Joined: 19 Sep 2016
Posts: 60

PostPosted: Fri Aug 03, 2018 2:55 am    Post subject: Reply with quote

eccerr0r wrote:
Is is safe to have a distcc for rust so firefox-60 will build faster?
It would be called distrust after all.

<flees from the thrown rotten tomatoes>


+1 :lol:

I have just about had it with Firefox. Having used Palemoon, I really, really, like it, but it's just so creepy that I have to use a masked compiler to build it. Other people have also spoken about potential security issues with their addons.

If I can get Chromium to distribute with Clang, that's where I'll be going. What does it matter anymore since Firefox is just a Chromium clone anyway?
_________________
I'm not even mad; I'm impressed!
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Fri Aug 03, 2018 3:31 am    Post subject: Reply with quote

There's plenty of hearsay everywhere, until there's some actual serious issues I'm not too concerned. I'm still using firefox out of creature of habit, using the ESR.

I suspect that the unkeyworded (versus masked) rust compiler is mostly because there are probably few devs that really know rust and can't quite vouch for it yet. Rust was meant to be more secure than C++ as it has stronger intrinsic pointer checking, but it's still rather new and not as well deployed as other languages, especially interpreted languages...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
unheatedgarage
n00b
n00b


Joined: 19 Sep 2016
Posts: 60

PostPosted: Fri Aug 03, 2018 4:23 am    Post subject: Reply with quote

There you go again--going waaay over my head, what with your (clearly) deep knowledge of this stuff! I'll be getting there, but in good time...

All in good time...

Actually, I'd feel less offended by the new Firefox if I could have gotten it and Rust to distribute...

Off topic, but I've been waffling about which programming language to learn first, but then it dawned on me that Portage is written in Python. Since this magic that is Portage is so fascinating, and since I'm no longer taking classes (for now), and since there's plenty of free info out there on the web anyway...

*takes a breath*

...and since you good people are probably tired of me pestering you with questions, well...Python it is!
_________________
I'm not even mad; I'm impressed!
Back to top
View user's profile Send private message
unheatedgarage
n00b
n00b


Joined: 19 Sep 2016
Posts: 60

PostPosted: Thu Sep 06, 2018 11:36 am    Post subject: Reply with quote

As was said by Neddy up-thread, and has been said time, and time, and time again, there’s a limit with distcc.

I figure, it was designed for programmers with very specific use cases, with a very specific build cluster that they could fine-tune to their very unique needs. I gather it was never intended for Gentoo users trying to build an entire world—multiple different packages across many different architectures—some packages building parallel nicely, some not—it’s a crazy place here, and that just wasn’t what the designers had in mind?

It’s a testament to the Gentoo developers/users that it works so well!

For sure, going through all the work to set up one or two helpers really isn’t worth it. And, if they’re old/slow enough, will probably slow you down, what with the overhead of running the distcc client. Again, this has all been said before! The only thing that would burn it into me was just trying it out for myself, and believe me, The Electric Company (Hey You Guys!) thanks me for it!

Setting up many more helpers (at one point I had 25 cores working hard) makes a big difference, but even then only some packages would take advantage of that much potential power, while a lot of them would not.

Then comes in the whole Clang/Chromium thing—I spent waaaay too much time trying to get that to distribute. Granted, I’m completely clueless in these matters, but for the life of me I couldn’t find diddly on the internet except for one or two tantalizing glimpses. I’d eat my hat if Chromium wasn’t distributable, so...anyone get any closer to that?

I can see now how, for some packages, there’s a huge benefit to having a large cluster. But, when tiny-core is struggling under its own weight, not to mention distributing jobs to everyone else, there’s only so much that can happen—even when it’s left out of the /etc/distcc/hosts file—tiny-core don’t care if you’ve got all that processing power, it’s got to run its checks first!

Now the benefit of having a binhost becomes glaringly obvious. Now I see the magic of cross-compiling. Now I understand why a lot of you Big Dogs have been working with embedded devices—what with the fact that modern computers have more than enough horsepower to deal with compiling anymore, that’s where all the fun is!

So it’s time to chuck these old boxes in the landfill. It’s time to step up and learn a whole lot more about a whole lot more. It’s time to quit pissing like a puppy. My newest things: learning the intricacies of Shorewall, getting a Grub-free UEFI system, and reading Common Lisp: A Gentle Introduction to Symbolic Computation.

Best wishes to you all.
_________________
I'm not even mad; I'm impressed!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Sep 06, 2018 5:20 pm    Post subject: Reply with quote

unheatedgarage,

Chromium uses clang to build by default. That happened when it broke with gcc.
distcc is a wrapper around gcc, so out of the box it does not distribute for clang.

So your challenge is to fix Chromium to build with gcc or fix distcc to wrap both gcc and clang.

A first step might be to change the Chromium ebuild to use gcc and see what happens.
_________________
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
hephooey
n00b
n00b


Joined: 24 Feb 2003
Posts: 74

PostPosted: Thu Sep 06, 2018 6:58 pm    Post subject: Reply with quote

I have been using distcc to compile chromium for some time, I think the only thing I did is making symlinks of x86_64-pc-linux-gnu-clang and x86_64-pc-linux-gnu-clang++ to distcc under /usr/lib/distcc/bin on the client (The one you want to install chromium), the compiler servers does not need any change (they need to have the matching clang etc installed though). The bundled ffmpeg coming with chromium failed to compile with distcc for me. So I hacked the ebuild to use the system ffmpeg. After that everything just go through smoothly. The last chromium I built was 69.0.3497.57, if you want to test with specific version.
Back to top
View user's profile Send private message
unheatedgarage
n00b
n00b


Joined: 19 Sep 2016
Posts: 60

PostPosted: Thu Sep 06, 2018 9:13 pm    Post subject: Reply with quote

hephooey,

That's interesting to hear. Here's what's in my file:
Code:
mk@gentoo-quad ~ $ ls -a /usr/lib/distcc/bin/
.            g++-7.3.0                      x86_64-pc-linux-gnu-c++-7.3.0
..           gcc                            x86_64-pc-linux-gnu-clang
c++          gcc-4.9.4                      x86_64-pc-linux-gnu-clang++
c99          gcc-7.3.0                      x86_64-pc-linux-gnu-clang-6.0
cc           i686-pc-linux-gnu-clang        x86_64-pc-linux-gnu-clang++-6.0
clang        i686-pc-linux-gnu-clang++      x86_64-pc-linux-gnu-g++
clang++      i686-pc-linux-gnu-clang-6.0    x86_64-pc-linux-gnu-g++-4.9.4
clang-6.0    i686-pc-linux-gnu-clang++-6.0  x86_64-pc-linux-gnu-g++-7.3.0
clang++-6.0  .keep_sys-devel_distcc-0       x86_64-pc-linux-gnu-gcc
g++          x86_64-pc-linux-gnu-c++        x86_64-pc-linux-gnu-gcc-4.9.4
g++-4.9.4    x86_64-pc-linux-gnu-c++-4.9.4  x86_64-pc-linux-gnu-gcc-7.3.0

And that's in all my servers too, as they're all running the same version of distcc/clang. I was under the impression that dev-util/shadowman takes care of that for us now, and as long as you're using the unstable distcc it will get pulled in.

Yesterday I received an email update on this bug saying it was resolved/fixed, but checking on it now it just says CONFIRMED.

It's been a few weeks since I've tried again, so I'll give it another go tonight and see what happens. Thanks for the heads up on ffmpeg too!

And as always, thanks for the wisdom, Neddy.
_________________
I'm not even mad; I'm impressed!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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