CN110635961B - Pressure measurement method, device and system of server - Google Patents

Pressure measurement method, device and system of server Download PDF

Info

Publication number
CN110635961B
CN110635961B CN201810657782.4A CN201810657782A CN110635961B CN 110635961 B CN110635961 B CN 110635961B CN 201810657782 A CN201810657782 A CN 201810657782A CN 110635961 B CN110635961 B CN 110635961B
Authority
CN
China
Prior art keywords
current
concurrency number
pressure measurement
measurement result
condition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810657782.4A
Other languages
Chinese (zh)
Other versions
CN110635961A (en
Inventor
鲁国宁
侯磊
马鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201810657782.4A priority Critical patent/CN110635961B/en
Publication of CN110635961A publication Critical patent/CN110635961A/en
Application granted granted Critical
Publication of CN110635961B publication Critical patent/CN110635961B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0888Throughput
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The present disclosure provides a pressure measurement method for a server, the method including: acquiring an initial pressure measurement result of the server corresponding to the initial value of the concurrency number; and dynamically adjusting the optimal pressure measurement result, and specifically, taking the initial pressure measurement result as an initial value of the optimal pressure measurement result to circularly execute the following operations until a stop condition is met: determining an adjustment interval based on the current optimal pressure measurement result; updating the current concurrency number and/or the current adjusting interval according to the adjusting interval and the concurrency number corresponding to the current optimal pressure measurement result; and in the event that the stop condition is not satisfied and the first condition is not satisfied: obtaining a current pressure measurement result of the server corresponding to the current concurrency number; and updating the current optimal pressure measurement result based on the current pressure measurement result. The disclosure also provides a pressure measurement device and a system of the server.

Description

Pressure measurement method, device and system of server
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method, an apparatus, and a system for pressure measurement of a server.
Background
With the rapid development of the internet era, the requirements of massive users on the high concurrency and response time of the system are higher and higher, and therefore, the pressure measurement on the performance of the server becomes more important.
In the course of implementing the disclosed concept, the inventors found that there are at least the following problems in the prior art: no matter the performance evaluation is performed on a new system or the regression test is performed on an old system, in order to accurately evaluate the maximum processing capacity of the system, various different pressure measurement parameters in the combined pressure measurement result need to be arranged and combined to obtain the optimal performance of the system, but the value searching process is complex and changeable in strategy and often needs to be tested for many times, which undoubtedly wastes a large amount of time cost and labor cost; the optimal performance of the system is obtained by adopting a testing tool commonly used in the industry, so that the defects that only step pressurization is realized, the pressure measurement result is often inaccurate, and the defects that joint analysis cannot be performed on information related to the tested system and the safety of the system is not protected exist.
Disclosure of Invention
In view of this, the present disclosure provides a pressure measurement method, device and system for a server, which can improve accuracy of pressure measurement results.
One aspect of the present disclosure provides a server pressure measurement method for detecting a peak concurrency number that a server can bear, where the concurrency number includes a number of online users interacting with the server at the same time, and the method includes: acquiring an initial pressure measurement result of the server corresponding to the initial value of the concurrency number; and dynamically adjusting the optimal pressure measurement result, wherein the following operations are executed in a circulating mode by taking the initial pressure measurement result as an initial value of the optimal pressure measurement result until a stop condition is met: determining an adjustment interval based on the current optimal pressure measurement result; updating the current concurrency number and/or the current adjusting interval according to the adjusting interval and the concurrency number corresponding to the current optimal pressure measurement result; and in the event that the stop condition is not satisfied and the first condition is not satisfied: obtaining a current pressure measurement result of the server corresponding to the current concurrency number; and updating the current optimal pressure measurement result based on the current pressure measurement result. The stopping condition comprises that the current concurrency number is operated and the current adjusting distance is the minimum value, or the current concurrency number does not meet the preset condition of the concurrency number and the current adjusting distance is the minimum value, and the first condition comprises that the current concurrency number does not meet the preset condition of the concurrency number and the current adjusting distance is not the minimum value.
According to the embodiment of the present disclosure, the following operations are executed in a loop with the initial pressure measurement result as the initial value of the optimal pressure measurement result until the stop condition is satisfied, further including: acquiring the system resource occupancy of the server corresponding to the concurrency number corresponding to the current optimal pressure measurement result; and determining the adjusting distance based on the current optimal pressure measurement result and the system resource occupancy.
According to an embodiment of the disclosure, the pressure measurement method of the server further includes obtaining a pressure measurement task, where the pressure measurement task specifies an initial value of the concurrency number, a minimum value of the adjustment interval, a preset condition of the concurrency number, and/or a preset condition of a pressure measurement result; and/or setting the current concurrency number to 0 under the condition that a stop condition is met; and/or determining the adjustment interval of the concurrency number based on the current optimal pressure measurement result comprises: and determining the adjustment interval of the concurrency number according to the current optimal pressure measurement result and the preset condition of the pressure measurement result.
According to the embodiment of the present disclosure, under the condition that the current optimal pressure measurement result does not satisfy the preset condition of the pressure measurement result, updating the current concurrency number and/or the current adjustment distance according to the adjustment distance and the concurrency number corresponding to the current optimal pressure measurement result includes: the following operations are performed in a loop until the first condition is not satisfied: according to the current adjusting distance, reducing the concurrency number corresponding to the current optimal pressure measurement result to update the current concurrency number; and under the condition that the first condition is met after the current concurrency number is updated, reducing the current adjusting interval to update the current adjusting interval.
According to the embodiment of the present disclosure, under the condition that the current optimal pressure measurement result satisfies the preset condition of the pressure measurement result, updating the current concurrency number and/or the current adjustment distance according to the adjustment distance and the concurrency number corresponding to the current optimal pressure measurement result includes: respectively obtaining a front concurrency number obtained by subtracting the current adjusting distance from a concurrency number corresponding to the current optimal pressure measurement result, and a rear concurrency number obtained by adding the current adjusting distance; reducing the current adjusting distance and returning to reacquire the front concurrence number and the rear concurrence number under the condition that a second condition is met and the current adjusting distance is not the minimum value, reducing the current adjusting distance under the condition that the second condition is met and the current adjusting distance is not the minimum value until the current adjusting distance is the minimum value, and not changing the current concurrence number and the current adjusting distance under the condition that the second condition is met and the current adjusting distance is the minimum value, wherein the second condition is as follows: the running concurrency number exists in a front concurrency number interval which is not less than the front concurrency number and less than the concurrency number corresponding to the current optimal pressure measurement result, and a rear concurrency number interval which is more than the concurrency number corresponding to the current optimal pressure measurement result and not more than the rear concurrency number.
According to the embodiment of the present disclosure, under the condition that the current optimal pressure measurement result satisfies the preset condition of the pressure measurement result, updating the current concurrency number and/or the current adjustment interval according to the adjustment interval and the concurrency number corresponding to the current optimal pressure measurement result further includes: in the case where the third condition is satisfied: according to the current adjusting distance, reducing the concurrency number corresponding to the current optimal pressure measurement result to update the current concurrency number for the first time; under the condition that the first condition is not met after the current concurrency number is updated for the first time, the current concurrency number and the current adjusting distance after the current concurrency number is updated for the first time are not changed; under the condition that a first condition is met after the current concurrency number is updated for the first time: reducing the current adjustment interval; and increasing the concurrency number corresponding to the current optimal pressure measurement result according to the reduced current adjustment interval to update the current concurrency number for the second time, wherein the third condition is as follows: the running concurrency number does not exist in a front concurrency number interval which is not less than the front concurrency number and less than the concurrency number corresponding to the current optimal pressure measurement result, and the running concurrency number does exist in a back concurrency number interval which is greater than the concurrency number corresponding to the current optimal pressure measurement result and not greater than the back concurrency number.
According to the embodiment of the present disclosure, under the condition that the current optimal pressure measurement result satisfies the preset condition of the pressure measurement result, updating the current concurrency number and/or the current adjustment interval according to the adjustment interval and the concurrency number corresponding to the current optimal pressure measurement result further includes: in the case where the fourth condition is satisfied: according to the current adjusting distance, increasing the concurrency number corresponding to the current optimal pressure measurement result to update the current concurrency number for the first time; under the condition that the first condition is not met after the current concurrency number is updated for the first time, the current concurrency number and the current adjusting distance after the current concurrency number is updated for the first time are not changed; under the condition that a first condition is met after the current concurrency number is updated for the first time: reducing the current adjustment distance; according to the reduced current adjusting distance, increasing the concurrency number corresponding to the current optimal pressure measurement result to update the current concurrency number for the second time; under the condition that the first condition is not met after the current concurrency number is updated for the second time, the current concurrency number updated for the second time and the reduced current adjusting distance are not changed; and under the condition that the current concurrency number is updated for the second time and then meets the first condition, according to the reduced adjusting distance, reducing the concurrency number corresponding to the current optimal pressure measurement result so as to update the current concurrency number for the third time, wherein the fourth condition is as follows: the running concurrency number exists in a front concurrency number interval which is not less than the front concurrency number and less than the concurrency number corresponding to the current optimal pressure measurement result, and the running concurrency number does not exist in a rear concurrency number interval which is greater than the concurrency number corresponding to the current optimal pressure measurement result and not greater than the rear concurrency number.
According to the embodiment of the present disclosure, under the condition that the current optimal pressure measurement result satisfies the preset condition of the pressure measurement result, updating the current concurrency number and/or the current adjustment interval according to the adjustment interval and the concurrency number corresponding to the current optimal pressure measurement result further includes: under the condition that a fifth condition is met, circularly executing the following operations until the current concurrency number after the first updating meets a preset condition of the concurrency number or the current concurrency number after the second updating does not meet the first condition: according to the current adjusting distance, increasing the concurrency number corresponding to the current optimal pressure measurement result to update the current concurrency number for the first time; under the condition that the current concurrency number after the first updating does not meet the preset condition of the concurrency number: according to the current adjusting distance, reducing the concurrency number corresponding to the current optimal pressure measurement result to update the current concurrency number for the second time; and under the condition that a first condition is met after the current concurrency number is updated for the second time, reducing the current adjustment interval to update the current adjustment interval, wherein the fifth condition is as follows: the running concurrency number does not exist in a front concurrency number interval which is not less than the front concurrency number and less than the concurrency number corresponding to the current optimal pressure measurement result, and a rear concurrency number interval which is more than the concurrency number corresponding to the current optimal pressure measurement result and not more than the rear concurrency number. According to an embodiment of the present disclosure, the pressure measurement result includes at least one of: response time of the server; response error rate of the server; and/or maximum system throughput of the server; and/or the preset condition of the pressure measurement result comprises at least one of the following conditions: the response time of the server is not higher than the preset response time; the response error rate of the server is not higher than the preset error rate; and/or the maximum system throughput of the server is not higher than a preset throughput; and/or the preset conditions of the concurrency number comprise: the concurrency number is not less than a first preset value and/or not more than a second preset value, wherein the first preset value is less than the second preset value.
Another aspect of the present disclosure provides a pressure measurement apparatus for a server, configured to detect a peak concurrency number that the server can bear, where the concurrency number includes a number of online users interacting with the server at the same time, and the apparatus includes: the acquisition module is used for acquiring an initial pressure measurement result of the server corresponding to the initial value of the concurrency number; and a dynamic adjustment module for dynamically adjusting the optimal pressure measurement result, wherein the dynamic adjustment module is specifically configured to cyclically execute the following operations with the initial pressure measurement result as an initial value of the optimal pressure measurement result until a stop condition is satisfied: determining an adjustment interval based on the current optimal pressure measurement result; updating the current concurrency number and/or the current adjusting interval according to the adjusting interval and the concurrency number corresponding to the current optimal pressure measurement result; and in the event that the stop condition is not satisfied and the first condition is not satisfied: obtaining a current pressure measurement result of the server corresponding to the current concurrency number; and updating the current optimal pressure measurement result based on the current pressure measurement result. The stopping condition comprises that the current concurrency number is operated and the current adjusting distance is the minimum value, or the current concurrency number does not meet the preset condition of the concurrency number and the current adjusting distance is the minimum value, and the first condition comprises that the current concurrency number does not meet the preset condition of the concurrency number and the current adjusting distance is not the minimum value.
Another aspect of the present disclosure provides a pressure measurement system of a server, including: one or more processors; a storage device configured to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are caused to execute the method for pressure measurement of the server.
Another aspect of the present disclosure provides a non-volatile storage medium storing computer-executable instructions for implementing the method of pressure testing of a server as described above when executed.
Another aspect of the present disclosure provides a computer program comprising computer executable instructions for implementing the method of pressure testing of a server as described above when executed.
According to the embodiment of the disclosure, the defects that the pressure measurement result obtained by the existing pressure measurement method is inaccurate and a large amount of time cost and labor cost are wasted in the pressure measurement process can be at least partially solved, and therefore the adjustment interval of the concurrency number can be automatically and dynamically adjusted, so that the optimal pressure measurement result is dynamically adjusted, the accuracy of the finally obtained optimal pressure measurement result is improved, and the labor cost and the time cost are reduced.
Drawings
Fig. 1 schematically illustrates an application scenario of a pressure measurement method, apparatus and system of a server according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a method of pressure testing a server according to an embodiment of the present disclosure;
3A-3B schematically illustrate a flow chart for dynamically adjusting current optimal pressure measurements according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow chart of a method of pressure testing of a server according to another embodiment of the present disclosure;
5A-5E schematically illustrate a flow chart for updating a current concurrency number according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates a flow chart of a method of pressure testing of a server according to yet another embodiment of the present disclosure;
fig. 7A to 7B schematically show structural block diagrams of a pressure measurement device of a server according to an embodiment of the present disclosure;
FIG. 8 schematically illustrates a block diagram of a computer system suitable for implementing a method of pressure testing of a server, in accordance with an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). It will be further understood by those within the art that virtually any disjunctive word and/or phrase presenting two or more alternative terms, whether in the description, claims, or drawings, should be understood to contemplate the possibilities of including one of the terms, either of the terms, or both terms. For example, the phrase "a or B" should be understood to include the possibility of "a" or "B", or "a and B".
The embodiment of the disclosure provides a pressure measurement method, a pressure measurement device and a pressure measurement system for a server. The method is used for detecting the peak concurrency number which can be borne by the server, wherein the concurrency number comprises the number of online users interacting with the server at the same time. Specifically, the method comprises the following steps: acquiring an initial pressure measurement result of the server corresponding to the initial value of the concurrency number, and dynamically adjusting the optimal pressure measurement result, wherein the dynamically adjusting the optimal pressure measurement result comprises circularly executing the following operations by taking the initial pressure measurement result as the initial value of the optimal pressure measurement result until a stop condition is met: determining an adjustment interval based on the current optimal pressure measurement result; updating the current concurrency number and/or the current adjusting interval according to the adjusting interval and the concurrency number corresponding to the current optimal pressure measurement result; under the condition that the stop condition is not met and the first condition is not met, obtaining a current pressure measurement result of the server corresponding to the current concurrency number; and updating the current optimal pressure measurement result based on the current pressure measurement result. The stopping condition comprises that the current concurrency number is operated and the current adjusting distance is the minimum value, or the current concurrency number does not meet the preset condition of the concurrency number and the current adjusting distance is the minimum value, and the first condition comprises that the current concurrency number does not meet the preset condition of the concurrency number and the current adjusting distance is not the minimum value.
Fig. 1 schematically illustrates an application scenario of a pressure measurement method, apparatus and system of a server according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of an application scenario in which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, but does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the application scenario 100 according to this embodiment includes terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 over the network 104 to stress the server, etc. Various operation applications can be installed on the terminal devices 101, 102, and 103 to implement stress test on the server, and obtain the system resource occupation rate of the server. It can be understood that, during the process of performing the stress test on the server, one or more terminal devices may be present to simultaneously apply pressure to the server, and any one of the one or more terminal devices or other terminal devices may aggregate the detected results of applying pressure to the one or more terminal devices, so as to regulate and control the stress test process of the server, specifically, for example, may regulate and control the number of concurrent times of the server, so as to seek to obtain the optimal performance of the server.
The terminal devices 101, 102, 103 may be various electronic devices with display screens to present the results of the server's stress test to the user, including but not limited to desktop computers, laptop portable computers, tablet charges, smart phones, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the server pressure measurement method provided by the embodiment of the present disclosure may be generally executed by the terminal devices 101, 102, and 103. Accordingly, the pressure measurement device of the server provided by the embodiment of the present disclosure may be generally disposed in the terminal equipment 101, 102, 103. The server pressure measurement method provided by the embodiment of the present disclosure may also be executed by a server or a server cluster that is different from the terminal devices 101, 102, and 103 and capable of communicating with the server 105. Accordingly, the pressure measurement device of the server provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the terminal devices 101, 102, and 103 and capable of communicating with the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically shows a flow chart of a pressure measurement method of a server according to an embodiment of the present disclosure.
According to an embodiment of the present disclosure, the method is used for detecting the number of peak concurrencies that the server can endure, and as shown in fig. 2, the method includes operations S210 to S220.
In operation S210, an initial pressure measurement result of the server corresponding to an initial value of the concurrency number is acquired.
According to an embodiment of the present disclosure, the concurrency number includes the number of online users interacting with the server at the same time. For automatic server pressure measurement, the number of online users may be, for example, a virtual number of online users.
According to an embodiment of the present disclosure, the initial value of the concurrency number may be preset in response to an operation of a user, for example, and may also be set according to a performance requirement of a server. For example, if the server is set to allow the server to receive concurrent access of 100 users, the initial value of the concurrency number may be set to any number between 70 and 100. It is to be understood that the above-mentioned value of the initial value of the concurrency number is only used as an example to facilitate understanding of the present disclosure, and the present disclosure does not limit the specific value of the initial value of the concurrency number.
According to an embodiment of the present disclosure, the pressure measurement result of the server may include, for example, at least one of: the response time of the server, the response error rate of the server, the maximum system throughput of the server, the total number of response transactions of the server, and the like.
The response time of the server may be, for example, the response time of TP99, TP90, TP999, or TP50, i.e., the minimum time required to ensure that 99%, 90%, 99.9%, or 50% of the requests at the same time can be responded to, respectively. The response error rate of the server may be, for example, a percentage of the number of transaction errors in a period of time to the total number of transactions, the maximum system throughput of the server may be, for example, the number of Transactions Per Second (TPS), that is, the number of transactions that the server can process in a unit time (per second), and the like, and the total number of response transactions of the server is a sum of all transactions processed in a pressure measurement period by the server. It is to be understood that the above-mentioned server pressure measurement results are merely used as examples to facilitate understanding of the present disclosure, and the present disclosure does not limit the specific representation form of the server pressure measurement results.
According to an embodiment of the present disclosure, the obtaining of the pressure measurement result may be, for example: and applying pressure to the server by adopting a pressure measurement tool according to the initial value of the concurrency number, and acquiring each performance index of the server to obtain a pressure measurement result after maintaining the preset time period. Specifically, the manner of applying pressure may be, for example, that the robot generates pressure through script writing and performs a package sending and receiving operation on the server. It is to be understood that the above-mentioned manner of obtaining the pressure measurement result is merely an example to facilitate understanding of the present disclosure, and the present disclosure does not limit the specific manner of obtaining the pressure measurement result.
In operation S220, the optimal pressure measurement result is dynamically adjusted.
According to the embodiment of the disclosure, the current optimal pressure measurement result can be dynamically adjusted in real time according to the real-time pressure measurement result of the server obtained by running the current concurrency number, so as to obtain the optimal result within the preset condition.
Fig. 3A-3B schematically illustrate a flow chart for dynamically adjusting optimal pressure measurement results according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, as shown in fig. 3A, operation S220 may specifically include performing operations S221 to S224 in a loop, where the loop takes the initial pressure measurement result as an initial value of the optimal pressure measurement result until the stop condition is satisfied.
According to an embodiment of the present disclosure, the stop condition may include, for example: the current concurrency number is operated and the current adjusting distance is the minimum value, or the current concurrency number does not meet the preset condition of the concurrency number and the current adjusting distance is the minimum value. When the stop condition is satisfied, for example, it may be stated that the current optimal pressure measurement result is the final optimal pressure measurement result. According to an embodiment of the present disclosure, the current concurrency number is already running: and obtaining the voltage measurement result of the current concurrency number, namely performing the overvoltage measurement on the server by using the current concurrency number.
Specifically, in operation S221, an adjustment interval is determined based on the current optimal pressure measurement result.
According to an embodiment of the present disclosure, the adjustment interval may be determined according to an accuracy required for the performance of the server, for example, to be a basis for adjusting the current concurrency number. The adjustment distance may be, for example, a natural number not less than 1, and the minimum value of the adjustment distance should be minimized as the requirement for the accuracy of the performance of the server increases. According to an embodiment of the present disclosure, the adjustment pitch may also be set in response to an operation by a user, for example.
According to the embodiment of the disclosure, the adjustment distance may also be determined according to the current optimal pressure measurement result and the preset condition of the optimal pressure measurement result, for example.
According to an embodiment of the present disclosure, the preset condition of the pressure measurement result may include, for example, at least one of: the response time of the server is not higher than a preset error rate, the response error rate of the server is not higher than the preset error rate, and the maximum system throughput of the server is not higher than the preset throughput.
According to the embodiment of the disclosure, if the preset condition of the pressure measurement result is that the maximum system throughput of the server is not higher than the preset throughput, for example, if the system throughput in the current optimal pressure measurement result is close to the preset throughput, the adjustment interval is determined to be a smaller adjustment interval; and if the system throughput in the current optimal pressure measurement result is far greater than or far less than the preset throughput, determining the adjustment interval to be a larger adjustment interval.
According to the embodiment of the disclosure, the adjustment distance may be determined by comprehensively considering the magnitude of the difference between the multiple indexes in the pressure measurement result and the corresponding indexes in the preset condition of the pressure measurement result, for example. It is to be understood that the above-described method of determining the adjustment pitch is merely an example to facilitate understanding of the present disclosure, and the present disclosure is not limited to a specific method of determining the adjustment pitch.
According to the embodiment of the disclosure, the adjustment distance may also be obtained by comparing the optimal pressure measurement results obtained through several cycles, for example, and if it is found that the extreme values of the performance indexes set in the preset conditions of the optimal pressure measurement results and the pressure measurement results are greatly different, the adjustment distance may be appropriately increased to improve the efficiency of adjusting the current optimal pressure measurement result to obtain the final optimal pressure measurement result; if the current optimal pressure measurement result is found to be obviously close to the extreme value of each performance index set in the preset condition of the pressure measurement result compared with the optimal pressure measurement result obtained in the previous cycles, the adjustment distance can be properly reduced so as to avoid missing a more ideal pressure measurement result.
According to the embodiment of the present disclosure, the value of the adjustment distance may also have a preset value mode, for example, the value mode may be [ n, 2n, 3n, 4n, … … 4n, 3n, 2n, n]And a step mechanism, wherein step is the minimum value of the adjusting interval and is used as the base number of the value of the adjusting interval, and the value of the adjusting interval can be multiplied and reduced by a set n (positive integer) value. For example, in the initial stage of pressure measurement, the adjustment distance can be increased in multiples, and in the subsequent pressure measurement process, when the adjustment distance needs to be decreased according to the analysis of the current optimal pressure measurement result, the adjustment distance is decreased in multiples; the value pattern may also be, for example, [ n, n ] 2 、n 3 、n 4 、……、n 4 、n 3 、n 2 、n]Step, i.e. the adjustment pitch can be increased or decreased exponentially, based on the minimum value of the adjustment pitch. According to the embodiment of the disclosure, for example, a value mode preset by a user can be adopted to dynamically value the adjustment interval. For example, in the initial stage of pressure measurement, if the difference between the initial value of the concurrency number and the maximum value specified by the preset condition of the concurrency number is large, the adjustment interval may be adjusted by using the exponential value mode, and when the difference between the initial value of the concurrency number and the maximum value specified by the preset condition is small, the adjustment interval may be adjusted by using the multiple value mode. It is to be understood that the above mentioned value mode of the adjustment interval is only used as an example to facilitate understanding of the present disclosure, and the present disclosure does not limit the value method of the adjustment interval.
In operation S222, the current concurrency number and/or the current adjustment interval are updated according to the current adjustment interval and the concurrency number corresponding to the current optimal pressure measurement result.
According to an embodiment of the present disclosure, the operation S222 may be, for example: the current concurrency number is increased or decreased, for example by an amount that is the current adjustment interval, on the basis of the concurrency number corresponding to the current optimal pressure measurement result, and/or the current adjustment interval is increased or decreased on the basis of the current adjustment interval.
According to an embodiment of the present disclosure, whether the current concurrency number updated in operation S222 is increased or decreased relative to the concurrency number corresponding to the current optimal pressure measurement result may depend on, for example, a comparison result of the current optimal pressure measurement result and a preset condition of the pressure measurement result, and/or whether the concurrency number corresponding to the current optimal pressure measurement result satisfies the preset condition of the concurrency number. Specifically, the details of updating the current concurrency number in operation S222 are described in the following description of the present specification with reference to fig. 5A to 5E. The preset condition of the concurrency number may include, for example, that the concurrency number is not less than a first preset value and/or the concurrency number is not greater than a second preset value, and if the concurrency number corresponding to the current optimal pressure measurement result is not less than the first preset value and/or the concurrency number is not greater than the second preset value, it indicates that the concurrency number satisfies the preset condition.
In operation S223, in the case where the stop condition is not satisfied and the first condition is not satisfied, a current pressure measurement result of the server corresponding to the current concurrency number is acquired.
According to an embodiment of the present disclosure, the first condition may include, for example: the current concurrency number does not meet the preset condition of the concurrency number and the current adjusting distance is not the minimum value.
According to the embodiment of the present disclosure, for example, the operation S223 may specifically be to perform pressure measurement on the server by using the current concurrency number, that is, to run the current concurrency number, so as to obtain the current pressure measurement result of the server, where a method for performing pressure measurement on the server to obtain the pressure measurement result in the operation is the same as or similar to that in the operation S210 described with reference to fig. 2, and is not repeated here.
In operation S224, the current optimal pressure measurement result is updated based on the current pressure measurement result.
According to an embodiment of the present disclosure, the operation S224 may specifically be, for example: the current pressure measurement result and the current optimal pressure measurement result obtained in operation S223 are respectively compared with the preset conditions of the pressure measurement result, and the pressure measurement result with a smaller difference from the preset conditions of the pressure measurement result is selected from the current pressure measurement result and the optimal pressure measurement result as the updated current optimal pressure measurement result.
For example, if a certain performance index in the current pressure measurement result obtained in operation S223 exceeds the preset condition, and all performance indexes in the current optimal pressure measurement result do not exceed the preset condition, the current optimal pressure measurement result is selected as the updated optimal pressure measurement result; if all the performance indexes in the current pressure measurement result obtained in operation S223 and the current optimal pressure measurement result do not exceed the preset condition, but the response time in the current pressure measurement result obtained in operation S223 is smaller than the response time in the current optimal pressure measurement result, the current pressure measurement result obtained in operation S223 is used as the updated optimal pressure measurement result. It is to be understood that the above method for updating the current optimal pressure measurement result is only an example to facilitate understanding of the present disclosure, and the present disclosure is not limited to the method for updating the current optimal pressure measurement result, for example, performance indicators in the current optimal pressure measurement result and the current optimal pressure measurement result may be considered comprehensively, so that the finally obtained optimal pressure measurement result has a smaller response time, a larger system throughput, a smaller response error rate, and the like.
According to the embodiment of the present disclosure, since the current concurrency number is not necessarily the maximum concurrency number that the server can bear when the adjustment interval is not the minimum value, for example, if the optimal pressure measurement result obtained in operation S224 meets the preset condition of the pressure measurement result, the current concurrency number is increased again by appropriately decreasing the adjustment interval of the concurrency number, the server may be able to bear the current concurrency number that is increased again on the premise of ensuring that the performance meets the preset condition, and therefore, after operation S224 is completed, if the updated current optimal pressure measurement result is used as the basis, operation S221 to operation S224 are executed again in a loop, and a more accurate and final optimal pressure measurement result may be obtained.
Therefore, when the optimal pressure measurement result is dynamically adjusted in the pressure measurement method of the server according to the embodiment of the present disclosure, operation S221 to operation S224 are cyclically performed until the stop condition is satisfied, and a final accurate pressure measurement result can be obtained, and since the adjustment interval of the concurrency number is determined based on the current optimal pressure measurement result, the current concurrency number can be increased or decreased according to the pressure measurement result in the process of obtaining the final optimal pressure measurement result through adjustment.
According to an embodiment of the present disclosure, as shown in fig. 3B, the process of dynamically adjusting the optimal pressure measurement result according to an embodiment of the present disclosure may be before operation S221, for example, operation S225 may further be included.
In operation S225, a system resource occupancy of the server corresponding to the concurrency number corresponding to the current optimal pressure measurement result is acquired. Specifically, when the concurrent number corresponding to the current optimal pressure measurement result is obtained to perform pressure measurement on the server, the utilization rate of each hardware in the server may include, for example, a CPU utilization rate, a memory utilization rate, a network IO delay, a disk IO delay, and/or the like.
Then, when determining the adjustment distance, the acquired system resource occupancy of the server may be considered at the same time, and operation S222 in fig. 3A may be changed to operation S226 in fig. 3B, so as to determine the adjustment distance based on the current optimal pressure measurement result and the system resource occupancy.
According to the embodiment of the disclosure, for example, when the utilization rate of the CPU of the server is 90%, it indicates that the current concurrency number is close to the peak concurrency number that the server can bear, and the adjustment interval may be appropriately reduced; and when the utilization rate of the CPU of the server is 30%, the difference between the current concurrency number and the peak concurrency number bearable by the server is larger, and the adjusting distance can be properly increased. It is to be understood that the above-mentioned determination of the adjustment distance according to the system resource occupancy of the server is only an example to facilitate understanding of the present disclosure, and the embodiments of the present disclosure may also determine the adjustment distance by comprehensively considering a plurality of performance indexes in the system resource occupancy.
In summary, since the adjustment interval in the embodiment of the present disclosure can also be adjusted based on the system resource occupancy of the server, when the server is subjected to pressure measurement to obtain a final optimal pressure measurement result, the hardware performance of the server can be integrated, so that the obtained final optimal pressure measurement result is more accurate. Furthermore, the comprehensive consideration of the system resource occupation ratio can avoid the condition of service life attenuation of the server caused by overhigh occupation ratio of CPU, memory and the like in the server, thereby playing a certain role in protecting the system safety.
Fig. 4 schematically shows a flow chart of a pressure measurement method of a server according to another embodiment of the present disclosure.
As shown in fig. 4, the server pressure measurement method of this embodiment may further include operation S410 and operation S420 in addition to operation S210 to operation S220 described with reference to fig. 2, where operation S220 may include the operation flows described with reference to fig. 3A to 3B, and here, the operation S220 is described by way of example with reference to fig. 3A.
Therein, in operation S410, a pressure measurement task is acquired.
According to an embodiment of the present disclosure, the pressure measurement task may specify, for example, an initial value of the concurrency number, a minimum value of the adjustment interval, a preset condition of the concurrency number, and/or a preset condition of the pressure measurement result, thereby providing a condition for the execution of operation S210. It is to be understood that the specific content of the pressure measurement task is only used as an example to facilitate understanding of the present disclosure, and the present disclosure does not limit the specific content of the pressure measurement task, for example, the pressure measurement task may further include, for example, an IP address of a server to be tested, etc., so as to perform pressure measurement on the server corresponding to the IP address.
According to the embodiment of the present disclosure, the pressure measurement task may be generated in response to the operation of the user, for example, when the user needs to perform pressure measurement on a certain server, the user only needs to input each parameter specified in the pressure measurement task by referring to the terminal devices 101, 102, and 103 in fig. 1, and the pressure measurement task may be automatically generated to perform pressure measurement on the server.
If the loop operation of dynamically adjusting the optimal pressure measurement result in operation S220 stops the loop when the stop condition is satisfied, the stop condition has two situations, the first situation is that the current concurrency number has been run and the adjustment interval is the minimum value, and at this time, because the adjustment interval of the concurrency number is the minimum value, the current optimal pressure measurement result is the final optimal pressure measurement result, so the whole pressure measurement process is ended, and operation S420 is executed, that is, the current concurrency number is 0; and if the second condition is that the current concurrency number does not meet the preset condition of the concurrency number and the current adjustment interval is the minimum value, executing operation S420, that is, setting the current concurrency number to 0, where the setting considers that there may be a situation that the adjustment interval of the concurrency number is unreasonable in value, and the pressure measurement result corresponding to the initial value of the concurrency number is the best pressure measurement result that can be obtained in the value range of the concurrency number, or the setting of the initial value is unreasonable, setting the current concurrency number to 0 to finish the pressure measurement when the concurrency number exceeds the preset condition of the concurrency number and the adjustment interval of the concurrency number is the minimum value, and taking the current best pressure measurement result as the final best pressure measurement result.
Fig. 5A-5E schematically illustrate a flow chart for updating a current concurrency number according to an embodiment of the present disclosure.
According to the embodiment of the present disclosure, according to the adjustment interval, the specific operation of updating the current concurrency number and/or the current adjustment interval needs to be determined according to the comparison result between the current optimal pressure measurement result and the preset condition of the pressure measurement result, for example, if the current optimal pressure measurement result does not satisfy the preset condition of the pressure measurement result, the current concurrency number needs to be appropriately reduced, and when the current optimal pressure measurement result satisfies the preset condition and has a large difference with the extreme value set by the preset condition of the pressure measurement result, the current concurrency number can be considered to be appropriately increased.
Specifically, as shown in fig. 5A, in the case that the current optimal pressure measurement result does not satisfy the preset condition of the pressure measurement result, the operation S222 may include, for example, operations S2221A through S2223A that are executed in a loop. Wherein the loop is to determine the adjustment interval as the initial value of the current adjustment interval in operation S221, and the loop is stopped if the first condition is not satisfied.
Specifically, in operation S2221A, according to the current adjustment interval, the concurrency number corresponding to the current optimal pressure measurement result is reduced to update the current concurrency number; in operation S2222A, in the case where the first condition is not satisfied after the current concurrency number is updated, decreasing the current adjustment interval to update the current adjustment interval; in operation S2223A, after updating the current adjustment interval, execution returns to operation S2221A.
According to the embodiment of the present disclosure, if the current optimal pressure measurement result does not satisfy the preset pressure measurement result, it is indicated that the concurrency number corresponding to the optimal pressure measurement result is greater than the peak concurrency number that the server can bear, so operation S2221A is performed; after the operation S2221A is performed, if a first condition is satisfied, it is described that the concurrency number obtained in the operation S2221A is smaller than the minimum value specified by the preset condition of the concurrency number, and the adjustment interval adopted in the operation S2221A is larger, the adjustment interval needs to be appropriately reduced, that is, the operation S2222A is performed, and the reduced adjustment interval is taken as the current adjustment interval, that is, the operation S2223A is performed, so as to return to perform the operation S2221A, and reduce the concurrency number corresponding to the current optimal pressure measurement result again until the current concurrency number does not satisfy the first condition, where the first condition includes two cases, that is, neither the first condition nor the stop condition is satisfied, the operation S223 in fig. 3A is performed, where the second case is: although the first condition is not satisfied but the stop condition is satisfied, operation S420 described with reference to fig. 4 is performed.
Specifically, as shown in fig. 5B to 5E, in the case that the current optimal pressure measurement result satisfies the preset condition of the pressure measurement result, the operation S222 may be divided into four cases according to whether there is an already-operated concurrency number in a front concurrency number interval that is not less than the front concurrency number and is less than the concurrency number corresponding to the current optimal pressure measurement result, and a rear concurrency number interval that is greater than the concurrency number corresponding to the current optimal pressure measurement result and is not greater than the rear concurrency number, and has different operation flows in different cases.
As shown in fig. 5B, in the case that the current optimal pressure measurement result satisfies the preset condition of the pressure measurement result, operation S222 may include, for example, operations S2221B through S2223B, which are executed in a loop until the second condition is not satisfied, or until the second condition is satisfied but the current adjustment interval is the minimum value.
In operation S2221B, a front concurrency number obtained by subtracting an adjustment distance of the concurrency number from a concurrency number corresponding to the current optimal pressure measurement result, and a rear concurrency number obtained by adding an adjustment distance of the concurrency number to a concurrency number corresponding to the current optimal pressure measurement result are respectively obtained. Specifically, since the current optimal pressure measurement result meets the preset condition of the pressure measurement result, the current concurrency number needs to be taken forward and backward to find a more ideal optimal pressure measurement result.
In operation S2222B, in a case where the second condition is satisfied and the current adjustment interval is not the minimum value, that is, in a case where there are both a front concurrency number section that is not less than the front concurrency number and less than the concurrency number corresponding to the current optimal pressure measurement result and a rear concurrency number section that is greater than the concurrency number corresponding to the current optimal pressure measurement result and not more than the rear concurrency number, and the current adjustment interval is not the minimum value, the current adjustment interval is decreased. Specifically, under the condition that the previous concurrency number and the subsequent concurrency number both have corresponding pressure measurement results, it can be stated that the current optimal pressure measurement result is more ideal than the pressure measurement result corresponding to the previous concurrency number and the subsequent concurrency number, and it is stated that the concurrency number corresponding to the more ideal pressure measurement result of the server should be located between the previous concurrency number and the subsequent concurrency number and located near the current concurrency number, and the current adjustment interval should be correspondingly reduced.
After operation S2222B, according to the reduced adjustment distance, the front and rear concurrency numbers are re-obtained, that is, operation S2223B is executed, and operation S2221B is returned to obtain the front concurrency number and the rear concurrency number again.
According to an embodiment of the present disclosure, as shown in fig. 5B, the operation S222 may further include, for example, an operation S2224B, that is, in a case where the second condition is satisfied and the current adjustment interval is the minimum value, the current concurrency number and the current adjustment interval are not changed. The current optimal pressure measurement result is shown as follows due to the fact that the second condition is met and the current adjusting distance is the minimum value: and the optimal pressure measurement result in the pressure measurement results corresponding to the concurrency number in the range of the front concurrency number interval and the rear concurrency number interval. And the corresponding pressure measurement result of the current concurrency number is a pressure measurement result which is more in line with the preset condition of the pressure measurement result than other obtained pressure measurement results, so that the current optimal pressure measurement result is the final optimal pressure measurement result. And operation S223 or operation S420 in fig. 4 is selected to be performed according to the determination result of whether the current condition satisfies the stop condition and/or whether the first condition is satisfied.
According to an embodiment of the present disclosure, when the second condition is not satisfied, a specific example may be divided into three cases, and the first case may be, for example, that a third condition is satisfied, that is, there is no operated concurrence number in a previous concurrence number interval that is not less than the previous concurrence number and less than the concurrence number corresponding to the current optimal pressure measurement result, and there is an operated concurrence number in a subsequent concurrence number interval that is greater than the concurrence number corresponding to the current optimal pressure measurement result and not more than the subsequent concurrence number. At this time, as shown in fig. 5C, the operation S222 may further include, for example, operations S2222C to S2225C.
In operation S2222C, the concurrency number corresponding to the current optimal pressure measurement result is reduced according to the current adjustment interval to update the current concurrency number for the first time. The concurrency number corresponding to the current optimal pressure measurement result is reduced according to the current adjustment interval so as to obtain the previous concurrency number.
In the case that the first condition is not satisfied after the current concurrency number is updated for the first time, operation S222 2223C is performed, without changing the current concurrency number and the current adjustment interval after the current concurrency number is updated for the first time, and then operation S223 or operation S420 described with reference to fig. 4 is performed according to an actual situation.
In case that the first condition is satisfied after the current concurrency number is updated for the first time, operation S2224C is performed, that is, the adjustment interval of the concurrency number is decreased. If the current concurrency number after the first update satisfies the first condition, it indicates that the adjustment interval of the current concurrency number is too large, and therefore, the adjustment interval of the concurrency number should be correspondingly decreased, so that in operation S222 2225C, the concurrency number corresponding to the current optimal pressure measurement result is increased according to the decreased adjustment interval to update the current concurrency number for the second time. Then, since the second updated concurrency number is between the last concurrency number and the concurrency number corresponding to the current optimal pressure measurement result, and the last concurrency number is the concurrency number meeting the preset condition, the second updated concurrency number is also the concurrency number meeting the preset condition, after operation S2225C, if the second updated current concurrency number is not running or the current adjustment interval is not the minimum value, operation S223 described with reference to fig. 3A is performed, and if the second updated current concurrency number is running and the current adjustment interval is the minimum value, operation S420 described with reference to fig. 4 is performed.
According to an embodiment of the present disclosure, in a case where the second condition is not satisfied, the second condition may be, for example, that a fourth condition is satisfied, that is, that there is an already-operated concurrency number in a previous concurrency number interval that is not less than the previous concurrency number and less than the concurrency number corresponding to the current optimal pressure measurement result, and there is no already-operated concurrency number in a subsequent concurrency number interval that is greater than the concurrency number corresponding to the current optimal pressure measurement result and not more than the subsequent concurrency number.
In this case, as shown in fig. 5D, the operation S222 may further include, for example, operations S2222D to S2229D (for simplicity, refer to fig. 5D, refer to operations S2221B to S2224B which are not repeated in fig. 5D).
After operation S2221B, operation S2222D is performed to increase the concurrency number corresponding to the current optimal pressure measurement result according to the current adjustment interval to update the current concurrency number for the first time. And the subsequent concurrency interval has no concurrency number which is operated to obtain the pressure measurement result, and the pressure measurement result corresponding to the subsequent concurrency number is obtained first, so that the concurrency number corresponding to the current optimal pressure measurement result is increased according to the current adjustment interval to obtain the subsequent concurrency number.
In the case that the first condition is not satisfied after the first updating of the current concurrency number, operation S222 2223D is performed, that is, the current concurrency number after the first updating and the current adjustment interval are not changed, and then operation S223 or operation S420 described with reference to fig. 4 is selectively performed as appropriate.
After the current concurrency number is updated for the first time, if the first condition is satisfied, operation S222 2224D is executed to decrease the current adjustment interval. This is because if the first condition is not satisfied after the first update, which indicates that the current concurrency number does not satisfy the preset condition, the adjustment interval of the current concurrency number is too large, so the adjustment interval of the concurrency number is correspondingly reduced, and thus in operation S2225D, the concurrency number corresponding to the current optimal pressure measurement result is increased according to the reduced adjustment interval to update the current concurrency number for the second time.
If the first condition is not satisfied after the second update, operation S222 2226D is performed, i.e., the current concurrency number and the decreased adjusted interval after the second update are not changed, and then operation S223 or operation S420 described with reference to fig. 4 is optionally performed.
If the first condition is satisfied after the second update, operation S2227D is performed, that is, the concurrence number corresponding to the optimal pressure measurement result is decreased according to the decreased adjustment interval, so as to update the current concurrence number for the third time. Then, since the updated concurrency number for the third time is between the previous concurrency number and the concurrency number corresponding to the current optimal pressure measurement result, and the previous concurrency number is the concurrency number meeting the preset condition, the updated concurrency number for the third time is also the concurrency number meeting the preset condition, after operation S2227D, if the updated current concurrency number for the third time is not running or the current adjustment interval is not the minimum value, operation S223 described with reference to fig. 3A is performed, and if the updated current concurrency number for the third time is running and the current adjustment interval is the minimum value, operation S420 described with reference to fig. 4 is performed.
According to an embodiment of the present disclosure, in a case where the second condition is not satisfied, the third condition may be, for example, that the fifth condition is satisfied, that is, that there is no running concurrency number in a front concurrency number interval which is not less than the front concurrency number and less than the concurrency number corresponding to the current optimal pressure measurement result, and in a rear concurrency number interval which is greater than the concurrency number corresponding to the current optimal pressure measurement result and not more than the rear concurrency number.
In this case, as shown in fig. 5E, the operation S222 may further include, for example, operations S2222E to S2225E executed in a loop until the current concurrency number after the first update meets the preset condition of the concurrency number or the current concurrency number after the second update does not meet the first condition (for simplicity, refer to fig. 5E, refer to operations S2222B to S2224B which are not repeated in fig. 5E).
Specifically, after operation S2221B, operation S2222E is performed to increase the concurrency number corresponding to the current optimal pressure measurement result according to the current adjustment interval to update the concurrency number for the first time. The method comprises the steps that a current adjustment interval is set, a current concurrency number corresponding to the current optimal pressure measurement result is obtained, and the current adjustment interval is used for adjusting the current concurrency number corresponding to the current optimal pressure measurement result.
If the current concurrency number after the first update meets the preset condition of the concurrency number, executing operation S2226E, that is, the current concurrency number after the first update and the current adjustment interval are not changed, and if the current concurrency number after the first update is the later concurrency number and the current concurrency number is not running, directly executing operation S223 described with reference to fig. 3A, that is, obtaining the pressure measurement result of the current concurrency number.
And if the current concurrency number after the first update does not satisfy the preset condition of the concurrency number, performing operation S222 2223E, and decreasing the concurrency number corresponding to the current optimal pressure measurement result according to the current adjustment interval to update the current concurrency number for the second time. Since there is no running concurrency number of the obtained pressure measurement result in the previous concurrency number interval, considering that the optimal pressure measurement result obtained by the current concurrency number meets the preset condition of the pressure measurement result, some performance indexes (such as response time and the like) may be already substantially in an extreme value, and therefore, the current concurrency number may be larger than the concurrency number corresponding to the optimal performance of the server, and therefore, it is also necessary to obtain the pressure measurement result corresponding to the previous concurrency number to compare with the current optimal pressure measurement result to search the optimal performance of the server, and thus, the previous concurrency number is obtained in the operation S2223E.
If the second updated current concurrency number does not satisfy the first condition, the stop condition of the loop is satisfied, and after the loop is stopped, the operation S223 described with reference to fig. 3A may be executed with the second updated current concurrency number when the current concurrency number satisfies the preset condition of the concurrency number. Or in the case that the current concurrency number after the second update does not satisfy the preset condition of the concurrency number and the adjustment interval of the current concurrency number is the minimum value, the operation S420 described with reference to fig. 4 is executed, and the current optimal pressure measurement result is used as the final optimal pressure measurement result of the server.
If the first condition is satisfied after the current concurrency number is updated for the second time, operations S2224E and S2225E are performed, the current adjustment interval is decreased to update the current adjustment interval, and operation S2222E is returned to. According to the embodiment of the disclosure, since the concurrency number corresponding to the current optimal pressure measurement result does not satisfy the preset condition based on the previous concurrency number and the subsequent concurrency number obtained by the current adjustment interval, the current adjustment interval is too large, and therefore, the adjustment interval of the concurrency number should be appropriately reduced, so as to find the concurrency number corresponding to the optimal performance of the server in the vicinity of the concurrency number corresponding to the current optimal pressure measurement result.
In summary, in the pressure measurement method of the server according to the embodiment of the present disclosure, the method flow of updating the current concurrency number and adjusting the interval under various conditions is taken into consideration comprehensively to ensure the smooth progress of the pressure measurement process, and in the flow of updating the current concurrency number, the increase and decrease of the concurrency number can be adjusted reasonably according to the comparison between the concurrency number and the preset condition of the concurrency number, so that the efficiency of seeking the optimal performance of the server can be improved, and the accuracy of the finally obtained optimal pressure measurement result of the server can be improved.
Fig. 6 schematically shows a flow chart of a pressure measurement method of a server according to still another embodiment of the present disclosure.
By comprehensively considering the update mechanism of the concurrency number in the above-mentioned multiple cases, the implementation of the pressure measurement method of the server according to the embodiment of the present disclosure may be performed according to the flow shown in fig. 6, for example.
Specifically, a pressure measurement task is first obtained, and the operation may be, for example, operation S410 described with reference to fig. 4, which is not described herein again; subsequently, an initial pressure measurement result of the server corresponding to the initial value of the concurrency number is obtained, where the operation may be, for example, operation S210 described with reference to fig. 2, and is not described herein again; then, the initial pressure measurement result is used as an initial value of the optimal pressure measurement result, and based on the current optimal pressure measurement result, the adjustment interval of the concurrency number is determined, which may be, for example, operation S221 described with reference to fig. 3A. And then, judging whether the current optimal pressure measurement result meets the preset condition of the pressure measurement result.
Under the condition that the current optimal pressure measurement result does not satisfy the preset condition of the pressure measurement result, executing the loop described with reference to fig. 5A until the current concurrency number is judged to satisfy the preset condition, or the current concurrency number is judged to not satisfy the preset condition of the concurrency number and the current concurrency number is the minimum value, executing the following operations: and judging whether the condition of the cycle stop is that the current concurrency number does not meet the preset condition of the concurrency number and the current concurrency number is the minimum value, if so, setting the concurrency number to be 0, finishing the pressure measurement, and displaying the current optimal pressure measurement result. If the condition of the cycle stop is not that the current concurrency number does not satisfy the preset condition of the concurrency number and the current concurrency number is the minimum value, the current pressure measurement result of the server corresponding to the current concurrency number is obtained, and the current optimal pressure measurement result is updated, that is, operation S223 described with reference to fig. 3A is executed, and operation S221 described with reference to fig. 3A is returned to be executed.
In a case that the current optimal pressure measurement result meets the preset condition of the pressure measurement result, the pressure measurement result of the concurrency number in the interval of the previous and subsequent concurrency numbers corresponding to the current optimal pressure measurement result is read first, and a specific example may be to perform operation S2221B described with reference to fig. 5B, which is not described herein again. And then judging whether the front concurrency interval and the rear concurrency interval have the concurrency number of the running obtained pressure measurement result.
If the running concurrency number of the obtained pressure measurement result exists in both the front concurrency number interval and the rear concurrency number interval, firstly, judging whether the current adjustment interval is the minimum value, and under the condition that the current adjustment interval is the minimum value, indicating that the pressure measurement result corresponding to the current concurrency number is the final optimal pressure measurement result, so that the current concurrency number and the current adjustment interval are not changed, and executing operation S420 described with reference to FIG. 4 because the current concurrency number is the running concurrency number; and in the case that the current adjustment interval is not the minimum value, performing operations S2222B to S2223B described with reference to fig. 5B, in this case, because a concurrence number capable of obtaining a final optimal pressure measurement result needs to be found near the current concurrence number, after reducing the current adjustment interval, returning to re-perform operation S222 2221B described with reference to fig. 5B, and re-determining whether the previous concurrence interval and the subsequent concurrence interval both have a concurrence number of already-operated pressure measurement results until the current adjustment interval is the minimum value, or not both the previous concurrence interval and the subsequent concurrence interval have a concurrence number of already-operated pressure measurement results.
If the forward concurrency interval and the backward concurrency interval do not have the concurrency number of the operated pressure measurement result, judging whether the forward concurrency interval has the concurrency number of the operated pressure measurement result, and the backward concurrency interval does not have the condition of the operated concurrency number of the pressure measurement result.
If the previous concurrency interval has the concurrency number which has been operated to obtain the pressure measurement result, and the subsequent concurrency interval does not have the concurrency number which has been operated to obtain the pressure measurement result, operation S2222C-operation S2225C described with reference to fig. 5C is executed, where operation S2223C is an operation when the determination result is no in reference to fig. 6 is that whether the current concurrency number does not satisfy the preset condition of the concurrency number and the adjustment interval is not the minimum value, specifically, for example, whether the current concurrency number does not satisfy the preset condition of the concurrency number and the adjustment interval is the minimum value or the current concurrency number has been operated and the adjustment interval is the minimum value may be determined first, if so, the concurrency number is set to 0, and the current optimal pressure measurement result is set as the final optimal pressure measurement result. If the current concurrency number does not belong to the situation that the current concurrency number does not meet the preset condition of the concurrency number and the adjustment interval is the minimum value, or the situation that the current concurrency number runs and the adjustment interval is the minimum value is judged, the current pressure measurement result of the server corresponding to the current concurrency number is obtained, the current optimal pressure measurement result is updated, namely the operation S223 described with reference to the figure 3A is executed, and the operation S221 described with reference to the figure 3A is returned to be executed.
If the condition that the running concurrency number of the pressure measurement result exists in the previous concurrency number interval and the running concurrency number of the pressure measurement result does not exist in the later concurrency number interval, judging whether the condition that the running concurrency number of the pressure measurement result does not exist in the previous concurrency number interval and the running concurrency number of the pressure measurement result exists in the later concurrency number interval.
If there is no concurrency number that has been operated to obtain the pressure measurement result in the previous concurrency number interval and there is a concurrency number that has been operated to obtain the pressure measurement result in the next concurrency number interval, operations S2222D through S2227D described with reference to fig. 5D are performed. Operation S2223D is an operation performed when the current concurrency number is not satisfied with the preset condition of the concurrency number and the adjustment distance is not the minimum value after the current concurrency number is updated for the first time in reference to fig. 6, and the determination result is negative; operation S2226D is the operation performed when determining whether the current concurrency number does not satisfy the preset condition for the concurrency number and the adjustment interval is not the minimum value after updating the current concurrency number in reference to fig. 6, and determining whether the structure is negative, which is specifically similar to the operation performed when the previous concurrency number interval has no concurrency number that has been run to obtain the pressure measurement result, and when the subsequent concurrency number interval has a condition that has been run to obtain the concurrency number of the pressure measurement result, determining whether the current concurrency number does not satisfy the preset condition for the concurrency number and the adjustment interval is not the minimum value, and determining whether the structure is negative, which is not described herein.
If the running concurrency number of the pressure measurement result does not exist in the previous concurrency number interval, and the running concurrency number of the pressure measurement result exists in the later concurrency number interval, that is, the running concurrency number of the pressure measurement result does not exist in the previous concurrency number interval and the later concurrency number interval, operation S222 2222E to operation S2226E described with reference to fig. 5E are executed. Operation S2226E is an operation performed when it is determined whether the current concurrency number does not satisfy the preset condition of the concurrency number in reference to fig. 6, and the determination result is no, because the concurrency number satisfies the preset condition of the concurrency number at this time, it is determined whether the current concurrency number has been operated and the current adjustment interval is the minimum value, if the determination result is yes, it is determined that the pressure measurement result corresponding to the current concurrency number is the final optimal pressure measurement result, and therefore, the pressure measurement process is ended after the concurrency number is set to 0, if the determination result is no, the operation of obtaining the current pressure measurement result of the server corresponding to the current concurrency number and updating the current optimal pressure measurement result is performed, and the subsequent operations are not described herein again.
Fig. 7A to 7B schematically show structural block diagrams of a pressure measurement device of a server according to an embodiment of the present disclosure.
As shown in fig. 7A, the pressure measurement apparatus 700 of the server of this embodiment may include, for example, an obtaining module 710 and a dynamic adjustment module 720.
The obtaining module 710 is configured to obtain an initial pressure measurement result of the server corresponding to an initial value of the concurrency number. According to an embodiment of the present disclosure, the obtaining module 710 may, for example, perform operation S210 described with reference to fig. 2, which is not described herein again.
According to an embodiment of the present disclosure, the dynamic adjustment module 720 may, for example, perform operation S220 described with reference to fig. 2, where operation S220 may specifically include operations described with reference to fig. 3A to 3B, and details are not repeated herein.
According to the embodiment of the present disclosure, as shown in fig. 7B, the dynamic adjustment module 720 may include, for example, an adjustment interval determining submodule 721, a concurrency number updating submodule 722, a pressure measurement result obtaining submodule 723, and an optimal pressure measurement result updating submodule 724, each submodule in the dynamic adjustment module 720 may sequentially perform corresponding operations according to a time sequence loop, in the loop, an initial pressure measurement result is used as an initial value of an optimal pressure measurement result, and the loop is stopped until a stop condition is met.
The adjustment distance determining submodule 721 is configured to determine an adjustment distance based on the current optimal pressure measurement result; the concurrency number updating submodule 722 is configured to update the current concurrency number and/or the current adjustment interval according to the adjustment interval determined by the adjustment interval determining submodule 721 and the concurrency number corresponding to the current optimal pressure measurement result; the pressure measurement result obtaining submodule 723 is configured to obtain a current pressure measurement result of the server corresponding to the current concurrency number under the condition that the stop condition is not met and the first condition is not met after the concurrency number updating submodule 722 updates the current concurrency number and/or the current adjustment interval, and the optimal pressure measurement result updating submodule 724 is configured to update the current optimal pressure measurement result based on the current pressure measurement result obtained by the pressure measurement result obtaining submodule 723, so that the adjustment interval determining submodule 721 determines the adjustment interval. According to the embodiment of the present disclosure, the adjustment distance determining submodule 721, the concurrency number updating submodule 722, the pressure measurement result obtaining submodule 723, and the optimal pressure measurement result updating submodule 724 are respectively configured to perform operations S221 to S224 described with reference to fig. 3A, and are not described herein again.
According to an embodiment of the present disclosure, as shown in fig. 7B, the dynamic adjustment module 720 may further include, for example, a system resource occupancy obtaining sub-module 725, configured to obtain a system resource occupancy of the server corresponding to the concurrency number corresponding to the current optimal pressure measurement result, and accordingly, the adjustment distance determining sub-module 721 may determine the adjustment distance of the concurrency number, for example, based on the current optimal pressure measurement result and the system resource occupancy. According to the embodiment of the present disclosure, the system resource occupancy obtaining sub-module 725 may, for example, perform the operation S225 described with reference to fig. 3B, and the adjustment distance determining sub-module 721 may, for example, also perform the operation S226 described with reference to fig. 3B, which is not described herein again.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any number of the obtaining module 710, the dynamic adjusting module 720, the adjustment interval determining submodule 721, the concurrency number updating submodule 722, the pressure measurement result obtaining submodule 723, the optimal pressure measurement result updating submodule 724, and the system resource occupancy obtaining submodule 725 may be combined into one module to be implemented, or any one of the modules may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to the embodiment of the present disclosure, at least one of the obtaining module 710, the dynamic adjusting module 720, the adjustment distance determining submodule 721, the concurrency number updating submodule 722, the pressure measurement result obtaining submodule 723, the optimal pressure measurement result updating submodule 724, and the system resource occupancy obtaining submodule 725 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of software, hardware, and firmware implementation manners or any suitable combination of any of them. Alternatively, at least one of the obtaining module 710, the dynamic adjusting module 720, the adjustment interval determining submodule 721, the concurrency number updating submodule 722, the pressure measurement result obtaining submodule 723, the optimal pressure measurement result updating submodule 724 and the system resource occupancy obtaining submodule 725 may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be executed.
FIG. 8 schematically illustrates a block diagram of a computer system suitable for implementing the above-described method according to an embodiment of the present disclosure. The computer system illustrated in FIG. 8 is only one example and should not impose any limitations on the scope of use or functionality of embodiments of the disclosure.
As shown in fig. 8, a computer system 800 according to an embodiment of the present disclosure includes a processor 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. The processor 801 may include, for example, a general purpose microprocessor (e.g., CPU), an instruction set processor and/or related chip sets and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flows according to embodiments of the present disclosure.
In the RAM 803, various programs and data necessary for the operation of the system 800 are stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. The processor 801 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 802 and/or RAM 803. Note that the programs may also be stored in one or more memories other than the ROM 802 and RAM 803. The processor 801 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
System 800 may also include an input/output (I/O) interface 805, also connected to bus 804, according to an embodiment of the disclosure. The system 800 may also include one or more of the following components connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program, when executed by the processor 801, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable medium, which may be embodied in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, a computer readable medium may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, optical fiber cable, radio frequency signals, etc., or any suitable combination of the foregoing.
For example, according to embodiments of the present disclosure, a computer-readable medium may include one or more memories other than ROM 802 and/or RAM 803 and/or ROM 802 and RAM 803 described above.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (12)

