A Java thread is always in one of the following states:
NEW: Just starting up, ie, in process of being initialized. NEW_TRANS: Corresponding transition state (not used, included for completness). IN_NATIVE: Running in native code. IN_NATIVE_TRANS: Corresponding transition state. IN_VM: Running in VM. IN_VM_TRANS: Corresponding transition state. IN_JAVA: Running in Java or in stub code. IN_JAVA_TRANS: Corresponding transition state (not used, included for completness). BLOCKED: Blocked in vm. BLOCKED_TRANS: Corresponding transition state.
Unused state ( UNINITIALIZED ) was omitted from the list.
While the state definitions are given above, Iโm looking for a โthumb ruleโ to interpret a given stream state setting for a running application server. And more specifically:
Assume that a real-time application server with the following flow statistics (obtained using jstack ) at different points in time:
- 100 streams: 35
BLOCKED , 65 IN_NATIVE - 113 streams: 35
BLOCKED , 77 IN_NATIVE , 1 IN_VM - 52 streams: 38
BLOCKED , 1 IN_JAVA , 6 IN_NATIVE , 7 IN_VM - 120 streams: 39
BLOCKED , 1 IN_JAVA , 80 IN_NATIVE - 94 streams: 34
BLOCKED , 59 IN_NATIVE , 1 IN_NATIVE_TRANS
For each stream of five statistics โ what can be done about the overall state of the JVM? Ie "in this JVM scenario, it looks idle waiting for requests", "the machine is busy processing requests", etc.
knorv source share