i'm doing performance tests on app , @ point app stops responding. checking thread's log @ http://localhost:7771/threads, i've found following data:
"org.eclipse.jetty.util.thread.queuedthreadpool.dw.utilization" : { "value" : 1.0 }, does mean application overloaded?
also there interesting numbers threads:
"jvm.threads.blocked.count" : { "value" : 0 }, "jvm.threads.count" : { "value" : 152 }, "jvm.threads.daemon.count" : { "value" : 12 }, "jvm.threads.deadlock.count" : { "value" : 0 }, "jvm.threads.deadlocks" : { "value" : [ ] }, "jvm.threads.new.count" : { "value" : 0. }, "jvm.threads.runnable.count" : { "value" : 11 }, "jvm.threads.terminated.count" : { "value" : 0 }, "jvm.threads.timed_waiting.count" : { "value" : 9 }, "jvm.threads.waiting.count" : { "value" : 132 } the number of waiting threads same number of total threads.
so "metric" should use determine if there blocking threads?
java.lang.management.threadmxbean interface responsible collecting metrics threads , interface managing java threads in jvm.
dropwizard wrapper on it, , threadstatesgaugeset class provides way return counts of threads in different states using api exposed threadmxbean.
since in case, jvm.threads.blocked.count 0, there no thread blocked, however, have high value of jvm.threads.waiting.count metrics, per java doc caused due object.wait, thread.join or locksupport.park methods. below link java api documentation, can provide detail insight on it. of jvm threads finalize, reference handler etc. in waiting state. so, above waiting count application + jvm threads.
https://docs.oracle.com/javase/7/docs/api/java/lang/thread.state.html
in above scenario, can see there 11 runnable threads, means try os configuration , how os resource these running thread taking. long running threads or not? if not long running, next metrics should reflect (by default in dropwizard emitted after every 1 min, can configured have value based on application need). analysis of thread dump helpful.
Comments
Post a Comment