1. A server pressure measurement method for detecting a peak concurrency number that can be borne by a server, where the concurrency number includes a number of online users interacting with the server at the same time, the method comprising:
acquiring an initial pressure measurement result of the server corresponding to the initial value of the concurrency number; and
dynamically adjusting the optimal pressure measurement result, including circularly executing the following operations with the initial pressure measurement result as an initial value of the optimal pressure measurement result until a stop condition is satisfied:
determining the adjustment interval of the concurrency number according to the current optimal pressure measurement result and the preset condition of the pressure measurement result;
under the condition that the current optimal pressure measurement result meets the preset condition of the pressure measurement result, updating the current concurrency number and/or the current adjustment interval according to the adjustment interval and the concurrency number corresponding to the current optimal pressure measurement result; and
in the case where the stop condition is not satisfied and the first condition is not satisfied:
obtaining a current pressure measurement result of the server corresponding to the current concurrency number;
updating a current optimal pressure measurement result based on the current pressure measurement result,
the stopping condition comprises that the current concurrency number is operated and the current adjusting interval is the minimum value, or the current concurrency number does not meet the preset condition of the concurrency number and the current adjusting interval is the minimum value, and the first condition comprises that the current concurrency number does not meet the preset condition of the concurrency number and the current adjusting interval is not the minimum value;
wherein updating the current concurrency number and/or the current adjustment interval comprises:
respectively obtaining a front concurrency number obtained by subtracting the current adjusting distance from a concurrency number corresponding to the current optimal pressure measurement result, and a rear concurrency number obtained by adding the current adjusting distance;
reducing the current adjusting interval and returning to reacquire the front concurrence number and the rear concurrence number under the condition that the second condition is met and the current adjusting interval is not the minimum value, and reducing the current adjusting interval under the condition that the second condition is met and the current adjusting interval is not the minimum value until the current adjusting interval is the minimum value,
wherein the second condition is: the running concurrency number exists in a front concurrency number interval which is not less than the front concurrency number and less than the concurrency number corresponding to the current optimal pressure measurement result, and a back concurrency number interval which is more than the concurrency number corresponding to the current optimal pressure measurement result and not more than the back concurrency number.
2. The method of claim 1, wherein cycling through the initial values of the initial pressure measurement and the optimal pressure measurement until a stop condition is satisfied further comprises:
acquiring a system resource occupancy of the server corresponding to the concurrency number corresponding to the current optimal pressure measurement result; and
and determining the adjusting distance based on the current optimal pressure measurement result and the system resource occupancy.
3. The method of claim 1, further comprising:
acquiring a pressure measurement task, wherein the pressure measurement task specifies an initial value of the concurrency number, a minimum value of the adjustment interval, a preset condition of the concurrency number and/or a preset condition of a pressure measurement result; and/or
And setting the current concurrency number to 0 when a stop condition is met.
4. The method of claim 3, wherein, in the case that the current optimal pressure measurement result does not satisfy the preset condition of the pressure measurement result, updating the current concurrency number and/or the current adjustment interval according to the adjustment interval and the concurrency number corresponding to the current optimal pressure measurement result comprises:
the following operations are performed in a loop until the first condition is not satisfied:
according to the current adjusting distance, reducing the concurrency number corresponding to the current optimal pressure measurement result to update the current concurrency number; and
and under the condition that a first condition is met after the current concurrency number is updated, reducing the current adjusting interval to update the current adjusting interval.
5. The method of claim 3, wherein updating the current concurrency number and/or the current adjustment interval comprises:
in the event that a second condition is satisfied and a current adjustment spacing is a minimum value, the current concurrency number and the current adjustment spacing are not changed.
6. The method of claim 5, wherein updating the current concurrency number and/or the current adjustment interval according to the adjustment interval and the concurrency number corresponding to the current optimal pressure measurement result when the current optimal pressure measurement result meets a preset condition of the pressure measurement result further comprises:
in the case where the third condition is satisfied:
according to the current adjusting distance, reducing the concurrency number corresponding to the current optimal pressure measurement result to update the current concurrency number for the first time;
under the condition that the first condition is not met after the current concurrency number is updated for the first time, the current concurrency number and the current adjusting distance after the current concurrency number is updated for the first time are not changed;
in the event that the first condition is satisfied after the current concurrency number is updated for the first time:
decreasing the current adjustment spacing;
increasing the concurrency number corresponding to the current optimal pressure measurement result according to the decreased current adjustment interval to update the current concurrency number for the second time,
wherein the third condition is: the running concurrency number does not exist in a front concurrency number interval which is not less than the front concurrency number and less than the concurrency number corresponding to the current optimal pressure measurement result, and the running concurrency number does exist in a back concurrency number interval which is greater than the concurrency number corresponding to the current optimal pressure measurement result and not greater than the back concurrency number.
7. The method of claim 5, wherein updating the current concurrency number and/or the current adjustment interval according to the adjustment interval and the concurrency number corresponding to the current optimal pressure measurement result when the current optimal pressure measurement result meets a preset condition of the pressure measurement result further comprises:
in the case where the fourth condition is satisfied:
according to the current adjusting distance, increasing the concurrency number corresponding to the current optimal pressure measurement result to update the current concurrency number for the first time;
under the condition that the first condition is not met after the current concurrency number is updated for the first time, the current concurrency number and the current adjusting distance after the current concurrency number is updated for the first time are not changed;
in the event that the first condition is satisfied after the current concurrency number is updated for the first time:
decreasing the current adjustment spacing;
according to the reduced current adjusting distance, increasing the concurrency number corresponding to the current optimal pressure measurement result to update the current concurrency number for the second time;
under the condition that the current concurrency number does not meet the first condition after the current concurrency number is updated for the second time, the current concurrency number after the current concurrency number is updated for the second time and the current adjustment distance after the current concurrency number is reduced are not changed;
reducing the concurrence number corresponding to the current optimal pressure measurement result according to the reduced adjustment interval to update the current concurrence number for the third time under the condition that the current concurrence number is updated for the second time and then meets the first condition,
wherein the fourth condition is: the running concurrency number exists in a front concurrency number interval which is not less than the front concurrency number and less than the concurrency number corresponding to the current optimal pressure measurement result, and the running concurrency number does not exist in a back concurrency number interval which is greater than the concurrency number corresponding to the current optimal pressure measurement result and not greater than the back concurrency number.
8. The method of claim 5, wherein updating the current concurrency number and/or the current adjustment interval according to the adjustment interval and the concurrency number corresponding to the current optimal pressure measurement result when the current optimal pressure measurement result meets a preset condition of the pressure measurement result further comprises:
under the condition that a fifth condition is met, circularly executing the following operations until the current concurrency number after the first updating meets a preset condition of the concurrency number or the current concurrency number after the second updating does not meet the first condition:
according to the current adjusting distance, increasing the concurrency number corresponding to the current optimal pressure measurement result to update the current concurrency number for the first time;
under the condition that the current concurrency number after the first updating does not meet the preset condition of the concurrency number:
according to the current adjusting distance, reducing the concurrency number corresponding to the current optimal pressure measurement result to update the current concurrency number for the second time;
decreasing the current adjustment interval to update the current adjustment interval in a case where a first condition is satisfied after the current concurrency number is updated for a second time,
wherein the fifth condition is: the running concurrency number does not exist in a front concurrency number interval which is not less than the front concurrency number and less than the concurrency number corresponding to the current optimal pressure measurement result, and a back concurrency number interval which is more than the concurrency number corresponding to the current optimal pressure measurement result and not more than the back concurrency number.
9. The method of claim 3, wherein:
the pressure measurement result comprises at least one of the following:
a response time of the server;
a response error rate of the server; and/or
A maximum system throughput of the server; and/or
The preset condition of the pressure measurement result comprises at least one of the following conditions:
the response time of the server is not higher than the preset response time;
the response error rate of the server is not higher than a preset error rate; and/or
The maximum system throughput of the server is not higher than a preset throughput; and/or
The preset conditions of the concurrency number comprise: the concurrency number is not less than a first preset value and/or not more than a second preset value, wherein the first preset value is less than the second preset value.
10. A pressure measurement apparatus of a server, configured to detect a peak concurrency number that the server can withstand, where the concurrency number includes a number of online users interacting with the server at a same time, the apparatus comprising:
the acquisition module is used for acquiring an initial pressure measurement result of the server corresponding to the initial value of the concurrency number; and
and the dynamic adjustment module is used for dynamically adjusting the optimal pressure measurement result, and comprises the following operation which is circularly executed by taking the initial pressure measurement result as the initial value of the optimal pressure measurement result until the stop condition is met:
determining the adjustment interval of the concurrency number according to the current optimal pressure measurement result and the preset condition of the pressure measurement result;
updating the current concurrency number and/or the current adjusting interval under the condition that the current optimal pressure measurement result meets the preset condition of the pressure measurement result; and
in the case where the stop condition is not satisfied and the first condition is not satisfied:
obtaining a current pressure measurement result of the server corresponding to the current concurrency number;
updating a current optimal pressure measurement result based on the current pressure measurement result,
the stopping condition comprises that the current concurrency number is operated and the current adjusting interval is the minimum value, or the current concurrency number does not meet the preset condition of the concurrency number and the current adjusting interval is the minimum value, and the first condition comprises that the current concurrency number does not meet the preset condition of the concurrency number and the current adjusting interval is not the minimum value;
wherein updating the current concurrency number and/or the current adjustment interval comprises:
respectively obtaining a front concurrency number obtained by subtracting the current adjusting distance from a concurrency number corresponding to the current optimal pressure measurement result, and a rear concurrency number obtained by adding the current adjusting distance; and
reducing the current adjusting interval and returning to reacquire the front concurrence number and the rear concurrence number under the condition that the second condition is met and the current adjusting interval is not the minimum value, and reducing the current adjusting interval under the condition that the second condition is met and the current adjusting interval is not the minimum value until the current adjusting interval is the minimum value,
wherein the second condition is: the running concurrency number exists in a front concurrency number interval which is not less than the front concurrency number and less than the concurrency number corresponding to the current optimal pressure measurement result, and a back concurrency number interval which is more than the concurrency number corresponding to the current optimal pressure measurement result and not more than the back concurrency number.
11. A pressure measurement system of a server, comprising:
one or more processors;
a storage device for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-9.
12. A computer readable medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 9.
CN201810657782.4A 2018-06-22 2018-06-22 Pressure measurement method, device and system of server Active CN110635961B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810657782.4A CN110635961B (en) 2018-06-22 2018-06-22 Pressure measurement method, device and system of server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810657782.4A CN110635961B (en) 2018-06-22 2018-06-22 Pressure measurement method, device and system of server

