cbbrowne at ca.afilias.info cbbrowne
Sat Oct 23 05:16:16 PDT 2004
> On Friday October 22 2004 8:16, Jan Wieck wrote:
>> On 10/22/2004 9:58 PM, Ed L. wrote:
>> > Running slon 1.0.5 with 7.3.4 on Linux 2.4.20-28.7smp, I see 8 slon
>> > processes appear when I start one slon.  On Linux 2.4.20-30.9 I only
>> > ever saw one slon process.
>>
>> Slon is multithreaded. There are threads:
>>
>>      main
>>      local-listen
>>      cleanup
>>      remote-listen (1 per remote node)
>>      remote-worker (1 per remote node)
>>      remote helper (1 per remote provider)
>>
>>  From that I would conclude you have a 3 node setup and this was on a
>> subscriber node. There are of course other setups that could lead to 8
>> threads.
>>
>> Anyhow, the difference is probably that you see the LW processes
>> implementing threads in one case and not the other.
>
> No, this is a 2-node setup, and this is the first (and only) slon started
> up
> anywhere, and it is on the master node.  The 8 pids are sequential.
> Interesting, my linux laptop shows no threads (2.4.20-30.9), while this
> linux box shows them all as processes.

I'm not at all surprised to see different Linux kernels leading to the
threads being counted differently; there are BIG changes between 2.4 and
2.6 in terms of handling of threads.

Further, it is no surprise to see threads being treated as if they were
sort-of processes, because that's the new way kernel-supported threads are
handled on Linux.  The kernel has to perceive them in order to switch
between them, so they need process table entries.

If you have one subscriber node, then it makes sense for there to be 6
threads that look like processes in addition to the "honest-to-goodness
process".  That leaves a thread unaccounted for, but perhaps Linux
PThreads has some sort of "root" thread that all the others have to
inherit from.

In any case, what you are seeing, namely a whole bunch of entries in the
process table, is not anomalous.



More information about the Slony1-general mailing list