We noticed a peculiar behavior with Java/Web Logic on one of our multi-processor servers, yesterday, so wanted to get your thoughts on it.
For some reason, Web Logic/Java use only one processor of the available two processors. When we ran some heavy load, I could see the CPU on one reaching almost 100% and the other processor is completely idle. Does it matter if this is a virtual machine (..but this is not a virtual machine)
Interesting thing is that any other OS-activities indicate processor activity on both.
Regards, _UB
In common scenarios, WebLogic (and thus Java) should be able to use all the available processors in the server where it's running. WebLogic has a pool of request processing threads and when requests are arriving concurrently, they are handled concurrently. If the server has multiple processors those should be then used by Java threads.
If the Java web application running in WebLogic is using SingleThreadModel in its servlet(s), no two threads can execute the servlet concurrently and thus you could see only one CPU at work there. This model is not recommended and I guess not much used anyway.
I've heard some people complaining that they cannot get their Java app servers to use more than 1 CPU when running a virtual machine OS, like VMWare, even when they have dedicated more than one CPU for the VM. I have no idea what was the reason for this strange behavior then.
Maybe you should try to hit some very simple JSP page with concurrent requests and see if more than 1 CPU is being used. If this works, the problem is in your application.