W3C home > Mailing lists > Public > www-jigsaw@w3.org > January to February 2003

Re: Number of java instances?

From: Yves Lafon <ylafon@w3.org>
Date: Thu, 16 Jan 2003 11:30:27 +0100 (MET)
To: Frank Kurzawa <frank@kurzawa.com>
cc: Roger Marquis <marquis@roble.com>, www-jigsaw@w3.org
Message-ID: <Pine.GSO.4.51.0301161118050.12887@tarantula.inria.fr>

On Wed, 15 Jan 2003, Frank Kurzawa wrote:

>
>
> I believe in Linux, each THREAD gets a separate Process ID, even though
> it is not actually a separate process. So if, for instance, you do a ps
> command in Linux, you will see a separate listing for each thread. OTOH,
> in Solaris, where each thread DOES NOT get a separate Process ID, a ps
> command will only show a single entry.

That's right, in Linux, each thread is a separate process, and there is no
notion of a global process for those threads. This leads to an interesting
problem:
If you want to use the native code to change the UID/GID or chroot the
server, (ie: to start the server as root to bind port 80 and change its
uid/gid to nobody for obvious reasons), on linux it will happen... on one
thread instead of all threads of the global process.
It seems that the recent development in the 2.5 kernel series and the new
libthreads developped are fixing this (to say the least) shortcoming.

Also to clarify the process issue on linux, most of the memory used by
those process are shared amongst them, so the results of ps are not as
alarming as it may sound.

> At 6:22 PM -0800 1/15/03, Roger Marquis wrote:
> >Has anyone noticed that jigsaw.sh starts a large number of java
> >processes under Linux (RH 7.3, x86)?  I'm seeing 80+ java processes like
> >this one:
> >
> >	...
> >	root 7547 0.0 8.2 244268 15816 ? S Jan14 0:00 java
> >	org.w3c.jigsaw.Main -root /usr/local/jigsaw/Jigsaw/
> >	...
> >
> >whereas under Solaris (SPARC 5.8) there's just a single process:
> >
> >	root 19372 14.6 1.34930418104 pts/7 S 18:17:10 0:03 java
> >	org.w3c.jigsaw.Main -root /usr/local/jigsaw_2.2.2/Jigsaw

Note that "top" will give you the the number of threads used on solaris
(the THR entry)

-- 
Yves Lafon - W3C
"Baroula que barouleras, au tiéu toujou t'entourneras."
Received on Thursday, 16 January 2003 05:30:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:36 GMT