4 Replies Latest reply on May 28, 2004 1:18 PM by boubou2

    many java processes when running jboss

    boubou2

      I have installed a linux machine with a new kernel (2.4.26).
      I have installed j2sdk1.4.2_04 and jboss 3.2.3.
      when I run jboss i can see many differents java processes! (when I do a ps -ax |grep java I can see about 51 java processes!)
      why?
      Normaly there should be only one java process.

      Thanks

        • 1. Re: many java processes when running jboss
          hbaxmann

          No. Unix, and this way Linux, is not a multi-threaded OS. It is a multi-process OS. There are many many different implementations of threading libraries available, which provide a faster context switching than processes and process pooling. Two of them are for example pThreads and lThreads. Nearly every commercial Unix has its own we-do-like-we-have-threads implementation hidden in behind libc.

          So what you see are, very roughly spoken, the Java Threads.

          HTH

          bax

          • 2. Re: many java processes when running jboss
            boubou2

            Ok, Thanks for your answer.

            But there is still something I don't understand. How come, why when I use the default kernel and I start jboss and I do some ps I have only one java line. But with the new compiled kernel I still have 51 lines (when doing a ps -ax |grep java) when jboss has completly started!

            • 3. Re: many java processes when running jboss
              hbaxmann

              Because of 1.) the number of Java threads that are simultaneos working, 2.) the actual OS-threading model of the kernel 3.) if you are using green or native threads (in older JREs)

              As I said: very roughly.

              You should provide more detailed information, maybe your OS list is of more help.

              bax

              • 4. Re: many java processes when running jboss
                boubou2

                Thanks again for your help.
                I have installed a Fedora Core 1 and I have recompiled a new monolitic linux kernel (from kernel.org).
                I should have enough information now to tune my server.