Monday, January 17, 2011

Little's Law on Performance Test

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 :
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
1587216.980.99
1274108161.6311.96
2583121297.9924.73
50138209360.6749.77
75197349379.5974.78
100261492381.2199.50
125326636381.80124.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

VusPredict ResultTest Result
35109.7101
65170.9172
90231.1238
110285.3290

  • Find relations between VU and Throughput By Curve fitting:
y = 82.39ln(x) + 7.8124

  • Throughput Validation: 
VusPredict ResultTest Result
35300.7342.61
65351.7376.35
90378.5374.49
110395377.74

No comments:

Post a Comment