Hi All,
How does JVM handle hyper threading? I am using Tomcat as the servlet
engine. And I have multiple servlets (and the threads from the servlets)
making JNI calls and when hyperthreading is enabled, I see some strange
deadlock issues. JNI calls just hang, making the other threads to
continously wait for the monitor (lock). This is making my entire
application to hang.
(Since JNI calls hang, I suspect it could be some deadlock issues in the
native code. But still wanted to ask if there are known issues with JVM
with respect to hyperthreading)
Anyone faced similar issues?
No issues when we disable hyperthreading.
Regards,
Firdousi Farozan
Denis - 07 Oct 2005 04:39 GMT
As far as I know, Sun's JVM is fully compatible with hyperthreading, in
the sence that it must run fine on an HT computer. There is a chance
that your problem is a bug in JVM, but this is unlikely.
Most likely, the problem is somewhere in your native code. Running an
applicaiton on HT machine greatly increases amount of locks and thread
competitions, so I guess there is a bug in your code (lack of
synchronization somewhere, maybe in native code) that does not
reproduce on traditional single-cpu PC, but strikes on an HT machine.
You can also try to run your app on a machine with four virtual CPUs
(2CPU, both with HT enabled).
We debug such problems by adding excessive amount of logging (printig
thread IDs everywhere), and then spending hours looking at logs and the
source code ;-)
Denis
-------------------
http://www.excelsior-usa.com/jet.html
Accelerate and protect your Java applications with Excelsior JET