Java and Hyperthreading processors - Java

This is a discussion on Java and Hyperthreading processors - Java ; 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 ...

+ Reply to Thread
Results 1 to 2 of 2

Java and Hyperthreading processors

  1. Default Java and Hyperthreading processors

    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

  2. Default Re: Java and Hyperthreading processors

    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


+ Reply to Thread

Similar Threads

  1. Problem with Java and Xeon Processors
    By Application Development in forum Java
    Replies: 5
    Last Post: 09-05-2007, 05:44 AM
  2. looking for performance statistics (native JAVA processors)
    By Application Development in forum Java
    Replies: 1
    Last Post: 03-05-2006, 03:04 PM
  3. Java and hyperthreading
    By Application Development in forum Java-Games
    Replies: 1
    Last Post: 07-29-2003, 12:37 AM
  4. Java and hyperthreading
    By Application Development in forum Java
    Replies: 1
    Last Post: 07-29-2003, 12:37 AM
  5. Hyperthreading in Java
    By Application Development in forum Java
    Replies: 2
    Last Post: 07-27-2003, 11:38 AM