java - Consequence of too many unused blocked threads -


i want clear concept on unused threads effect.what overall effect of many unused blocked threads in thread pool. suppose have thread pool having 100 threads in 50 unused , waiting request process arrival rate of request 2 slow due 50 threads in block state.


what system resources effected?


does cpu resource effected?


does memory resource effected?


what effect of scenario on thread management overhead? i.e. thread management overhead involves in 50 running thread or of 100 threads?

what system resources effected?

memory. each native thread requires stack. it's not , 50 threads wouldn't care.

a thread blocked other reason "waiting job" may bigger problem may hold other resources, including e.g., file descriptors, limited.

in case of server running many many requests waiting external resource (file or db access), may problem.

additionally, there threadlocals, may hold data may or may not needed later. can lead memory leaks here, completely unrelated number of (idle) threads.

does cpu resource effected?

why should they? in java, it's object sitting somewhere in collection of idle threads.

does memory resource effected?

see above.


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Website Login Issue developed in magento -

Can the constants be defined inside a model file of a framework in PHP? -