2 Replies Latest reply on May 26, 2006 12:13 AM by clebert.suconic

    High CPU Utilization While JBoss Idle

      Hi, we are observing high CPU utilization rates on JBoss 4.0.1sp1 even while the server is IDLE and doing nothing. The rates we see are at %40.

      We do have couple background processes, but they wake up every 30 seconds, and finish very quickly. An output from hprof display the performance killer is PlainSocketImpl.socketAccept call. Now, we use OSCache but have distributed caching disabled. The output is below.

      CPU SAMPLES BEGIN (total = 211354) Fri Jan 21 12:56:38 2005
      rank self accum count trace method
      1 74.04% 74.04% 156483 479 java.net.PlainSocketImpl.socketAccept
      2 16.46% 90.50% 34792 1363 java.net.SocketInputStream.socketRead0
      3 7.10% 97.60% 14997 1182 java.lang.System.currentTimeMillis

      My question is, if you see high CPU utilization on listener type threads with low priority, is it possible that threads with higher priroty can still get their CPU share and the overall system can still perform acceptably? Would socketAccept() be one of those methods/classes? If not, which JBoss subsystem could be using this call?

      We use JMS/queuesMDBs, have Hibernate 3.0 with OSCache.

      Regards,

        • 1. Re: High CPU Utilization While JBoss Idle

          We are investigating a similar issue with different setup (Apache2/mod_jk 1.2.15, JBoss 3.2.7, jdk 1.5.0_06)

          During testing with jmeter our server is busy but we don't get the app throughput we expect. We have a 4 CPU box and top shows all of them 90+ % busy.

          HPROF reports what we perceive to be excessive time spent in socket reading, with cpu=samples:

          rank self accum count trace method
          1 87.00% 87.00% 29123554 302080 java.net.SocketInputStream.socketRead0
          2 7.24% 94.24% 2424866 300748 java.net.PlainSocketImpl.socketAccept
          3 1.49% 95.73% 497744 301511 java.net.SocketInputStream.socketRead0
          4 0.90% 96.63% 301177 302061 java.net.PlainSocketImpl.socketAccept

          cpu=samples is not conclusive as far as the net CPU time spent goes, but with cpu=times we still see ~ 50 time spent on these calls.

          Our server is not running at capacity, bot worker threads and connetion pool is underutilized.

          Has anyone made similar observations?

          Thomas

          • 2. Re: High CPU Utilization While JBoss Idle
            clebert.suconic

            a thread dump is going to be more useful in your case (idle).

            If this is true (the sockets consuming time), something must be wrong in your OS configuration, as a socket accept or socket read shouldn't take any CPU time at al.

            Use some OS tools to figure out what's going on in your OS.