R11B multiple processes starting

Michael McDaniel erlang@REDACTED
Sat Jul 8 08:55:08 CEST 2006


Thank you for that explanation.  I do see

$ ls /lib/*pthread*
/lib/libpthread.so.0

$ ls /usr/lib/*pthread*
/usr/lib/libpthread.a  /usr/lib/libpthread_nonshared.a  /usr/lib/libpthread.so

on the original machine in which 'ps' shows multiple OS processes 
(it has a 2.4 kernel with Pentium 4 processor)


New information is that on another machine (2.6 kernel with Celeron processor)
(again, R11B-0 compiled *without* --enable-smp-support)

$ uname -a 
Linux cougora 2.6.4-52-default #1 Wed Apr 7 02:08:30 UTC 2004 i686 i686 i386 GNU/Linux

$ ls /lib/*pthread*
/lib/libpthread.so.0

$ ls /usr/lib/*pthread*
/usr/lib/libgcrypt-pthread.a   /usr/lib/libgcrypt-pthread.so.7      /usr/lib/libpthread_nonshared.a
/usr/lib/libgcrypt-pthread.la  /usr/lib/libgcrypt-pthread.so.7.3.1  /usr/lib/libpthread.so
/usr/lib/libgcrypt-pthread.so  /usr/lib/libpthread.a

and, starting the same application in the same manner, it only shows
a single process.

So, a new question is why might those machines be different?



~~Michael


On Fri, Jul 07, 2006 at 06:36:21PM -0700, Ryan Rawson wrote:
> All modern Linux distros have pthread libraries in /lib now if not
> /usr/lib that are posix threads that are native.  Linux models those
> threads as light weight processes - thus appear as multiple entries in
> the process table.
> 
> R11B-0 included the SMP improvements, and also I think threading
> improvements for lower level driver things.  Blocking IO and the like
> I think.  Someone else can give a detailed view on that, but I believe
> that is the high level.
> 
> -ryan
> 
> On 7/7/06, Michael McDaniel <erlangX@REDACTED> wrote:
> >SHORT VERSION:
> >
> >After installing R11B-0, my application starts multiple OS processes
> >where before it only started a single OS process.
> >-----------
> >
> >
> >LONG VERSION:
> >
> >I have just installed R11B-0 on one of my servers (formerly at R10B-8).
> >
> >$ uname -a
> >Linux xq02 2.4.21-99-default #1 Wed Sep 24 13:30:51 UTC 2003 i686 i686 
> >i386 GNU/Linux
> >
> >
> >An application that I start thusly:
> >
> >$ /bin/su mmcdanie -c "cd /home/erl ; /usr/local/bin/erl -sname   \
> >   ${HOST}_block -home /home/erl -setcookie fake -heart -detached \
> >   -config /home/erl/sys.config  -s block start"
> >
> >is still working fine.  However, now when I start it, three OS
> >processes are running rather than as with R10B-8 where only a
> >single OS process would run when application started.
> >
> >$ ps xuaw | egrep block | egrep -v grep
> >mmcdanie 14771  0.1  1.2 12964 6440 pts/1    S    15:59   0:00 
> >/usr/local/lib/erlang/erts-5.5/bin/beam -- -root /usr/local/lib/erlang 
> >-progname erl -- -home /home/mmcdanie -sname xq02_block -home /home/erl 
> >-setcookie fake -heart -noshell -noinput -config /home/erl/sys.config -s 
> >block start
> >mmcdanie 14774  0.0  1.2 12964 6440 pts/1    S    15:59   0:00 
> >/usr/local/lib/erlang/erts-5.5/bin/beam -- -root /usr/local/lib/erlang 
> >-progname erl -- -home /home/mmcdanie -sname xq02_block -home /home/erl 
> >-setcookie fake -heart -noshell -noinput -config /home/erl/sys.config -s 
> >block start
> >mmcdanie 14775  0.0  1.2 12964 6440 pts/1    S    15:59   0:00 
> >/usr/local/lib/erlang/erts-5.5/bin/beam -- -root /usr/local/lib/erlang 
> >-progname erl -- -home /home/mmcdanie -sname xq02_block -home /home/erl 
> >-setcookie fake -heart -noshell -noinput -config /home/erl/sys.config -s 
> >block start
> >
> >(apologies for line wraps)
> >
> >I am not understanding why multiple OS processes are running now when
> >I start the application.  I have changed nothing on the machine other
> >than installing the new R11B-0  (and the way I did that was to move
> >the old /usr/local/lib/erlang directory before doing the install, so
> >the new /usr/local/lib/erlang is completely fresh, not an
> >install-over-old).
> >
> >As I mention above, the application is working fine.
> >
> >The contents of /home/erl/sys.config are:
> >[{mnesia, [{dir, "/home/erl/Mnesia.block"}  ,
> >%%           {debug, trace}                   ,
> >           {schema_location, disc}]}].
> >
> >and mnesia is getting updated just fine.
> >
> >I compiled *without* --enable-smp-support since the native POSIX threads
> >library is not installed (it is not an SMP machine).
> >
> >
> >Does anyone have any tips on how to figure out why multiple OS processes
> >are now starting?  Or perhaps already knows the answer to the question?
> >
> >thanks,
> >
> >~Michael
> >
> >
> >
> >

-- 
Michael McDaniel
Portland, Oregon, USA
http://autosys.us
+1 503 283 5284



More information about the erlang-questions mailing list