public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] distccd offspring
@ 2024-12-16 17:11 Jorge Almeida
  2024-12-17  8:18 ` netfab
  2024-12-17  8:26 ` William Kenworthy
  0 siblings, 2 replies; 8+ messages in thread
From: Jorge Almeida @ 2024-12-16 17:11 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]

I have this in the output of "ps axf"

  532 ?        SN     0:00  \_ /usr/bin/distccd --user distcc --daemon
--no-detach --log-stderr --log-level notice --port 3632 --listen
192.168.1.131 --allow 192.168.1.128
  536 ?        SN     0:00  |   \_ /usr/bin/distccd --user distcc --daemon
--no-detach --log-stderr --log-level notice --port 3632 --listen
192.168.1.131 --allow 192.168.1.128

Process 532 is what it is supposed to be. But why the child 536? Not to
mention 17 more children just like 536, which I didn't paste.
The distccd daemon is alive but not really working, as it has nothing to
do: I use this about once  a week (for world updating, eventually kernel
compiling), and today the 192.168.1.128 client is not even on. I checked
the distccd log, nothing there. The connection is by ethernet cable.
distccd works just fine when required to.

So, what could lead it to spawn so many useless children? I couldn't find
anything in the manual, and googling doesn't seem to help.


Any distcc user in the same boat?

Thanks

Jorge Almeida

[-- Attachment #2: Type: text/html, Size: 1281 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] distccd offspring
  2024-12-16 17:11 [gentoo-user] distccd offspring Jorge Almeida
@ 2024-12-17  8:18 ` netfab
  2024-12-17 10:02   ` Jorge Almeida
  2024-12-17  8:26 ` William Kenworthy
  1 sibling, 1 reply; 8+ messages in thread
From: netfab @ 2024-12-17  8:18 UTC (permalink / raw
  To: gentoo-user

Le 16/12/24 à 18:11, Jorge Almeida a tapoté :
> Any distcc user in the same boat?

Yes. How many CPU cores do you have ?




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] distccd offspring
  2024-12-16 17:11 [gentoo-user] distccd offspring Jorge Almeida
  2024-12-17  8:18 ` netfab
@ 2024-12-17  8:26 ` William Kenworthy
  2024-12-17  8:34   ` Alexandru N. Barloiu
  1 sibling, 1 reply; 8+ messages in thread
From: William Kenworthy @ 2024-12-17  8:26 UTC (permalink / raw
  To: gentoo-user

My understanding is that its so there are free processes ready to go (it 
takes time and resources to spawn a new process) ... its normal on my 
systems.

BillK


On 17/12/24 01:11, Jorge Almeida wrote:
> I have this in the output of "ps axf"
>
>   532 ?        SN     0:00  \_ /usr/bin/distccd --user distcc --daemon 
> --no-detach --log-stderr --log-level notice --port 3632 --listen 
> 192.168.1.131 --allow 192.168.1.128
>   536 ?        SN     0:00  |   \_ /usr/bin/distccd --user distcc 
> --daemon --no-detach --log-stderr --log-level notice --port 3632 
> --listen 192.168.1.131 --allow 192.168.1.128
>
> Process 532 is what it is supposed to be. But why the child 536? Not 
> to mention 17 more children just like 536, which I didn't paste.
> The distccd daemon is alive but not really working, as it has nothing 
> to do: I use this about once  a week (for world updating, eventually 
> kernel compiling), and today the 192.168.1.128 client is not even on. 
> I checked the distccd log, nothing there. The connection is by 
> ethernet cable. distccd works just fine when required to.
>
> So, what could lead it to spawn so many useless children? I couldn't 
> find anything in the manual, and googling doesn't seem to help.
>
>
> Any distcc user in the same boat?
>
> Thanks
>
> Jorge Almeida


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] distccd offspring
  2024-12-17  8:26 ` William Kenworthy
@ 2024-12-17  8:34   ` Alexandru N. Barloiu
  2024-12-17 10:08     ` Jorge Almeida
  0 siblings, 1 reply; 8+ messages in thread
From: Alexandru N. Barloiu @ 2024-12-17  8:34 UTC (permalink / raw
  To: gentoo-user

Not only to save time and resources, but also it's a way for the server
to be able to report to the client which CPUs are available for
compilation. It will favour those which are less busy. 

On Tue, 2024-12-17 at 16:26 +0800, William Kenworthy wrote:
> My understanding is that its so there are free processes ready to go
> (it 
> takes time and resources to spawn a new process) ... its normal on my
> systems.
> 
> BillK
> 
> 
> On 17/12/24 01:11, Jorge Almeida wrote:
> > I have this in the output of "ps axf"
> > 
> >   532 ?        SN     0:00  \_ /usr/bin/distccd --user distcc --
> > daemon 
> > --no-detach --log-stderr --log-level notice --port 3632 --listen 
> > 192.168.1.131 --allow 192.168.1.128
> >   536 ?        SN     0:00  |   \_ /usr/bin/distccd --user distcc 
> > --daemon --no-detach --log-stderr --log-level notice --port 3632 
> > --listen 192.168.1.131 --allow 192.168.1.128
> > 
> > Process 532 is what it is supposed to be. But why the child 536?
> > Not 
> > to mention 17 more children just like 536, which I didn't paste.
> > The distccd daemon is alive but not really working, as it has
> > nothing 
> > to do: I use this about once  a week (for world updating,
> > eventually 
> > kernel compiling), and today the 192.168.1.128 client is not even
> > on. 
> > I checked the distccd log, nothing there. The connection is by 
> > ethernet cable. distccd works just fine when required to.
> > 
> > So, what could lead it to spawn so many useless children? I
> > couldn't 
> > find anything in the manual, and googling doesn't seem to help.
> > 
> > 
> > Any distcc user in the same boat?
> > 
> > Thanks
> > 
> > Jorge Almeida
> 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] distccd offspring
  2024-12-17  8:18 ` netfab
@ 2024-12-17 10:02   ` Jorge Almeida
  2024-12-17 10:16     ` netfab
  0 siblings, 1 reply; 8+ messages in thread
From: Jorge Almeida @ 2024-12-17 10:02 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 251 bytes --]

