Results 1 to 3 of 3

Thread: simple Java program spawns 11 threads

  1. #1
    sudarshan_k NNTP User

    Default simple Java program spawns 11 threads

    i am running a simple java application on SUSE linux version
    Linux tudev09 2.6.5-7.315-smp #1 SMP Wed Nov 26 13:03:18 UTC 2008 x86_64 x86_64 x86_64 GNU/Linux

    It spawns 12 processes. There is only one program running as we can see from the output below, but there are 12 processes running for the same program which is slowing the system terribly.

    20788 pts/12 0 3179 52 547215 136817 - 11532 - - - /usr/local/java/ibm-java2-i386-50/bin/java
    20789 pts/12 0 16 52 547215 136817 - 11532 - - - /usr/local/java/ibm-java2-i386-50/bin/java
    20790 pts/12 0 1 52 547215 136817 - 11532 - - - /usr/local/java/ibm-java2-i386-50/bin/java
    20791 pts/12 0 153 52 547215 136817 - 11532 - - - /usr/local/java/ibm-java2-i386-50/bin/java
    20792 pts/12 0 1 52 547215 136817 - 11532 - - - /usr/local/java/ibm-java2-i386-50/bin/java
    20797 pts/12 0 3 52 547215 136817 - 11532 - - - /usr/local/java/ibm-java2-i386-50/bin/java
    20798 pts/12 0 5 52 547215 136817 - 11532 - - - /usr/local/java/ibm-java2-i386-50/bin/java
    20799 pts/12 0 0 52 547215 136817 - 11532 - - - /usr/local/java/ibm-java2-i386-50/bin/java
    20800 pts/12 0 3 52 547215 136817 - 11532 - - - /usr/local/java/ibm-java2-i386-50/bin/java
    20801 pts/12 0 5 52 547215 136817 - 11532 - - - /usr/local/java/ibm-java2-i386-50/bin/java
    20802 pts/12 0 2 52 547215 136817 - 11532 - - - /usr/local/java/ibm-java2-i386-50/bin/java
    20901 pts/24 0 279 98 3357 864 - 756 - - - ps -Hmw

    Any help as to why it spawns the processes will be appreciated.

    Sid.

  2. #2
    Join Date
    Jun 2008
    Location
    Frisco, TX
    Posts
    1,233

    Default Re: simple Java program spawns 11 threads


    Java threads... what can you say?

    Try ps -eLf
    (notice the capital L)

    Examine that output and see if it makes any more sense.
    Just guessing...



  3. #3
    Join Date
    Sep 2008
    Location
    Dubai
    Posts
    1,770

    Default Re: simple Java program spawns 11 threads

    (1) You need to post more details about the program you are running.
    (2) You are running IBM's Java VM. I don't know why. Some of the older Java VMs use OS level processes to implement each Java thread. Even simplest Java programs will have more than one thread.
    openSUSE 12.3 (x86_64) with Kernel 3.7.10-1.16-desktop and KDE 4.11.2 on MacBook Pro
    Latest MS Windows version used: Win95

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •