CN110213104B - Capacity prediction method and device - Google Patents

Capacity prediction method and device Download PDF

Info

Publication number
CN110213104B
CN110213104B CN201910487613.5A CN201910487613A CN110213104B CN 110213104 B CN110213104 B CN 110213104B CN 201910487613 A CN201910487613 A CN 201910487613A CN 110213104 B CN110213104 B CN 110213104B
Authority
CN
China
Prior art keywords
time period
request list
flow
capacity
estimated
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
CN201910487613.5A
Other languages
Chinese (zh)
Other versions
CN110213104A (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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910487613.5A priority Critical patent/CN110213104B/en
Publication of CN110213104A publication Critical patent/CN110213104A/en
Application granted granted Critical
Publication of CN110213104B publication Critical patent/CN110213104B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/147Network analysis or design for predicting network behaviour
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports
    • H04L43/067Generation of reports using time frame reporting
    • 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

Abstract

The embodiment of the invention provides a capacity testing method and device. The method comprises the following steps: acquiring the estimated flow of the equipment to be tested in a target time period according to the flow of the equipment to be tested before the target time period; constructing a test request list according to the estimated flow of the tested equipment in the target time period; and inputting the test request list into the tested device to acquire the capacity of the tested device. The embodiment of the invention can reduce the labor consumption of the capacity test and improve the efficiency of the capacity test.

Description

Capacity prediction method and device
Technical Field
The present invention relates to the field of network technologies, and in particular, to a capacity prediction method and apparatus.
Background
The capacity can be regarded as a performance indicator of the system, which is used to indicate the limit value or limit value of the system under certain conditions. The purpose of the capacity test is to analyze in advance a limit value of some index reflecting the application characteristics of the system through the test, and the limit value can be the maximum number of concurrent users, the number of database records and the like. The system does not have any problem in the limit state or can keep the main function to normally operate, and when the limit value is exceeded, the system can be in a situation that the system cannot normally operate, such as breakdown and the like. The capacity test can also determine the maximum load or workload that a test subject can continue to process within a given time. The system load is accurately predicted, the trust degree of the system performance can be improved, meanwhile, a system builder can be helped to economically plan an application system, and the deployment of the system is optimized.
Disclosure of Invention
Embodiments of the present invention provide a capacity prediction method and apparatus, so as to solve one or more technical problems in the prior art.
In a first aspect, an embodiment of the present invention provides a capacity testing method, including:
acquiring the estimated flow of the equipment to be tested in a target time period according to the flow of the equipment to be tested before the target time period;
constructing a test request list according to the estimated flow of the tested equipment in the target time period;
and inputting the test request list into the tested device to acquire the capacity of the tested device.
In one embodiment, obtaining an estimated flow rate of a device under test in a target time period according to the flow rate of the device under test before the target time period includes:
calculating the ratio of the flow of a first time period to the flow of a second time period, wherein the first time period and the second time period are in a first time period;
multiplying the ratio by the flow of a third time period to obtain the estimated flow of the tested equipment in the target time period, wherein the third time period and the target time period are in a second time period;
the first time period, the second time period and the third time period are before the target time period, the first time period is before the second time period, the first time period and the second time period have the same period length, the length of the first time period and the target time period is a first set value, and the length of the second time period and the third time period is a second set value.
In one embodiment, constructing a test request list according to the estimated flow of the device under test in a target time period includes:
acquiring an estimated request list according to the estimated flow;
verifying the estimated request list according to a preset request list composition proportion to obtain a verification result;
and adjusting the pre-estimated request list according to the verification result to obtain the test request list.
In one embodiment, the device under test is a map navigation server cluster; obtaining a pre-estimated request list according to the pre-estimated flow, wherein the pre-estimated request list comprises the following steps:
converting the estimated flow into a basic request list;
replacing the starting point information and the end point information in the basic request list according to the starting point information and the end point information in the flow log before the target time period to obtain a preliminary deployment request list;
adjusting the proportion of request sources in the primary allocation request list to obtain a secondary allocation request list;
and adjusting the composition proportion of the secondary allocation request list according to a preset rule to obtain an estimated request list.
In an embodiment, after inputting the test request list into the device under test and acquiring the capacity of the device under test, the method further includes:
and expanding the capacity of the tested equipment according to the capacity of the tested equipment and the estimated flow.
In one embodiment, the method for expanding the capacity of the device under test according to the capacity of the device under test includes:
and respectively calculating the reserved quantity of each tested device by adopting the following formula:
Figure BDA0002085914570000021
wherein k is the total number of the devices, Buffer is the reserved quantity of the ith device, and niEstimated flow for the ith device, njEstimated flow for the jth device, nmThe maximum value of the estimated flow of the plurality of devices;
and respectively calculating the expansion capacity of each tested device according to the reserved quantity and the estimated flow of each tested device.
In a second aspect, an embodiment of the present invention provides a capacity testing apparatus, including:
a flow estimation module: the method comprises the steps of obtaining estimated flow of the tested equipment in a target time period according to the flow of the tested equipment before the target time period;
a test request list construction module: the device is used for constructing a test request list according to the estimated flow of the tested device in the target time period;
a capacity acquisition module: and the device is used for inputting the test request list into the tested device and acquiring the capacity of the tested device.
In one embodiment, the flow estimation module comprises:
the geometric proportion calculation unit: the flow rate of the first time period and the flow rate of the second time period are calculated, and the first time period and the second time period are in a first time period;
an annular ratio calculation unit: the flow rate of the tested device in a third time period is obtained by multiplying the ratio by the flow rate in the third time period, and the third time period and the target time period are in a second time period;
the first time period, the second time period and the third time period are before the target time period, the first time period is before the second time period, the first time period and the second time period have the same period length, the length of the first time period and the target time period is a first set value, and the length of the second time period and the third time period is a second set value.
In one embodiment, the test request list construction module includes:
an estimation request list acquisition unit: the system is used for acquiring an estimated request list according to the estimated flow;
a checking unit: the system is used for verifying the pre-estimated request list according to a preset request list composition proportion to obtain a verification result;
a checking and adjusting unit: and the system is used for adjusting the pre-estimated request list according to the verification result to obtain the test request list.
In one embodiment, the device under test is a map navigation server cluster; the estimation request list obtaining unit includes:
transformant unit: the system is used for converting the estimated flow into a basic request list;
a first blending subunit: the system comprises a basic request list, a primary allocation request list and a secondary allocation request list, wherein the basic request list is used for acquiring flow logs of a target time period;
a second blending subunit: the system is used for adjusting the proportion of request sources in the preliminary allocation request list to obtain a secondary allocation request list;
a third blending subunit: and the system is used for adjusting the composition proportion of the secondary allocation request list according to a preset rule to obtain an estimated request list.
In one embodiment, the apparatus further comprises:
capacity expansion module: and the capacity expansion device is used for expanding the capacity of the tested equipment according to the capacity of the tested equipment and the estimated flow.
In one embodiment, the capacity expansion module includes:
a reserve amount calculation unit: for calculating the reserved quantity of each tested device respectively by adopting the following formula:
Figure BDA0002085914570000041
wherein k is the total number of the devices, Buffer is the reserved quantity of the ith device, and niEstimated flow for the ith device, njEstimated flow for the jth device, nmThe maximum value of the estimated flow of the plurality of devices;
an extended capacity calculation unit: and the method is used for respectively calculating the extended capacity of each tested device according to the reserved quantity and the estimated flow of each tested device.
In a third aspect, an embodiment of the present invention provides a capacity testing apparatus, where functions of the apparatus may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described functions.
In one possible design, the apparatus includes a processor and a memory, the memory is used for storing a program supporting the apparatus to execute the capacity testing method, and the processor is configured to execute the program stored in the memory. The apparatus may also include a communication interface for communicating with other devices or a communication network.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium for storing computer software instructions for a capacity testing apparatus, which includes a program for executing the capacity testing method.
One of the above technical solutions has the following advantages or beneficial effects:
in the embodiment of the invention, the capacity of the tested equipment is tested through the estimated flow of the tested equipment, the tested equipment can be uniformly tested, a test request list does not need to be independently constructed for each component module of the tested equipment, and a large amount of manpower is saved. Meanwhile, the embodiment of the invention can also simulate the flow at any time point, and has wider application range.
The foregoing summary is provided for the purpose of description only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present invention will be readily apparent by reference to the drawings and following detailed description.
Drawings
In the drawings, like reference numerals refer to the same or similar parts or elements throughout the several views unless otherwise specified. The figures are not necessarily to scale. It is appreciated that these drawings depict only some embodiments in accordance with the disclosure and are therefore not to be considered limiting of its scope.
FIG. 1 shows a flow diagram of a capacity testing method according to an embodiment of the invention.
FIG. 2 shows a flow diagram of a capacity testing method according to an embodiment of the invention.
FIG. 3 illustrates a flow diagram for map navigation according to an embodiment of the present invention.
FIG. 4 shows a flow diagram of a capacity testing method according to an embodiment of the invention.
Fig. 5 is a block diagram showing a configuration of a capacity testing apparatus according to an embodiment of the present invention.
Fig. 6 is a block diagram showing a configuration of a capacity testing apparatus according to an embodiment of the present invention.
Fig. 7 shows a block diagram of a configuration of a capacity testing apparatus according to an embodiment of the present invention.
Detailed Description
In the following, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments may be modified in various different ways, all without departing from the spirit or scope of the present invention. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive.
FIG. 1 shows a flow diagram of a capacity testing method according to an embodiment of the invention. As shown in fig. 1, the capacity testing method includes:
step S11: and acquiring the estimated flow of the tested equipment in the target time period according to the flow of the tested equipment before the target time period.
Step S12: and constructing a test request list according to the estimated flow of the tested equipment in the target time period.
Step S13: and inputting the test request list into the tested device to acquire the capacity of the tested device.
In the embodiment of the present invention, the target time period may be a time period calculated according to a certain time unit, for example: year, month, day, hour, minute, etc. If the target time period is year, such as 2006, then the flow rate before the target time period is the flow rate before 2006.
In the embodiment of the present invention, the test request list includes a plurality of test requests, which may also be referred to as a prediction request set. The tested device can be tested by using the test request list, and generally, the more test requests in the test request list, the larger the estimated flow of the target time period.
And inputting the test request list into the tested device to obtain the capacity of the tested device. For example, the test request in the test request list is input to the device under test, and the accumulated flow when the working state of the device under test is abnormal is the capacity of the device under test.
In the embodiment of the present invention, the device under test may be any device that processes certain flow data, such as a server, a server cluster, and the like.
In the embodiment of the invention, the capacity of the tested equipment is tested through the estimated flow of the tested equipment, the tested equipment can be uniformly tested, a test request list does not need to be independently constructed for each component module of the tested equipment, and a large amount of manpower is saved. Meanwhile, the embodiment of the invention can also simulate the flow at any time point, and has wider application range.
In some embodiments of the present invention, the expected result of the capacity test is the maximum value of the flow that the device under test can withstand, so the estimated flow can be estimated according to the peak value of the flow in a certain time period between the target time periods.
In one embodiment, obtaining an estimated flow rate of a device under test in a target time period according to the flow rate of the device under test before the target time period includes:
calculating the ratio of the flow of a first time period to the flow of a second time period, wherein the first time period and the second time period are in a first time period;
multiplying the ratio by the flow of a third time period to obtain the estimated flow of the tested equipment in the target time period, wherein the third time period and the target time period are in a second time period;
the first time period, the second time period and the third time period are before the target time period, the first time period is before the second time period, the lengths of the first time period and the target time period are a first set value, the lengths of the second time period and the third time period are a second set value, and the first time period and the second time period have the same period length.
In the embodiment of the present invention, the first time period and the second time period may have the same period length, for example, the first time period is a natural year, and the second time period is also a natural year. For another example, the first time period is a natural month, and the second time period is also a natural month. The first time period precedes the second time period, e.g., the first time period is 2015, and the second time period is 2015 followed by natural years, which may be 2016-2018. As another example, the first time period is 2015 year 9 month, and the second time period is 2015 month before 9 month, such as 2014 month 11.
In the embodiment of the present invention, the estimated flow rate of the target time zone is equal to the flow rate of the first time zone/the flow rate of the second time zone × the flow rate of the third time zone. The target time period may have a correspondence with the first time period, and the second time period may have a correspondence with the third time period. Specifically, the target time period and the first time period may be at the same position of different time periods, and the second time period and the third time period may be at the same position of different time periods.
For example, the first time period is 2014 and the second time period is 2015. The target time period is 2015, 9 months, and the first time period, the third time period and the second time period are all time periods before the target time period. The first time period corresponding to the target time period may be 9 months of 2014. If the second time period selected during the first time period is 2014-8 months, the third time period selected during the second time period may 2015-8 months. If the second time period selected during the first time period is 2014-7 months, the third time period selected during the second time period may be 2015-7 months.
For another example, the first time period is 2014, and the second time period is 2015. The target time period is 2015, 9, month, 1 day, and the first time period corresponding to the target time period is 2014, 9, month, 1 day. If the second time period selected during the first time period is 2014, 8, 1, day, then the third time period selected during the second time period is 2015, 8, 1, day.
In one embodiment, constructing a test request list according to the estimated flow of the device under test in a target time period includes:
acquiring an estimated request list according to the estimated flow;
verifying the estimated request list according to a preset request list composition proportion to obtain a verification result;
and adjusting the pre-estimated request list according to the verification result to obtain the test request list.
In the embodiment of the present invention, the request list may include various types of requests, and the proportional relationship of the requests may be referred to as the composition proportion of the request list. In order to make the test request list used in the test as close as possible to the actual request list, the composition ratio of the request list may be preset according to the history data.
In the embodiment of the present invention, the pre-estimated request list is adjusted according to the verification result, for example, if the verification result indicates that the composition ratio of the first type of requests in the pre-estimated request list is lower than the corresponding preset ratio, the number of the first type of requests is increased. For another example, if the check result indicates that the composition ratio of the second type of requests in the estimated request list is higher than the corresponding preset ratio, the number of the second type of requests is reduced.
In one embodiment, the device under test is a map navigation server cluster; obtaining a pre-estimated request list according to the pre-estimated flow, wherein the pre-estimated request list comprises the following steps:
converting the estimated flow into a basic request list;
replacing the starting point information and the end point information in the basic request list according to the starting point information and the end point information in the flow log before the target time period to obtain a preliminary deployment request list;
adjusting the proportion of request sources in the primary allocation request list to obtain a secondary allocation request list;
and adjusting the composition proportion of the secondary allocation request list according to a preset rule to obtain an estimated request list.
The map as a tool product has high requirements on-line stability and usability, and particularly during holidays, people increasingly rely on mobile phone maps for traveling. Therefore, an effective and accurate capacity testing method is urgently needed to accurately evaluate the capacity of the map navigation server, guarantee the travel of users, improve the stability of products and attract more users to use. The embodiment of the invention provides a method for testing the capacity of a map navigation server cluster, which can test the map navigation server cluster under the conditions of low cost and low labor consumption and has better test effect and wider application range.
In the embodiment of the present invention, if the device under test is a map navigation server cluster, the test request list includes a plurality of map navigation requests, including a route calculation request, a location search request, a distance calculation request, a time calculation request, and the like. Map navigation request data is distinguished from other types of network data in that the requests are typically continuous requests, with an association between requests. In addition, the number of map navigation requests on holidays is greatly different from the number of workdays, and the road distance, the traffic source and the like are also greatly different. For example, on holidays, the amount of navigation requests for travel hot spots increases. In cold weather, the long distance navigation request amount is increased. Thirdly, the downstream modules of the map navigation system are numerous, and the time points of the modules reaching the peak value are different. For example, there is a difference between traffic request peak time points and route request peak time points. Based on the particularity of the map navigation service, the request amount of the map navigation service may often greatly change due to different time periods, and the capacity prediction has higher importance for the map navigation service.
In the embodiment of the present invention, the composition ratio of the secondary allocation request list is adjusted according to a preset rule, and the secondary allocation request list may be adjusted according to a rule related to the start point information and the end point information and another preset rule other than the rule related to the request source ratio.
FIG. 2 shows a flow diagram of a capacity testing method according to an embodiment of the invention. In this embodiment, the steps S11-S13 can refer to the related descriptions in the above embodiments, and are not described herein again.
The difference from the above embodiment is that, as shown in fig. 2, after the inputting the test request list into the device under test and acquiring the capacity of the device under test, the method further includes:
step S21: and expanding the capacity of the tested equipment according to the capacity of the tested equipment and the estimated flow.
In the embodiment of the present invention, the measured device is expanded according to the capacity of the measured device and the estimated flow, which may be expanded according to a difference value obtained by subtracting the capacity of the measured device from the estimated flow, so that the expanded capacity is not less than the estimated flow. Therefore, the tested equipment can work normally under the condition that the actual flow does not exceed the estimated flow.
In one embodiment, the method for expanding the capacity of the device under test according to the capacity of the device under test includes:
and respectively calculating the reserved quantity of each tested device by adopting the following formula:
Figure BDA0002085914570000101
wherein k is the total number of the devices, Buffer is the reserved quantity of the ith device, and niEstimated flow for the ith device, njEstimated flow for the jth device, nmThe maximum value of the estimated flow of the plurality of devices;
and respectively calculating the expansion capacity of each tested device according to the reserved quantity and the estimated flow of each tested device.
In an example of the invention, the tested devices are map navigation server clusters and are distributed in 4 machine rooms. Each module under the navigation service system is distributed in a certain number in 4 machine rooms. Map navigation is a continuous and contextually relevant process, mainly involving initial state storage, REmote DIctionary Server (REmote DIctionary service) content verification, and the like. The map navigation service process is shown in fig. 3, and includes:
step S31: start point information and end point information are received. The start point information and the end point information are information input by the navigation service requester.
Step S32: and judging whether a plurality of starting points or a plurality of end points exist or not according to the starting point information and the end point information, if so, entering step S33, otherwise, acquiring the starting points and the end points, and entering step S34.
Step S33: and receiving license plate information and selection preference information. The license plate information and the selection preference information are information input by the navigation service requester.
Step S34: based on the selection information, a start point or an end point is selected.
Step S35: routes are calculated and arranged. For example, a plurality of routes are displayed in an order of the degree of optimization, or the first three best routes are selected and displayed.
Step S36: navigation is initiated based on the routing information. In an example of the present invention, the routing information is information input by a navigation service requester.
Step S37: and judging whether the route ahead of the line stored in the cache is acquired, if so, entering step S39, otherwise, entering step S38. In this example, the previous trip requests a historical route of the navigation service.
Step S39: and recalculating the route from the current position to the terminal point according to the newly acquired road conditions in the line, and recommending.
Step S38: reporting error and returning error code.
Step S310: and judging that the terminal is reached according to the acquired latest position information, and ending the navigation.
In the example of the present invention, when the capacity testing method is applied to the map navigation service, a test request list is first constructed, and then 4 rooms are sequentially tested, as shown in fig. 4, the testing method includes the following steps:
step S41: calculating a ratio of a flow rate for a first time period to a flow rate for a second time period, the first time period and the second time period being in a first time period. The ratio is first calculated by way of a homography. Taking the calculated path flow ratio as an example: let the calculation road ratio of 2 weeks before 1/10/2018 as X1And the calculation road proportion when the calculation road peak is at 1 day of 10 months in 2018 is X2The ratio of the flow rate in the first time period to the flow rate in the second time period is X1/X2And extracting the log files of the corresponding time period to obtain the corresponding road calculation proportion. For example, log files at 11 points on saturday 2 weeks before 1 month 10 in 2018 are extracted, and a calculation route proportion when the maximum peak of the 11-point calculation route is obtained.
Step S42: and multiplying the ratio by the flow in a third time period to obtain the estimated flow of the tested equipment in the target time period, wherein the third time period and the target time period are in a second time period. In this example, assuming that the calculated road ratio when calculating the highest peak of the road on saturday 2 weeks before national day in 2019 is Y1, the calculated road ratio when calculating the highest peak of the road on day 10/1 in 2019 is assumed to be X2/X1×Y1
Step S43: and converting the estimated flow into a basic request list. In this example, the online computation peak period traffic is converted into a basic JSON-formatted request list, i.e., a basic request list, in a log conversion, thinning, sorting manner, or actual timing recording manner, for several weeks before the target time period, and the basic request list is used as a basis for constructing the test request list.
Step S44: and replacing the starting point information and the end point information in the basic request list according to the starting point information and the end point information in the flow log before the target time period to obtain a preliminary deployment request list.
Step S45: and adjusting the proportion of the request sources in the primary allocation request list to obtain a secondary allocation request list. In this example, the ratio of each traffic source in the preliminary provisioning request list is adjusted: the proportions of the several primary request sources are adjusted to match the proportions of the components on holidays (i.e., 10 months and 1 day). The request source may be a mobile phone client, a Web master, an open platform, an API (Application Programming Interface), and the like.
Step S46: and adjusting the composition proportion of the secondary allocation request list according to a preset rule to obtain an estimated request list. Before step S41 is executed, the flow influencing factor may be estimated according to the characteristics of the target time period. For example, if the target time period is a holiday, the flow influence factor is estimated according to the characteristics of the holiday. According to the flow influence factor, the blending rule of the secondary blending in step S45 and the blending rule of the composition ratio in step S46 are obtained. In this example, the components of the other impact factors in the secondary blending request list are adjusted. Such as the proportion of the license plate, the distribution proportion of different versions, the proportion recommended in the row, etc. And the driving navigation module has many request sources, including a mobile phone end, a PC (Personal Computer) end, an open platform, an API interface, and the like. The different data sources are stressed differently for each module in the server cluster. According to the steps S44-S46, the obtained estimated request list can be closer to the actual situation of the target time slot.
Step S47: and verifying the estimated request list according to a preset request list composition proportion to obtain a verification result. After the estimation request list is obtained, the composition proportion of the estimation request list needs to be verified, the test request list for testing is ensured to be in accordance with expectation, the real target time period flow can be simulated, and the flow is in accordance with the characteristics of the target time period. For example, day 1 of 10 months is a holiday, and the flow factor of the holiday is estimated before the capacity test. The amount of long-distance navigation requests increases during holidays, and the total amount of navigation requests increases. And verifying the pre-estimated request list according to the flow factors of the holidays. During verification, firstly performing word list pre-verification, and performing prior of a test request list in a preset test environment, wherein the main verification points are as follows: the distribution of the road distance, the ratio of road flow, the proportion of various flow sources, the proportion with license plates and the like are calculated. Secondly, performing word list posterior, and performing posterior of the test request list in an online environment, wherein the concerned indexes are as follows: the flow conversion ratio of the downstream module, the consumption of the CPU per flow of the downstream module, and the like. In some scenarios, attention needs to be paid to the ratio of single route to multiple routes, and the performance consumption of the multiple routes to the downstream routing module is usually several times that of the single route.
Step S48: and adjusting the pre-estimated request list according to the verification result to obtain the test request list.
Step S49: the single machine room traffic is cut out.
Step S410: and testing a single machine room by using the test request list, paying attention to various indexes of the navigation system in real time, and observing whether the machine room has an abnormal condition of flow over-limit.
Step S411: evaluating the test result, and expanding the capacity of the single machine room according to the test result.
And (4) carrying out capacity test on the expanded machine room again by using similar steps until the capacity meets the requirement. In the example of the present invention, the capacity satisfying requirement may mean that the capacity is not less than the sum of the estimated traffic and the reserved amount. During capacity expansion, a certain reserved server is reserved in each machine room, and if N +1 redundancy is met, flow can be switched to other machine rooms after a certain machine room goes wrong. Assuming that the estimated flows of the four machine rooms a, b, c and d are n1, n2, n3 and n4 respectively, when the reserved flow required by the machine room a is calculated, assuming that the service of the machine room (c machine room) with the maximum flow in the other three machine rooms has abnormal flow switching requirement, the flow required to be shared by the machine room a at this time is: the Buffer is n1/(n1+ n2+ n4) n3, which is the reserved amount of the a machine room.
In the present example, while calculating the reserves, it is also noted that observing whether the traffic can reach each module of the system-wide and accurately measure the limits requires a special capacity assessment for those modules (e.g., Redis) whose traffic cannot reach or accurately measure the true capacity.
The embodiment of the invention also provides a capacity testing device. The main components of the device are shown in fig. 5, and the device comprises:
the flow prediction module 51: the method comprises the steps of obtaining estimated flow of the tested equipment in a target time period according to the flow of the tested equipment before the target time period;
test request list construction module 52: the device is used for constructing a test request list according to the estimated flow of the tested device in the target time period;
the capacity acquisition module 53: and the device is used for inputting the test request list into the tested device and acquiring the capacity of the tested device.
In one embodiment, the flow estimation module comprises:
the geometric proportion calculation unit: the flow rate of the first time period and the flow rate of the second time period are calculated, and the first time period and the second time period are in a first time period;
an annular ratio calculation unit: the flow rate of the tested device in a third time period is obtained by multiplying the ratio by the flow rate in the third time period, and the third time period and the target time period are in a second time period;
the first time period, the second time period and the third time period are before the target time period, the first time period is before the second time period, the first time period and the second time period have the same period length, the length of the first time period and the target time period is a first set value, and the length of the second time period and the third time period is a second set value.
In one embodiment, the test request list construction module includes:
an estimation request list acquisition unit: the system is used for acquiring an estimated request list according to the estimated flow;
a checking unit: the system is used for verifying the pre-estimated request list according to a preset request list composition proportion to obtain a verification result;
a checking and adjusting unit: and the system is used for adjusting the pre-estimated request list according to the verification result to obtain the test request list.
In one embodiment, the device under test is a map navigation server cluster; the estimation request list obtaining unit includes:
transformant unit: the system is used for converting the estimated flow into a basic request list;
a first blending subunit: the system comprises a basic request list, a primary allocation request list and a secondary allocation request list, wherein the basic request list is used for acquiring flow logs of a target time period;
a second blending subunit: the system is used for adjusting the proportion of request sources in the preliminary allocation request list to obtain a secondary allocation request list;
a third blending subunit: and the system is used for adjusting the composition proportion of the secondary allocation request list according to a preset rule to obtain an estimated request list.
In an embodiment, the flow prediction module 51, the test request list construction module 52, and the capacity acquisition module 53 in this embodiment may refer to the related descriptions in the foregoing embodiments, and are not described herein again. Unlike fig. 5, referring to fig. 6, the apparatus further includes:
the expansion module 61: and the capacity expansion device is used for expanding the capacity of the tested equipment according to the capacity of the tested equipment and the estimated flow.
In one embodiment, the capacity expansion module includes:
a reserve amount calculation unit: for calculating the reserved quantity of each tested device respectively by adopting the following formula:
Figure BDA0002085914570000141
wherein k is the total number of the devices, Buffer is the reserved quantity of the ith device, and niEstimated flow for the ith device, njEstimated flow for the jth device, nmThe maximum value of the estimated flow of the plurality of devices;
an extended capacity calculation unit: and the method is used for respectively calculating the extended capacity of each tested device according to the reserved quantity and the estimated flow of each tested device.
The functions of each module in each apparatus in the embodiments of the present invention may refer to the corresponding description in the above method, and are not described herein again.
Fig. 7 shows a block diagram of a configuration of a capacity testing apparatus according to an embodiment of the present invention. As shown in fig. 7, the apparatus includes: a memory 910 and a processor 920, the memory 910 having stored therein computer programs operable on the processor 920. The processor 920 implements the capacity testing method in the above embodiments when executing the computer program. The number of the memory 910 and the processor 920 may be one or more.
The apparatus further comprises:
and a communication interface 930 for communicating with an external device to perform data interactive transmission.
Memory 910 may include high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
If the memory 910, the processor 920 and the communication interface 930 are implemented independently, the memory 910, the processor 920 and the communication interface 930 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 7, but this is not intended to represent only one bus or type of bus.
Optionally, in an implementation, if the memory 910, the processor 920 and the communication interface 930 are integrated on a chip, the memory 910, the processor 920 and the communication interface 930 may complete communication with each other through an internal interface.
An embodiment of the present invention provides a computer-readable storage medium, which stores a computer program, and the computer program is used for implementing the method of any one of the above embodiments when being executed by a processor.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer readable storage medium. The storage medium may be a read-only memory, a magnetic or optical disk, or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various changes or substitutions within the technical scope of the present invention, and these should be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (13)

1. A capacity testing method, comprising:
acquiring the estimated flow of the equipment to be tested in a target time period according to the flow of the equipment to be tested before the target time period;
constructing a test request list according to the estimated flow of the tested equipment in the target time period, wherein the test request list comprises the following steps of:
converting the estimated flow into a basic request list;
replacing the starting point information and the end point information in the basic request list according to the starting point information and the end point information in the flow log before the target time period to obtain a preliminary deployment request list;
adjusting the proportion of request sources in the primary allocation request list to obtain a secondary allocation request list;
according to a preset rule, adjusting the composition proportion of a secondary allocation request list to obtain an estimation request list, wherein the estimation request list is used for obtaining the test request list;
and inputting the test request list into the tested device to acquire the capacity of the tested device.
2. The method of claim 1, wherein obtaining the estimated flow rate of the device under test in the target time period according to the flow rate of the device under test before the target time period comprises:
calculating the ratio of the flow of a first time period to the flow of a second time period, wherein the first time period and the second time period are in a first time period;
multiplying the ratio by the flow of a third time period to obtain the estimated flow of the tested equipment in the target time period, wherein the third time period and the target time period are in a second time period;
the first time period, the second time period and the third time period are before the target time period, the first time period is before the second time period, the first time period and the second time period have the same period length, the length of the first time period and the target time period is a first set value, and the length of the second time period and the third time period is a second set value.
3. The method of claim 1, wherein constructing a test request list according to the predicted flow rate of the device under test in the target time period comprises:
acquiring an estimated request list according to the estimated flow;
verifying the estimated request list according to a preset request list composition proportion to obtain a verification result;
and adjusting the pre-estimated request list according to the verification result to obtain the test request list.
4. The method of claim 1, wherein inputting the test request list into the device under test, and after obtaining the capability of the device under test, further comprises:
and expanding the capacity of the tested equipment according to the capacity of the tested equipment and the estimated flow.
5. The method of claim 4, wherein the device under test comprises a plurality of devices, and wherein expanding the capacity of the device under test according to the capacity of the device under test comprises:
and respectively calculating the reserved quantity of each tested device by adopting the following formula:
Figure FDA0003499889460000021
wherein k is the total number of the devices, Buffer is the reserved quantity of the ith device, and niEstimated flow for the ith device, njEstimated flow for the jth device, nmThe maximum value of the estimated flow of the plurality of devices;
and respectively calculating the expansion capacity of each tested device according to the reserved quantity and the estimated flow of each tested device.
6. A capacity testing device, comprising:
a flow estimation module: the method comprises the steps of obtaining estimated flow of the tested equipment in a target time period according to the flow of the tested equipment before the target time period;
a test request list construction module: the device is used for constructing a test request list according to the estimated flow of the tested device in the target time period;
a capacity acquisition module: the device is used for inputting the test request list into the tested device and acquiring the capacity of the tested device;
under the condition that the tested device is a map navigation server cluster, the test request list construction module comprises:
transformant unit: the system is used for converting the estimated flow into a basic request list;
a first blending subunit: the system comprises a basic request list, a primary allocation request list and a secondary allocation request list, wherein the basic request list is used for acquiring flow logs of a target time period;
a second blending subunit: the system is used for adjusting the proportion of request sources in the preliminary allocation request list to obtain a secondary allocation request list;
a third blending subunit: the method is used for adjusting the composition proportion of the secondary allocation request list according to a preset rule to obtain an estimation request list, and the estimation request list is used for obtaining the test request list.
7. The apparatus of claim 6, wherein the flow prediction module comprises:
the geometric proportion calculation unit: the flow rate of the first time period and the flow rate of the second time period are calculated, and the first time period and the second time period are in a first time period;
an annular ratio calculation unit: the flow rate of the tested device in a third time period is obtained by multiplying the ratio by the flow rate in the third time period, and the third time period and the target time period are in a second time period;
the first time period, the second time period and the third time period are before the target time period, the first time period is before the second time period, the first time period and the second time period have the same period length, the length of the first time period and the target time period is a first set value, and the length of the second time period and the third time period is a second set value.
8. The apparatus of claim 6, wherein the test request list construction module comprises:
an estimation request list acquisition unit: the system is used for acquiring an estimated request list according to the estimated flow;
a checking unit: the system is used for verifying the pre-estimated request list according to a preset request list composition proportion to obtain a verification result;
a checking and adjusting unit: and the system is used for adjusting the pre-estimated request list according to the verification result to obtain the test request list.
9. The apparatus of claim 8, wherein the pre-estimation request list obtaining unit comprises the transformation subunit, the first preparation subunit, the second preparation subunit, and the third preparation subunit.
10. The apparatus of claim 6, further comprising:
capacity expansion module: and the capacity expansion device is used for expanding the capacity of the tested equipment according to the capacity of the tested equipment and the estimated flow.
11. The apparatus of claim 10, wherein the capacity expansion module comprises:
a reserve amount calculation unit: for calculating the reserved quantity of each tested device respectively by adopting the following formula:
Figure FDA0003499889460000041
wherein k is the total number of the devices, Buffer is the reserved quantity of the ith device, and niEstimated flow for the ith device, njEstimated flow for the jth device, nmThe maximum value of the estimated flow of the plurality of devices;
an extended capacity calculation unit: and the method is used for respectively calculating the extended capacity of each tested device according to the reserved quantity and the estimated flow of each tested device.
12. A capacity testing apparatus, comprising:
one or more processors;
storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-5.
13. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 5.
CN201910487613.5A 2019-06-05 2019-06-05 Capacity prediction method and device Active CN110213104B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910487613.5A CN110213104B (en) 2019-06-05 2019-06-05 Capacity prediction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910487613.5A CN110213104B (en) 2019-06-05 2019-06-05 Capacity prediction method and device

Publications (2)

Publication Number Publication Date
CN110213104A CN110213104A (en) 2019-09-06
CN110213104B true CN110213104B (en) 2022-04-08

Family

ID=67791097

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910487613.5A Active CN110213104B (en) 2019-06-05 2019-06-05 Capacity prediction method and device

Country Status (1)

Country Link
CN (1) CN110213104B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114978944A (en) * 2022-05-13 2022-08-30 北京百度网讯科技有限公司 Pressure testing method, device and computer program product

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102411757A (en) * 2011-08-05 2012-04-11 中国工商银行股份有限公司 Method and system for forecasting capacity of large host central processing unit (CPU)
CN104866408A (en) * 2014-02-20 2015-08-26 阿里巴巴集团控股有限公司 Capacity prediction method and device for application system
CN107395447A (en) * 2016-03-09 2017-11-24 阿里巴巴集团控股有限公司 Module detection method, power system capacity predictor method and corresponding equipment
CN108011764A (en) * 2017-12-07 2018-05-08 国云科技股份有限公司 A kind of method for predicting more cloud platform storage resource increments
CN109309596A (en) * 2017-07-28 2019-02-05 阿里巴巴集团控股有限公司 A kind of method for testing pressure, device and server
CN109412829A (en) * 2018-08-30 2019-03-01 华为技术有限公司 A kind of prediction technique and equipment of resource distribution

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102411757A (en) * 2011-08-05 2012-04-11 中国工商银行股份有限公司 Method and system for forecasting capacity of large host central processing unit (CPU)
CN104866408A (en) * 2014-02-20 2015-08-26 阿里巴巴集团控股有限公司 Capacity prediction method and device for application system
CN107395447A (en) * 2016-03-09 2017-11-24 阿里巴巴集团控股有限公司 Module detection method, power system capacity predictor method and corresponding equipment
CN109309596A (en) * 2017-07-28 2019-02-05 阿里巴巴集团控股有限公司 A kind of method for testing pressure, device and server
CN108011764A (en) * 2017-12-07 2018-05-08 国云科技股份有限公司 A kind of method for predicting more cloud platform storage resource increments
CN109412829A (en) * 2018-08-30 2019-03-01 华为技术有限公司 A kind of prediction technique and equipment of resource distribution

Also Published As

Publication number Publication date
CN110213104A (en) 2019-09-06

Similar Documents

Publication Publication Date Title
CN105203120B (en) Navigation routine evaluating method and device
US10488206B2 (en) Method and system for improving spatial accuracy of map data
CN108319550A (en) A kind of test system and test method
CN109582550B (en) Method, device and server for acquiring full-service scene fault set
US11004333B2 (en) Detecting influential factors for traffic congestion
CN110262959A (en) Underlying services method for testing pressure, device, electronic equipment and storage medium
CN111858296A (en) Interface test method, device, equipment and storage medium
CN110213104B (en) Capacity prediction method and device
CN110427574B (en) Route similarity determination method, device, equipment and medium
US20200236169A1 (en) Cloud platform or cloud provider selection
KR20200006501A (en) System and method for checking of information about estate development plan based on geographic information system
CN108280024B (en) Flow distribution strategy testing method and device and electronic equipment
CN104573127A (en) Method and system for evaluating data difference
CN108256707B (en) Policy return visit management method and device
CN116955148A (en) Service system testing method, device, equipment, storage medium and product
CN110971478A (en) Pressure measurement method and device for cloud platform service performance and computing equipment
CN111260384A (en) Service order processing method and device, electronic equipment and storage medium
EP4170566A1 (en) Prediction system and prediction method
CN113704114A (en) Automatic testing method, device, equipment and medium for functional interface
CN110198517B (en) Port scanning method and system based on self-learning path selection
JP2012048423A (en) Data distribution network design device and method, and program
CN111934938A (en) Flow network key node identification method and device based on multi-attribute information fusion
JP2021140332A (en) Pipeline accident risk assessment method
CN111597047A (en) Service deployment method, device, electronic equipment and storage medium
CN106443732B (en) Path diagram drawing method and system based on GPS

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