Publications (2)

Publication Number Publication Date
CN110635961A CN110635961A (en) 2019-12-31
CN110635961B true CN110635961B (en) 2022-08-09

Family

ID=68966629

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810657782.4A Active CN110635961B (en) 2018-06-22 2018-06-22 Pressure measurement method, device and system of server

Country Status (1)

Country Link
CN (1) CN110635961B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112685271A (en) * 2020-12-23 2021-04-20 北京字节跳动网络技术有限公司 Pressure measurement data processing method and device, electronic equipment and readable storage medium
CN112765019B (en) * 2021-01-13 2024-01-19 北京鼎事兴教育咨询有限公司 Pressure measurement method and device, storage medium and electronic equipment
CN113704031B (en) * 2021-08-06 2023-10-10 北京罗克维尔斯科技有限公司 System pressure testing method, device, medium and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107124445A (en) * 2017-03-31 2017-09-01 北京奇艺世纪科技有限公司 A kind of collecting method and device
CN107480015A (en) * 2017-07-04 2017-12-15 网易(杭州)网络有限公司 Load test approach, device, system, storage medium and pressure survey server
CN107835101A (en) * 2017-10-19 2018-03-23 厦门美柚信息科技有限公司 Method and device, the terminal of pressure test are carried out to server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7395187B2 (en) * 2006-02-06 2008-07-01 International Business Machines Corporation System and method for recording behavior history for abnormality detection

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107124445A (en) * 2017-03-31 2017-09-01 北京奇艺世纪科技有限公司 A kind of collecting method and device
CN107480015A (en) * 2017-07-04 2017-12-15 网易(杭州)网络有限公司 Load test approach, device, system, storage medium and pressure survey server
CN107835101A (en) * 2017-10-19 2018-03-23 厦门美柚信息科技有限公司 Method and device, the terminal of pressure test are carried out to server

