1 Reply Latest reply on Jul 17, 2003 11:09 PM by Jon Barnett

    Numerous threads

    Noel Rocher Apprentice

      I'm running JBoss3.2.1-tomcat on a Linux machine (mandrake 9.1) with 2 CPUs.

      It seems that a lot of threads are running and my linux administrator think that it's not normal.

      Can anyone tell me if it is the case. His observation is done by :

      lsof -ni | grep java | wc -l


        • 1. Re: Numerous threads
          Jon Barnett Master

          There are a lot of independent processes running in JBoss. Remember The JBoss microkernel has a servlet container that runs multiple threads (1 per active listener instance - so say you had a minimum of 10 HTTP listeners and a max of 200, each would have its own thread), container threads, MBean threads, connection threads, and so on. That doesn't mean that all of them are active - when GC is complete and JBoss is in a quiescent state (no accesses to JBoss), you shouldn't see much more than 0.7 percent activity or less (depending on how fast your CPUs are). But the processes are necessary in case accesses to EJBs and so on do come in. I think a bare bones JBoss install with no applications has about 50 threads (or Linux processes). I'd normally check with a "pstree". It is the nature of Java on Linux - each Java thread is usually marked as a native Linux process due to the Linux process/thread model.