How do I set the proportion of users for different services based on the business proportion?

Source: Internet
Author: User

During performance testing, most projects are composed of more than two scenarios (more than two scripts, in hybrid scenarios, how do I set the number of virtual users of different scripts based on the service proportion?

Assume that there are two types of scripts a and B (business). After research, we know that the ratio of A and B is: 40%, 60%.

A common practice is to set the proportion of virtual users (A is 40%, B is 60%) based on the business proportion.

This method is relatively simple, but in fact, although the user-to-Business ratio is the same, the TPS ratio of the two is usually not the same, therefore, the proportion of transactions completed per unit time is different from the business proportion, which does not really meet the requirements. therefore, this approach is not accurate.

The following describes a more accurate method:

First, set the scenario, and set the scripts A and B to run with a single user. Observe the Real-Time TPS at this time. If the TPS difference between the two is small, assume that the TP of script a is n times that of script B. If n> 10, add the pacing value 0.001 to run-time-setting of script a, and then run the script, for example, N> 10, increase the pacing value until the ratio of N to N is less than 10. Suppose we finally adjust n to 5,

Then, according to their business ratio and TPS multiples, because a single user TPS of script a is five times that of single user of script B, and the Business proportion is 40%, 60%, that is, so we know that the ratio of user a to user B is. 5. we set one user for script a, eight users for script B, and run the scenario to see if their TP is close? If yes, increase the number of users according to the proportional gradient. Run the hybrid scenario! Until a script does not increase TPS as the number of users increases, or a failed transaction occurs, or the server resource usage increases, the performance inflection point can be considered.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.