On Tue, 17 Dec 2024 at 08:18, netfab <netbox253@netc.eu> wrote:

> Le 16/12/24 à 18:11, Jorge Almeida a tapoté :
> > Any distcc user in the same boat?
>
> Yes. How many CPU cores do you have ?
>

8 + 6

In make.conf:
MAKEOPTS="-j29 -l8"

[-- Attachment #2: Type: text/html, Size: 648 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] distccd offspring
  2024-12-17  8:34   ` Alexandru N. Barloiu
@ 2024-12-17 10:08     ` Jorge Almeida
  0 siblings, 0 replies; 8+ messages in thread
From: Jorge Almeida @ 2024-12-17 10:08 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 791 bytes --]

On Tue, 17 Dec 2024 at 08:34, Alexandru N. Barloiu <axl@dale.ro> wrote:

> Not only to save time and resources, but also it's a way for the server
> to be able to report to the client which CPUs are available for
> compilation. It will favour those which are less busy.
>
> On Tue, 2024-12-17 at 16:26 +0800, William Kenworthy wrote:
> > My understanding is that its so there are free processes ready to go
> > (it
> > takes time and resources to spawn a new process) ... its normal on my
> > systems.
> >
>
>
>
OK. I get the idea. I suppose all those idle processes are harmless, not
much resources consumed. I could always keep the service down as default
and bring it up when needed, but it doesn't seem to be worth it. (I thought
I might be doing something wrong)

Thanks

Jorge Almeida

[-- Attachment #2: Type: text/html, Size: 1241 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] distccd offspring
  2024-12-17 10:02   ` Jorge Almeida
@ 2024-12-17 10:16     ` netfab
  2024-12-17 10:46       ` Jorge Almeida
  0 siblings, 1 reply; 8+ messages in thread
From: netfab @ 2024-12-17 10:16 UTC (permalink / raw
  To: gentoo-user

Le 17/12/24 à 11:02, Jorge Almeida a tapoté :
> On Tue, 17 Dec 2024 at 08:18, netfab <netbox253@netc.eu> wrote:
> 
> > Le 16/12/24 à 18:11, Jorge Almeida a tapoté :
> > > Any distcc user in the same boat?
> >
> > Yes. How many CPU cores do you have ?
> >
> 
> 8 + 6


Here is my assumption : in man distccd we can read :
> -j, --jobs JOBS
>   Sets  a  limit on the number of jobs that can be accepted
>   at any time.  By default this is set to *two greater than
>   the number of CPUs on the machine*, to allow for some processes
>   being blocked on network IO.  (Daemon mode only.)

I think that the distccd daemon spawns one thread for each potential
accepted job. In your case, 8+6+2 = 16

In my case, I have 4 cores, and 6 distccd waiting threads.

Do you have 16 threads below the main distccd process ?




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] distccd offspring
  2024-12-17 10:16     ` netfab
@ 2024-12-17 10:46       ` Jorge Almeida
  0 siblings, 0 replies; 8+ messages in thread
From: Jorge Almeida @ 2024-12-17 10:46 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1384 bytes --]

On Tue, 17 Dec 2024 at 10:17, netfab <netbox253@netc.eu> wrote:

> Le 17/12/24 à 11:02, Jorge Almeida a tapoté :
> > On Tue, 17 Dec 2024 at 08:18, netfab <netbox253@netc.eu> wrote:
> >
> > > Le 16/12/24 à 18:11, Jorge Almeida a tapoté :
> > > > Any distcc user in the same boat?
> > >
> > > Yes. How many CPU cores do you have ?
> > >
> >
> > 8 + 6
>
>
> Here is my assumption : in man distccd we can read :
> > -j, --jobs JOBS
> >   Sets  a  limit on the number of jobs that can be accepted
> >   at any time.  By default this is set to *two greater than
> >   the number of CPUs on the machine*, to allow for some processes
> >   being blocked on network IO.  (Daemon mode only.)
>
> I think that the distccd daemon spawns one thread for each potential
> accepted job. In your case, 8+6+2 = 16
>
> In my case, I have 4 cores, and 6 distccd waiting threads.
>
> Do you have 16 threads below the main distccd process ?
>

Actually, I have 18 children of the main  distccd process. But this seems
to be consistent with the part of the manual you cited: 2*8 + 2 (the "8+6"
I mentioned before was the number of cores of both client and server, to go
into MAKEOPTS---as per the Wiki, I think)

This explains the number of children. Why they exist while being idle is a
matter of upstream decision, and I'll live with it.

thanks

Jorge Almeida

[-- Attachment #2: Type: text/html, Size: 1994 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-12-17 10:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-16 17:11 [gentoo-user] distccd offspring Jorge Almeida
2024-12-17  8:18 ` netfab
2024-12-17 10:02   ` Jorge Almeida
2024-12-17 10:16     ` netfab
2024-12-17 10:46       ` Jorge Almeida
2024-12-17  8:26 ` William Kenworthy
2024-12-17  8:34   ` Alexandru N. Barloiu
2024-12-17 10:08     ` Jorge Almeida

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox