Is there anything special that needs to be done in order to get the JVM to work efficiently with multiple CPUs on a Windows NT (4.0) machine?

Niyi Gbodimowo

[We are currently using the standard VM that comes with the Java 2 JDK. When we run the VM on a multi-processor (e.g., 2 cpus), Windows NT-based, computer, we notice that one CPU hovers around 20% utlization, while the other is at 100%. We believe that one of the CPUs is being used by the Windows kernal and the other is for everything else - in our case the JVM and a WebLogic Application Server.]

Strange problem. I know of many people includng myself that run the standard Java2 JVM on Windows NT/2000 with multiple processors with no such problem.

Since the Win32 JVM uses native threads by default and I know of no way that green threads may be accidentally used, the only advice I can give is to check the CPU affinity of your JVM process. You can check this by right clicking on the process in Task Manager and selecting "Set Affinity..."

If (as I guess) you have already explored this option, then download the latest JVM 1.3 with the Hotspot server implementation. This JVM is targeted towards large-scale server deployments and will do a better job at mapping your native threads to multiple processors.