Why do I see lots of java processes when I start JBoss on Linux?
This is the old threading model of Linux. Each thread on Linux is a process and ps, pstree or top doesn't understand this. The clue is that when you run top, they all have the same
memory allocation.
NPTL
Linux 2.6 kernels and Redhat9+ use a new threading model called NPTL. This behaves
the same way as other operating systems. You only see one process.
Redhat9 / Enterprise Linux AS 3 (/ others?)
The backport of NPTL to Redhat9 is buggy. If you are using Redhat9, disable NPTL using:
export LD_ASSUME_KERNEL=<kernel-version>
The appropriate values for <kernel-version> can be found in the release notes of your distribution.
For instance, for EL3, search for "NPTL" in this page http://www.redhat.com/docs/manuals/enterprise/RHEL-3-Manual/release-notes/as-x86/. Additional information on what the LD_ASSUME_KERNEL setting does is described in this page: http://people.redhat.com/drepper/assumekernel.html.
JBoss recommends upgrading to the 2.6 kernel and avoiding 2.4 kernels with backports of NPTL as they have proven to be unstable in production Java-based systems.
Thread dump
To get a thread dump of each thread, see StackTrace
Note: According to this excellent serie of articles on NPTL http://www.linuxdevices.com/articles/AT6753699732.html, other Linux distributions also have issues with their backport on 2.4 kernels. Check your distribution release notes for details.
Referenced by:
Comments