In actual performance testing, the concepts associated with the number of concurrent users that are often exposed include "concurrent users", "System users" and "simultaneous online users", with a practical example to illustrate their differences.
Suppose there is an OA system with 2000 users-that is to say, the total number of users who may be using the OA system is 2000, the concept is "number of system users", which has an "online statistics" function (the system uses a global variable to count all logged-in users), From the online statistics function can be obtained, the peak of 500 people online (this 500 is generally referred to as the "number of simultaneous online"), then the number of concurrent users of the system?
based on our definition of the number of concurrent users of the business, This 500 is the maximum number of business concurrent users used by the system as a whole. Of course, the value of 500 only indicates that 500 users logged in at the highest peak, not the actual server pressure. Because the pressure on the server is also related to the specific user access mode. For example, in these 500 users who "use the system simultaneously", consider a point in time at which 40% of the users are more interested in viewing the system announcement (note: "See" This action will not incur any burden on the server), 20% The user fills in the complex form (to the user fills in the form, only then will send the request to the service side in the "Submit" time, the filling process is not to the service side to constitute the pressure), 20% partial users in the daze (that is what also did not do), the remaining 20% users continuously from one page jumps to another page-- In this scenario, it can be said that only 20% of users really pressure the server. Therefore, as can be seen from the above example, the actual pressure on the server depends not only on the number of concurrent users, but also on the user's business scenario.
In the actual performance testing work, the tester is generally concerned about the number of business concurrent users, that is, from the business perspective should be set how many concurrent number is reasonable, so in the later discussion, is mainly for the number of business concurrent users to discuss, and, for convenience, The number of business concurrent users is referred to directly as the number of concurrent users.
(1) Calculate the average number of concurrent users: C = nl/t
(2) Peak number of concurrent users: C ' ≈c+3 radical C
In the formula (1), C is the average number of concurrent users; n is the number of login sessions; L is the average length of the login session; t refers to the length of the period of the visit.
The formula (2) gives the method of calculating the peak number of concurrent users, where C ' refers to the peak of the number of concurrent users, and C is the average number of concurrent users in the formula (1). The formula is derived from the assumption that the login session of the user is estimated to be in accordance with the Poisson distribution.
Instance:
Suppose there is an OA system, the system has 3,000 users, an average of about 400 users per day to access the system, for a typical user, the average user from logging on to exit the system in a day is 4 hours, in a day, the user only within 8 hours to use the system.
According to the formula (1) and the formula (2), you can get:
C = 400*4/8 = 200
C ' ≈200+3* radical 200 = 242
This article is from the "Nrain Growth Road" blog, please be sure to keep this source http://nrain.blog.51cto.com/11930278/1867171
The number of concurrent connections and the calculation of online numbers