Performance test – convert the current network traffic into concurrency

Time:2022-5-17

Basic concepts of PV, UV and IP:

PV — > visits: page hits. When clicked or refreshed at a certain time, it will be recorded once, and the same page will be accumulated when opened or refreshed multiple times

UV — > independent access: access to the same computer will only be accumulated once. No matter how many pages the same computer visits, it will only be accumulated once. It can also be understood as the number of computers visited

IP — > independent IP: IP accesses from the same source will only be accumulated once. No matter how many pages the same IP source visits, it will only be accumulated once

 

Current network flow is converted into actual concurrent number of performance test — > current network flow generally refers to PV

1. Average flow distribution

From the product manager, the number of visits to yingdao community (9:00-18:00) is 500W, of which login: Search: Post: others are 2:5:1:2. Now the load test of the search interface at (9:00-18:00) is carried out

Step1: calculate the number of visits to the search interface: 500W * 5 / 10 = 250W

Step 2: calculate the access volume for 10min: 250W / 9h / 6 = 4.62w

Step3: use jemter to test run the number of samples of 10 threads of the search interface in 10min. If: 10 threads ﹤ 10min ﹤ 1W samples —- > concurrency ﹤ 10min ﹤ 4.62w traffic

Step4: fuzzy calculation of concurrent number corresponding to current network traffic: 10 / concurrent number = 1W / 4.62w — > concurrent number = 462

Step5: leave 20% threshold: 462 * (1 + 20%) = 554 threads

Step6: use thread 554 to run for 10 minutes to get a sample number. If the actual sample number > = 4.62w, the actual concurrent number is determined. If not, continue to add threads until the actual sample number > = 4.62w is met

STEP7: remove the number of concurrency attachment 3 groups. If the number of concurrency is 554, the values are 462, 554 and 649. Perform 5min, 10min and 30min load tests on these three groups respectively, record the data and analyze the results

 

2. The flow has obvious peak – 28 distribution (80% of the flow is concentrated in 20% of the time)

One day’s visit volume of shadow knife college is 600W. Now we conduct performance test on the college

Step 1: confirm the transaction (login – play)

Step 2: determine the 10min access traffic of the transaction: 600 * 0.8 / 24 * 0.2 / 6 = 166.66w

Step3: use JMeter to try to run the number of samples of 10 threads in 10 minutes. If: 10 threads ﹐ 10 minutes ﹐ 7000 samples — > concurrency ﹐ 10 minutes ﹐ 166.66w

Step4: fuzzy calculation of concurrent number corresponding to current network traffic: 10 / concurrent number = 7000 / 1666666 — > concurrent number = 2381

Step5: leave 20% threshold: 2381 * (1 + 20%) = 2857 threads

Step6: use thread 2857 to run for 10 minutes to get a sample number. The actual number of samples > = 166.66w determines the actual number of concurrent samples. If not, continue to add threads until the actual number of samples > = 166.66w is met