Saturday, November 15, 2014

Can you tell what is the right value for thread peak and how you monitor thread contention?

In my opinion, there is no such thing as "right value for thread peak". It sounds a kind of "what is the right value of cars". 

Threads perform some work and use some resources for that purpose. While a thread waits for a resource being used by another thread, there is a contention for that resource. Waiting is one of thread's states, which depends on an environment in which threads are executed, i.e. POSIX threads / some virtual machine threads which don't have to be aligned with OS threads etc. 

To monitor contention you can check number of threads in specific states / time spent in specific states... but still, you need to look at the numbers within some context (e.g. CPU utilization, number of requests waiting for processing etc.)

No comments:

Post a Comment