[TIL-4] Little’s law, Tuning the thread pool size

Thread Pool

Little’s law

In queueing theory, a discipline within the mathematical theory of probability, Little’s result, theorem, lemma, law, or formula is a theorem by John Little which states that the long-term average number L of customers in a stationary system is equal to the long-term average effective arrival rate λ multiplied by the average time W that a customer spends in the system

L = λW

The average number of threads in a system (Threads) is equal to the average number of request arrival rate (Request per sec), multiplied by the average response time (Response time).

Threads =Request per sec x Response time

Example

λ =10 rps, W = 2 seconds

L = 10 * 2

L = 20

References

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store