here is an 8 cpu server runs a jboss-4.0.5.GA instance, just deployed a web application. whenever how busy does the jboss servers, there is only one cpu usage up and down. even if it till to 100%, the others cpu still keeps low usage.
How and why?
Is it jboss-4.0.5.GA does not support multiple cpu? or I do not configure it correctly?
Jean-Frederic Clere say:
jboss-4.0.5.GA supports multiple cpu because the JVM supports multiple cpu. Which version of JAVA are you using? or which OS?
May be the application is looping or locking a single resource and all JAVA threads are waiting from one. A thread dump may help.
================================================================================Kyle Zhang reply Jean-Frederic Clere:
much os are AIX Version 5.3, and the java version is
For the thread dump see http://community.jboss.org/wiki/StackTrace
You use a quite old JVM, ask IBM if they had problems with that version and/or upgrade to a newer version.
You should have posted this question under Discussions, not under Articles. Perhaps some kind administrator will move it.
UNIX OSes, such as Solaris and AIX, tend to automatically affinitize processes and thus prevent then from using all of the CPUs. There should be somthing in the AIX manuals regarding affinity and how you can adjust it for your apps.
And this has nothing whatsoever to do with JBoss AS - no Java applications have any control over affinitization because there is no API to control it. In addition, the JVM has no code to handle affinitization (well, the Intel or AMD engineers might have contributed some code to maintain thread affinity to the more recent JDK 6 releases).