Sunday 15 September 2013

performance - Java threads: interpreting thread states of a running JVM -


The Java thread is always one of the following ten states:

  new: just start In the process of getting started, i.e. NEW_TRANS: analog transition state (not included, used for completeness) IN_NATIVE: Initial code running IN_NATIVE_TRANS: compatible transit state. IN_VM: VM is running IN_VM_TRANS: compatible transit state. IN_JAVA: Running in Java or Stub code. IN_JAVA_TRANS: Analog transition state (not included, used for completeness) was blocked: Blocked in VM Blocked / Grays: compatible transition status.  

Unused state ( uninitiated) ) has been omitted from the list.

While the definitions of states are given above I look for "rule-of-thumb" for the interpretation of the thread set for the ongoing accessory, and more specifically:

  • 100 threads: 35 blocked 113 threads: 35 blocked , 77 IN_NATIVE , 1 IN_VM , 65 IN_NATIVE
  • / code>
  • 52 thread: 38 blocked , 1 IN_JAVA , 6 IN_NATIVE , 7 IN_VM
  • 120 threads: 39 blocked , 1 IN_JAVA < / Code>, 80 IN_NATIVE < / Code>
  • 94 sources: 34 blocked , 59 IN_NATIVE , 1 IN_NATIVE_TRANS
  • Statistics for each thread of five - What can be estimated in relation to the overall JVM state? "In this scenario JWM looks useless waiting for requests", "Machine busy processing request", etc.

    The output of this level does not provide enough information to make such statements.

    For example, consider the blocked state: there are many things that can block the thread. Two of them are waiting for the data to come from the customer, and are waiting for the data to return from the database. In the first case, your application is useless, in the second it is overloaded.

    EDIT: Not seeing output from JSTAC, I think these two conditions can also be displayed as IN_NATIVE, however, in one comment it has been written: You do not Know what they are doing, so you can not make any statement about the entire application.


    No comments:

    Post a Comment