Little's Law, as a part of Queuing theory, which was introduced to me by Wilson Mar about 2 years ago. We can make use of it to help performance test planning and modeling.
I also would like to usually calculate the arrival rate of system :
After calculating the arrival rate λ , I will compare arrival rate λ with Throughput X to see if the system can catch up the incoming load, if not, then start tuning it!
One example:
Some Update after several years I met with such an elegant equation, following results are what i have worked with my perf team to prove the Little's law:
Little's Law for Finding Response Time:
MeanResponseTime(AVG) = MeanNumberInSystem(VUs) / MeanThroughput(TPS)
I also would like to usually calculate the arrival rate of system :
L = λW
λ = L/W
Where,
W = Average response time + Think time
L = Virtual Users we simulate in load generation tool
After calculating the arrival rate λ , I will compare arrival rate λ with Throughput X to see if the system can catch up the incoming load, if not, then start tuning it!
One example:
W =(0.352 + 0); -- which means no think time for test
L = 8;
then,
λ = L/W = 8/(0.352 + 0) = 22.73
Meanwhile, get Throughput measured by load generation tool
Throughput = 22
Not that bad currently :)
Some Update after several years I met with such an elegant equation, following results are what i have worked with my perf team to prove the Little's law:
Little's Law for Finding Response Time:
MeanResponseTime(AVG) = MeanNumberInSystem(VUs) / MeanThroughput(TPS)
Assumptions:
- Stable system, in the long terms
- No Obvious System Bottlenecks
- Similar Actions in the system
Test And Measurement -- Get XXX Pages:
VUs
|
AVG(ms)
|
90%(ms)
|
TPS
|
Calculated VUs using Little's Law
|
---|---|---|---|---|
1 | 58 | 72 | 16.98 | 0.99 |
12 | 74 | 108 | 161.63 | 11.96 |
25 | 83 | 121 | 297.99 | 24.73 |
50 | 138 | 209 | 360.67 | 49.77 |
75 | 197 | 349 | 379.59 | 74.78 |
100 | 261 | 492 | 381.21 | 99.50 |
125 | 326 | 636 | 381.80 | 124.71 |
Predicting and Modeling:
- Find relations between VU and Avg Response Time By Curve fitting:
y = 0.0067x2 + 1.3698x + 53.613 |
- Response Time Validation: