How to calculate the number of users and the time to test the load

I want to know how to calculate the number of users , Time of thought , Time and number of iterations for load testing.

Demand:

  • I need to complete 10,000 transactions per hour.
  • It takes 1 hour to complete.
  • It is necessary to indicate the time of thought and time

Note:

  • My script "airplane" contains 7 transactions.
  • The total response time is 16 seconds without thought.

How to calculate how many users I need to provide so that I can reach 10,000 transactions per hour and how much time to think and the time and time of the Iteration iteration do I need to specify?

+4
2

- , .

7 16 , , 7/16 , .

10 000 , .

VU = Number of virtual users
time = test time in seconds
TPS = transactions per second

VU * time * TPS = total_transactions

total_transactions, VU, :

total_transactions / (time * TPS) = VU

, , :

10000 / (3600 * 7/16) = 6.3

.. 6 VU, 10 000 . , 10 VU , , 10 000 .

?

10 , 7 16 , 10 * 7/16 * 3600 = 15 750 . . , 7/16 . :

VU * time * TPS = total_transactions

TPS = total_transactions / (VU *time)

TPS = 10000 / (10 * 3600)   =>  TPS = 0.2777...

, VU 0,28 TPS, 7/16 (0,44) TPS.

TPS = transactions / time

script 7 16 , 7/16 (0,44) TPS.

, script, :

time = transactions / TPS

time = 7 / 0.277778   => time = 25.2 seconds

script 16 , , 25 , 9 .

:

10 VU, 7 25 , , 10 000 :

10 * 7/25 * 3600 = 10080

script , , :

3600 / 25 = 144 iterations

:

Number of VUs: 10
Total sleep time during one iteration: 9
Iterations/VU: 144

, , . 3 , , , .

+8

: TPS: 7/16 - 7/16? 16/7.

: 10000 , 10000/3600 = 2,77; 7/16 . , . , .

0

All Articles