-
1. Re: JBoss 5.1 cpu maxing and process priority
peterj May 28, 2010 11:23 AM (in response to moontz)Brian, welcome to the forum!
These questions have nothing to do with JBoss AS, rather they are questions about the JVM and the OS. There is nothing in the Java SE API that allows a Java application to assign affinity (lock a thread or process to a given CPU/core).Therefore there is nothing in JBoss AS that you can set to change this behavior.
If you are using the Sun JVM (you never said), there is nothing in the Sun JVM that assigns affinity. This means that by default a Java application will use all available CPUs. I have run Java applications that have used up to 32 CPUs.
I do not know what affinity settings are available in SUSE or how they might be set by default. I recall some discussions a while ago on Solaris and that it managed affinity by default. It also did some throttling so that one process (such as jmap) could not use up the full CPU. I don't think that SUSE has such code.
And then consider the difference in what jmap does versus JBoss AS - jmap, once it loads the heap dump into memory, is purely memory bound and thus will use it CPU time allotment each time it gets the CPU. Threads within JBoss AS, on the other hand, constantly request external resources (wait on HTTP, wait on database, etc) and thus don't use up their allotment. In such a scheme, jmap will get the lions share of the CPU. You could bump the priority on JBoss AS and run jmap (and other things) using 'nice'. Or better yet, don't run jmap on that system - copy the heap dump to another system and analyze it there.
-
2. Re: JBoss 5.1 cpu maxing and process priority
moontz May 28, 2010 1:58 PM (in response to peterj)Thanks Peter. This helps. Much appreciated!
Brian