Also Published As

Publication number Publication date
CN110635961A (en) 2019-12-31

Similar Documents

Publication Publication Date Title
CN109408205B (en) Task scheduling method and device based on hadoop cluster
CN110635961B (en) Pressure measurement method, device and system of server
CN114416512A (en) Test method, test device, electronic equipment and computer storage medium
CN111125107A (en) Data processing method, device, electronic equipment and medium
CN110766185A (en) User quantity determination method and system, and computer system
US20150378879A1 (en) Methods, software, and systems for software testing
CN105630683A (en) Cloud testing architecture
US20170031720A1 (en) Deploying software in a multi-instance node
CA3059719A1 (en) Payment processing method, device, medium and electronic device
CN112597126A (en) Data migration method and device
CN114817050A (en) Task execution method and device, electronic equipment and computer readable storage medium
CN112965916B (en) Page testing method, page testing device, electronic equipment and readable storage medium
CN113392018B (en) Traffic distribution method and device, storage medium and electronic equipment
CN110717992B (en) Method, apparatus, computer system and readable storage medium for scheduling model
CN111930629A (en) Page testing method and device, electronic equipment and storage medium
CN113758689A (en) Method and device for testing chassis characteristics of drivable equipment
CN112506781B (en) Test monitoring method, device, electronic equipment, storage medium and program product
CN114637809A (en) Method, device, electronic equipment and medium for dynamic configuration of synchronous delay time
CN111859403B (en) Dependency vulnerability determination method and device, electronic equipment and storage medium
CN113392010A (en) Common component testing method and device, electronic equipment and storage medium
CN108777062B (en) Method and apparatus for outputting information
CN113760675A (en) Load prediction method and apparatus, electronic device, and computer-readable storage medium
CN113778844A (en) Automatic performance testing method and device
CN110704320A (en) Control operation method and device
CN112882921A (en) Fault simulation method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant