4 Replies Latest reply on Jul 22, 2003 12:37 PM by xconde

    CPU Usage

    amatthew

      We have two instances of JBoss 3.0.7 running on a multiprocessor (512 MHz processors) Unix machine. It always takes up two processors even when the server is not being accessed by clients.

      What could be the reason for tying up CPUs?

        • 1. Re: CPU Usage
          haraldgliebe

          Have you tried to produce a thread dump (kill -QUIT ) to see which threads are causing the load ?

          Regards,
          Harald

          • 2. Re: CPU Usage
            jonlee

            Java programs have no control over which CPU their threads execute. Most likely your JVM will adapt to spread threads over available CPUs - this is the most responsive service configuration as paralleling processes is better, performance-wise than time-slicing them. You probably don't have control in the JVM to restrict the JVM to a single processor - I can't think of any switches off-hand.

            Now, JBoss needs to have threads to service things like multiple web requests at once, provide for your connection pools, keep alive the pooled EJBs and so on, even if nothing is actually doing anything useful to the business application (executing business logic). You shouldn't see much CPU allocated to the threads though - the quiescent level should consume little CPU. About 1 ~ 2% total on my single processor PII 500MHz Linux boxen for 77 threads (processes).

            Hope that answers your question.

            • 3. Re: CPU Usage
              jonlee

              If you are asking the question because there is excessive load, then you should determine if there are any beans or other components that are processing. The simplest way is to undeploy your applications and then deploy them one at a time, monitoring load to determine which one has the rampant component process.

              • 4. Re: CPU Usage
                xconde

                I'm experiencing the same problem, and just to provide some feedback, that didn't do any good. The java process nicely ignored my sigquit. :-)

                I believe deploying each bean separatedly will be more helpful.

                Regards,
                Thiago.