CN113918345A - Capacity calculation method and device for configuration hardware, computer equipment and medium - Google Patents

Capacity calculation method and device for configuration hardware, computer equipment and medium Download PDF

Info

Publication number
CN113918345A
CN113918345A CN202111275363.2A CN202111275363A CN113918345A CN 113918345 A CN113918345 A CN 113918345A CN 202111275363 A CN202111275363 A CN 202111275363A CN 113918345 A CN113918345 A CN 113918345A
Authority
CN
China
Prior art keywords
micro
service
transaction processing
processing amount
subset
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.)
Pending
Application number
CN202111275363.2A
Other languages
Chinese (zh)
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.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202111275363.2A priority Critical patent/CN113918345A/en
Publication of CN113918345A publication Critical patent/CN113918345A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a capacity calculation method, a capacity calculation device, computer equipment and a medium for configuring hardware, wherein the method comprises the following steps: determining a micro-service set existing in a system to be online, and classifying the micro-service set to generate a multi-class micro-service subset; calculating a test result sequence of each type of micro-service subset on various preset hardware configurations corresponding to the micro-service subset; calculating the target transaction processing amount of each micro service in each type of micro service subset; determining an actual result of each micro service based on the target transaction processing amount of each micro service and the test result sequence corresponding to the target transaction processing amount; and calculating the capacity of the configured hardware required by the system to be on-line according to the actual result of each micro-service. According to the method and the device, the actual result of each micro service is determined by calculating the test result sequence of each type of micro service, so that the result of a single micro service is determined according to the actual result, and the obtained actual calculation result is more accurate, thereby reducing the waste of hardware resources or reducing the abnormal operation condition after the application software is on line.

Description

Capacity calculation method and device for configuration hardware, computer equipment and medium
Technical Field
The present invention relates to the field of computer software technologies, and in particular, to a method and an apparatus for calculating a capacity of a configuration hardware, a computer device, and a medium.
Background
In recent years, as the development of computer software is well-trained, with the increasing demand of users, the architecture in the application software is gradually developed from a single application to a micro-service application, and a single application provides all software functions, which is evolved into a micro-service mode, i.e. a single application is split into a plurality of applications, and each application is developed by adopting a micro-service development mode, so that each micro-service developed is focused on a single function, and a plurality of micro-services are combined together to provide all application software functions for users. After the application software is developed, deployment is required to be carried out online, the deployment mode of the software system goes through the evolution process from physical machine deployment, virtual machine deployment and container deployment, the most popular is container deployment at present, and the deployment is required to be estimated according to the hardware capacity occupied by the application software after the application software is online.
When the hardware capacity occupied by the existing application software is calculated, subjective assumption is mainly used, for example, when the hardware capacity occupied by online new application software a is estimated, a user often roughly estimates the complexity of the system a according to historical experience, and then compares the complexity with the complexity of the online application software, and if the complexity of the system a is similar to that of the online system B, the hardware resource configuration required by the system a is considered to be the same as that of the system B. In the prior art, the estimation is performed by a user, and the artificial estimation logic is subjective, which may cause a large deviation of the estimation result or an inaccurate estimation result, thereby causing waste of hardware resources or abnormal operation of application software after online.
Disclosure of Invention
Based on this, it is necessary to provide a capacity calculation method, apparatus, computer device and medium for configuring hardware for solving the problems of inaccurate estimation of hardware capacity required by a system to be online or low estimation accuracy.
A capacity calculation method for configuring hardware, the method comprising: determining a micro-service set existing in a system to be online, and classifying the micro-service set to generate a multi-class micro-service subset; calculating a test result sequence of each type of micro-service subset on various preset hardware configurations corresponding to the micro-service subset; calculating the target transaction processing amount of each micro service in each type of micro service subset; determining an actual result of each micro service based on the target transaction processing amount of each micro service and the test result sequence corresponding to the target transaction processing amount; and calculating the capacity of the configured hardware required by the system to be on-line according to the actual result of each micro-service.
In one embodiment, classifying the micro-service sets to generate multi-class micro-service subsets comprises: loading an application program corresponding to each micro service in the micro service set; executing the application program corresponding to each micro service in unit time to obtain the transaction processing amount of each micro service in unit time; and classifying the micro-service sets based on the transaction processing amount of each micro-service in unit time to generate multi-class micro-service subsets.
In one embodiment, classifying the micro service sets based on the transaction amount of each micro service in a unit time to generate multi-class micro service subsets comprises: obtaining preset multiple types of division areas; judging target intervals of the transaction processing amount of each micro service in unit time among the plurality of types of partition intervals one by one; determining the type of the target interval as the type of each micro service; and generating multi-class micro-service subsets according to the types of the micro-services.
In one embodiment, classifying the micro service sets based on the transaction amount of each micro service in a unit time to generate multi-class micro service subsets comprises: adopting a sliding window algorithm to create a sliding window; obtaining preset multiple types of division areas; associating preset multiple type division areas with a sliding window to obtain an associated sliding window; inputting the transaction processing amount of each micro service in unit time into the associated sliding window, and outputting the type of each micro service; and generating multi-class micro-service subsets according to the types of the micro-services.
In one embodiment, calculating a test result sequence of each type of micro-service subset on a plurality of preset hardware configurations corresponding to the type of micro-service subset comprises: extracting any one micro service from each type of micro service subset to determine as a target instance, and generating a plurality of target instances; when a resource testing component constructed aiming at each target instance is received, loading a plurality of preset hardware configurations corresponding to the resource testing component; and executing the constructed resource test component in each preset hardware configuration to generate a test result sequence of each type of micro-service subset.
In one embodiment, calculating the target transaction amount of each micro-service in each type of micro-service subset comprises: receiving a request sequence aiming at each micro service in each type of micro service subset; calculating the transaction processing amount of each micro service at a plurality of moments based on the request sequence; acquiring the maximum value of the transaction processing amount of each micro service from the transaction processing amount of each micro service at a plurality of moments; and calculating the target transaction processing amount of each micro service based on the maximum value of each micro service.
In one embodiment, determining the actual result of each micro-service based on the target transaction amount of each micro-service and the test result sequence corresponding to each micro-service comprises: determining a target interval of the target transaction processing amount of each micro service in the corresponding test result sequence; acquiring a maximum value in a target interval; the maximum value is determined as the actual result of each microservice.
A capacity computation apparatus to configure hardware, the apparatus comprising: the micro-service classification module is used for determining a micro-service set existing in a system to be online and classifying the micro-service set to generate a multi-class micro-service subset; the test result sequence calculation module is used for calculating the test result sequence of each type of micro-service subset on various preset hardware configurations corresponding to the micro-service subset; the transaction processing amount calculation module is used for calculating the target transaction processing amount of each micro service in each type of micro service subset; the actual result determining module is used for determining the actual result of each micro service based on the target transaction processing amount of each micro service and the test result sequence corresponding to the target transaction processing amount; and the hardware resource calculation module is used for calculating the capacity of the configured hardware required by the system to be on-line according to the actual result of each micro-service.
A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the above capacity calculation method of configuring hardware.
A medium storing computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the capacity calculation method for configuring hardware as described above.
The capacity calculation device for the configuration hardware firstly determines micro-service sets existing in a system to be online, classifies the micro-service sets to generate a plurality of types of micro-service subsets, then calculates test result sequences of each type of micro-service subsets on a plurality of preset hardware configurations corresponding to the micro-service subsets, secondly calculates target transaction processing amount of each micro-service in each type of micro-service subsets, then determines actual results of each micro-service based on the target transaction processing amount of each micro-service and the test result sequence corresponding to the target transaction processing amount, and finally calculates the capacity of the configuration hardware needed by the system to be online according to the actual results of each micro-service. According to the method and the device, the actual result of each micro service is determined by calculating the test result sequence of each type of micro service, so that the result of a single micro service is determined according to the actual result, and the obtained actual calculation result is more accurate, thereby reducing the waste of hardware resources or reducing the abnormal operation condition after the application software is on line.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a diagram of an implementation environment of a capacity calculation method for configuring hardware provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of an internal structure of a computer device according to an embodiment of the present application;
FIG. 3 is a diagram illustrating a method for configuring a capacity calculation method of hardware according to an embodiment of the present application;
FIG. 4 is a schematic diagram of the types of microservices provided in one embodiment of the present application;
FIG. 5 is a diagram illustrating test results obtained by the microservice provided in one embodiment of the present application in a plurality of hardware configurations;
FIG. 6 is a diagram illustrating maximum transaction throughput for microservice provided in an embodiment of the present application;
FIG. 7 is a diagram illustrating the required hardware capacity of a system to be brought online according to an embodiment of the present application;
fig. 8 is a schematic diagram of an apparatus for configuring a capacity calculation apparatus of hardware according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another.
Fig. 1 is a diagram of an implementation environment of a capacity calculation method for configuring hardware provided in an embodiment, as shown in fig. 1, in the implementation environment, including a server 110 and a client 120.
The server 110 may be a server, which may specifically be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like, for example, a server device that deploys a system to be online. When the capacity of the configured hardware needs to be calculated, the client 120 first determines a micro-service set existing in the system to be online from the server 110, and generates a plurality of micro-service subsets after classifying the micro-service sets, the client 120 then calculates a test result sequence of each micro-service subset on a plurality of preset hardware configurations corresponding to the micro-service subset, the client 120 then calculates a target transaction processing amount of each micro-service in each micro-service subset, the client 120 then determines an actual result of each micro-service based on the target transaction processing amount of each micro-service and the test result sequence corresponding to the target transaction processing amount, and the client 120 finally calculates the capacity of the configured hardware needed by the system to be online according to the actual result of each micro-service.
It should be noted that the client 120 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, and the like. The server 110 and the client 120 may be connected through bluetooth, USB (Universal Serial Bus), or other communication connection methods, which is not limited herein.
FIG. 2 is a diagram showing an internal configuration of a computer device according to an embodiment. As shown in fig. 2, the computer device includes a processor, a medium, a memory, and a network interface connected through a system bus. The computer device medium stores an operating system, a database and computer readable instructions, the database can store control information sequences, and the computer readable instructions can make a processor realize a capacity calculation method for configuring hardware when being executed by the processor. The processor of the computer device is used for providing calculation and control capability and supporting the operation of the whole device. The memory of the computer device may have stored therein computer readable instructions that, when executed by the processor, may cause the processor to perform a capacity calculation method of configuring hardware. The network interface of the computer device is used for connecting and communicating with the terminal. Those skilled in the art will appreciate that the architecture shown in fig. 2 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components. Wherein the medium is a readable storage medium.
The method for calculating the capacity of the configured hardware according to the embodiment of the present application will be described in detail with reference to fig. 3 to 7. The method may be implemented in dependence on a computer program, executable on a capacity computing device based on configured hardware of von neumann architecture. The computer program may be integrated into the application or may run as a separate tool-like application.
Referring to fig. 3, a flow chart of a capacity calculation method for configuring hardware is provided in an embodiment of the present application. As shown in fig. 3, the method of the embodiment of the present application may include the following steps:
s101, determining a micro-service set existing in a system to be online, classifying the micro-service set, and generating a multi-class micro-service subset;
the application system to be online is software which needs to deploy a developed application program to a server for running. Microservices are child applications in an application system.
Generally, in order to reduce the coupling of system code and modularize the application system, each functional module represents a microservice, that is, each module is responsible for completing a certain function, and a plurality of modules jointly form the application system to be on-line.
In the embodiment of the application, a plurality of micro services existing in an application system to be online are determined, then an application program corresponding to each micro service in the plurality of micro services is loaded, the transaction processing amount of each micro service in unit time is obtained after the application program corresponding to each micro service is executed, and a plurality of micro services are classified based on the transaction processing amount of each micro service to generate a multi-class micro service subset.
In a possible implementation manner, when a plurality of micro services are classified based on the transaction processing amount of each micro service and then a plurality of types of micro services are generated, a preset type division interval is firstly obtained, then a target interval of the transaction processing amount of each micro service in the type division interval is judged one by one, and a plurality of types of micro service subsets are obtained according to the type of the target interval.
In another possible implementation manner, a sliding window algorithm is adopted to create a sliding window, a preset type division interval is obtained, the preset type division interval is associated with the sliding window to obtain an associated sliding window, the transaction processing amount of each micro service is input into the associated sliding window, the type of each micro service is output, and a plurality of types of micro service subsets are obtained according to the type of each micro service.
Specifically, the main basis for classification is the business processing capability of the microservice. The number of transactions TPS which can be processed by the micro-service per second is used as a performance index, and the micro-services which are close to the TPS are divided into the same class. The main factor influencing the TPS is the input and output (I/O) quantity of files, and the micro-service with large I/O quantity is lower in TPS. I/O herein refers to interaction with a database (reading or writing data from the database), and interaction with disk files.
For example: our system has 8 micro-services (from A to H), where the I/O operations of the micro-services A-D are between twenty to thirty thousand, thus the A-D can be classified as complex, the I/O operations of the micro-service G-H are below one thousand, thus the G-H can be classified as simple, and the I/O operations of the remaining micro-services E-F are between one thousand to twenty thousand, thus the E-F can be classified as normal. The microservice a-to-H partitioning case is illustrated in fig. 4, for example.
S102, calculating a test result sequence of each type of micro-service subset on a plurality of corresponding preset hardware configurations;
wherein the test result sequence is a characteristic value of each type of micro service.
In the embodiment of the application, when the test result sequence of each type of micro service is calculated, any micro service is extracted from each type of micro service as an example to generate a plurality of examples, then when a resource test component constructed for each example is received, a plurality of preset hardware configurations corresponding to the resource test component are loaded, and finally the constructed resource test components are executed in the plurality of preset hardware configurations one by one to generate the test result sequence of each type of micro service.
Specifically, the resource test component is a test code segment designed for the selected micro service, and the hardware configuration is a cloud computing server provided by a cloud manufacturer and can be abstracted into a CPU and a memory. For example: one cloud computing server example with 4 CPU cores and 8GB memory capacity is referred to as an example of 4C8GB for short in this application. The plurality of preset hardware configurations may be classified into a low hardware configuration, a medium hardware configuration, and a high hardware configuration.
Generally, one micro-service is selected from the complex type, the common type and the simple type (for example, the first micro-service of each type is selected), a simple simulation implementation code of the business is written, and a performance test is carried out to obtain a TPS processing capacity result.
In a possible implementation manner, for example, the micro service extracted from the complex is a micro service a, the obtained multiple preset hardware configurations corresponding to the complex are respectively a low hardware configuration (2C4GB), a medium hardware configuration (3C6GB), and a high hardware configuration (4C8GB), at this time, the resource test component designed for the micro service a is received, and the test result of the micro service a is 1000, 2000, and 3000 after the resource test component is executed in the multiple preset hardware configurations corresponding to the complex. For example, the micro service extracted from the normal type is a micro service E, the obtained multiple preset hardware configurations corresponding to the normal type are a low hardware configuration (1C2GB), a medium hardware configuration (2C4GB) and a high hardware configuration (3C6GB), at this time, the resource test component designed for the micro service E is received, and the test results of the micro service E are 2000, 3000 and 4000 after the resource test component is executed in the multiple preset hardware configurations corresponding to the normal type. For example, the micro service extracted from the simple type is a micro service G, the obtained multiple preset hardware configurations corresponding to the simple type are respectively a low hardware configuration (0.5C1GB), a medium hardware configuration (1C2GB) and a high hardware configuration (2C4GB), at this time, the resource test component designed for the micro service G is received, and after the resource test component is executed in the multiple preset hardware configurations corresponding to the simple type, the test results of the micro service G are 3000, 5000 and 8000, for example, as shown in fig. 5.
It should be noted that the specific values of the high, medium and low hardware configurations can be adjusted according to actual situations.
S103, calculating the target transaction processing amount of each micro service in each type of micro service subset;
generally, after obtaining the test result sequence of each type of micro service, the target transaction amount of each micro service needs to be calculated.
In the embodiment of the present application, a request sequence for each micro service in each type of the micro service subset is first received, then the transaction amount of each micro service at multiple times is calculated based on the request sequence, then the maximum value of the transaction amount of each micro service is obtained from the transaction amount of each micro service at multiple times, and finally the target transaction amount of each micro service is calculated based on the maximum value of each micro service.
In one possible implementation, a request sequence for each micro service in each type of micro service is received, the transaction amount of each micro service at a plurality of time points is calculated based on the request sequence, when the transaction amount reaches a maximum value, the maximum value of the current time point is obtained, and the target transaction amount of each micro service is calculated based on the maximum value.
Specifically, the calculation formula of the target transaction processing amount is as follows:
Figure BDA0003329171420000081
where t0 is the time when the first request is issued, tmax is the time when the last request is issued, Q is the weighting factor, HmaxIs the maximum value reached by the transaction amount.
The maximum transaction amount of the microservice is shown in fig. 6, for example.
S104, determining the actual result of each micro service based on the target transaction processing amount of each micro service and the corresponding test result sequence;
in this embodiment of the present application, a target interval of the target transaction amount of each micro service in the test result sequence corresponding to the target transaction amount is determined, then a maximum value in the target interval is obtained, and finally the maximum value is determined as an actual result of each micro service.
In one possible implementation, a target interval of each micro-service prediction result in the test result sequence corresponding to the micro-service prediction result is determined first, and then the maximum value of the target interval is determined as the actual result of each micro-service.
For example, since the microservice a is complex, the prediction result of the microservice a is 1500, and the test sequence of the complex is 1000, 2000, 3000, it can be known that the microservice a is between the target interval 1000 and 2000, and therefore 2000 is taken as the actual result of the microservice a.
And S105, calculating the capacity of the configured hardware required by the system to be online according to the actual result of each micro service.
The hardware resources required to be configured are cloud computing servers provided by cloud manufacturers and can be abstracted into a CPU and a memory. For example: one cloud computing server example with 4 CPU cores and 8GB memory capacity is referred to as an example of 4C8GB for short in this application.
In the embodiment of the application, after the actual result of each micro service is obtained, the hardware resource of each micro service, that is, the CPU and the memory required by each micro service, can be calculated according to the actual result of each micro service, then the hardware resource required to be configured by the plan of the online application system can be obtained by summing the number of the CPUs and the memories of each micro service, and finally the preset weighting factor is obtained, and the hardware resource required to be configured by the plan is obtained by multiplying the weighting factor and the hardware resource required to be configured by the plan.
Fig. 7 shows hardware resources from microservice a to microservice H in the application system to be online, and it can be known from fig. 7 that the number of scheduled CPUs and the number of memories of the application system to be online are 19 and 38G, respectively.
For example, in consideration of the reserved temporary spare resources and the failure processing resources, 30% of the reserved resources may be increased again on the basis of planning the required configuration of the hardware resources, resulting in a total of 25C50GB hardware resources.
The hardware resources actually required to be configured are: 19 × 1.3 ═ 24.7, 38 × 1.3 ═ 49.4.
Further, a single configuration resource occupied by a single cloud instance is determined, and the ratio of the configuration resource needed by the application system to be online to the single configuration resource is determined as the number of cloud instances needed by the application system to be online.
For example, a cloud instance is configured with 4 CPUs 8GB memory, and it can be seen that the number of instances required is: 25/4 ═ 6.25, requiring a total of 7 cloud instances of 4C8 GB.
In the embodiment of the application, a capacity calculation device for configuring hardware firstly determines micro-service sets existing in a system to be online, classifies the micro-service sets to generate multiple types of micro-service subsets, then calculates a test result sequence of each type of micro-service subset on multiple preset hardware configurations corresponding to the micro-service subset, secondly calculates a target transaction processing amount of each micro-service in each type of micro-service subset, then determines an actual result of each micro-service based on the target transaction processing amount of each micro-service and the test result sequence corresponding to the target transaction processing amount, and finally calculates the capacity of the configured hardware needed by the system to be online according to the actual result of each micro-service. According to the method and the device, the actual result of each micro service is determined by calculating the test result sequence of each type of micro service, so that the result of a single micro service is determined according to the actual result, and the obtained actual calculation result is more accurate, thereby reducing the waste of hardware resources or reducing the abnormal operation condition after the application software is on line.
The following are embodiments of the apparatus of the present invention that may be used to perform embodiments of the method of the present invention. For details which are not disclosed in the embodiments of the apparatus of the present invention, reference is made to the embodiments of the method of the present invention.
Referring to fig. 8, a schematic structural diagram of a capacity calculating apparatus for configuring hardware according to an exemplary embodiment of the present invention is shown, which is applied to a server. The capacity calculating means configuring the hardware may be implemented as all or a part of the apparatus by software, hardware or a combination of both. The device 1 comprises a micro-service classification module 10, a test result sequence calculation module 20, a transaction processing amount calculation module 30, an actual result determination module 40 and a hardware resource calculation module 50.
The micro-service classification module 10 is configured to determine a micro-service set existing in a system to be online, and classify the micro-service set to generate a multi-class micro-service subset;
the test result sequence calculating module 20 is configured to calculate a test result sequence of each type of micro-service subset on multiple preset hardware configurations corresponding to the micro-service subset;
the transaction processing amount calculation module 30 is configured to calculate a target transaction processing amount of each microservice in each microservice subset;
an actual result determining module 40, configured to determine an actual result of each micro service based on the target transaction amount of each micro service and the test result sequence corresponding to the target transaction amount;
and the hardware resource calculation module 50 is configured to calculate the capacity of the configured hardware required by the system to be online according to the actual result of each microservice.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the embodiment of the application, a capacity calculation device for configuring hardware firstly determines micro-service sets existing in a system to be online, classifies the micro-service sets to generate multiple types of micro-service subsets, then calculates a test result sequence of each type of micro-service subset on multiple preset hardware configurations corresponding to the micro-service subset, secondly calculates a target transaction processing amount of each micro-service in each type of micro-service subset, then determines an actual result of each micro-service based on the target transaction processing amount of each micro-service and the test result sequence corresponding to the target transaction processing amount, and finally calculates the capacity of the configured hardware needed by the system to be online according to the actual result of each micro-service. According to the method and the device, the actual result of each micro service is determined by calculating the test result sequence of each type of micro service, so that the result of a single micro service is determined according to the actual result, and the obtained actual calculation result is more accurate, thereby reducing the waste of hardware resources or reducing the abnormal operation condition after the application software is on line.
In one embodiment, a computer device is provided, the device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: determining a micro-service set existing in a system to be online, and classifying the micro-service set to generate a multi-class micro-service subset; calculating a test result sequence of each type of micro-service subset on various preset hardware configurations corresponding to the micro-service subset; calculating the target transaction processing amount of each micro service in each type of micro service subset; determining an actual result of each micro service based on the target transaction processing amount of each micro service and the test result sequence corresponding to the target transaction processing amount; and calculating the capacity of the configured hardware required by the system to be on-line according to the actual result of each micro-service.
In one embodiment, when the processor performs classification of the micro-service set and generates a multi-class micro-service subset, the following operations are specifically performed: loading an application program corresponding to each micro service in the micro service set; executing the application program corresponding to each micro service in unit time to obtain the transaction processing amount of each micro service in unit time; and classifying the micro-service sets based on the transaction processing amount of each micro-service in unit time to generate multi-class micro-service subsets.
In one embodiment, when the processor performs classification of the micro-service sets based on the transaction amount of each micro-service in a unit time and then generates a multi-class micro-service subset, the following operations are specifically performed: obtaining preset multiple types of division areas; judging target intervals of the transaction processing amount of each micro service in unit time among the plurality of types of partition intervals one by one; determining the type of the target interval as the type of each micro service; and generating multi-class micro-service subsets according to the types of the micro-services.
In one embodiment, when the processor performs classification of the micro-service sets based on the transaction amount of each micro-service in a unit time and then generates a multi-class micro-service subset, the following operations are specifically performed: adopting a sliding window algorithm to create a sliding window; obtaining preset multiple types of division areas; associating preset multiple type division areas with a sliding window to obtain an associated sliding window; inputting the transaction processing amount of each micro service in unit time into the associated sliding window, and outputting the type of each micro service; and generating multi-class micro-service subsets according to the types of the micro-services.
In one embodiment, when the processor performs the test result sequence of each type of micro-service subset on the multiple preset hardware configurations corresponding to the micro-service subset, the following operations are specifically performed: extracting any one micro service from each type of micro service subset to determine as a target instance, and generating a plurality of target instances; when a resource testing component constructed aiming at each target instance is received, loading a plurality of preset hardware configurations corresponding to the resource testing component; and executing the constructed resource test component in each preset hardware configuration to generate a test result sequence of each type of micro-service subset.
In one embodiment, when the processor performs the calculation of the target transaction processing amount of each micro service in each type of micro service subset, the following operations are specifically performed: receiving a request sequence aiming at each micro service in each type of micro service subset; calculating the transaction processing amount of each micro service at a plurality of moments based on the request sequence; acquiring the maximum value of the transaction processing amount of each micro service from the transaction processing amount of each micro service at a plurality of moments; and calculating the target transaction processing amount of each micro service based on the maximum value of each micro service.
In one embodiment, the processor specifically performs the following operations when determining the actual result of each micro-service based on the target transaction amount of each micro-service and the test result sequence corresponding to the target transaction amount: determining a target interval of the target transaction processing amount of each micro service in the corresponding test result sequence; acquiring a maximum value in a target interval; the maximum value is determined as the actual result of each microservice.
In the embodiment of the application, a capacity calculation device for configuring hardware firstly determines micro-service sets existing in a system to be online, classifies the micro-service sets to generate multiple types of micro-service subsets, then calculates a test result sequence of each type of micro-service subset on multiple preset hardware configurations corresponding to the micro-service subset, secondly calculates a target transaction processing amount of each micro-service in each type of micro-service subset, then determines an actual result of each micro-service based on the target transaction processing amount of each micro-service and the test result sequence corresponding to the target transaction processing amount, and finally calculates the capacity of the configured hardware needed by the system to be online according to the actual result of each micro-service. According to the method and the device, the actual result of each micro service is determined by calculating the test result sequence of each type of micro service, so that the result of a single micro service is determined according to the actual result, and the obtained actual calculation result is more accurate, thereby reducing the waste of hardware resources or reducing the abnormal operation condition after the application software is on line.
In one embodiment, a medium is presented having computer-readable instructions stored thereon which, when executed by one or more processors, cause the one or more processors to perform the steps of: determining a micro-service set existing in a system to be online, and classifying the micro-service set to generate a multi-class micro-service subset; calculating a test result sequence of each type of micro-service subset on various preset hardware configurations corresponding to the micro-service subset; calculating the target transaction processing amount of each micro service in each type of micro service subset; determining an actual result of each micro service based on the target transaction processing amount of each micro service and the test result sequence corresponding to the target transaction processing amount; and calculating the capacity of the configured hardware required by the system to be on-line according to the actual result of each micro-service.
In one embodiment, when the processor performs classification of the micro-service set and generates a multi-class micro-service subset, the following operations are specifically performed: loading an application program corresponding to each micro service in the micro service set; executing the application program corresponding to each micro service in unit time to obtain the transaction processing amount of each micro service in unit time; and classifying the micro-service sets based on the transaction processing amount of each micro-service in unit time to generate multi-class micro-service subsets.
In one embodiment, when the processor performs classification of the micro-service sets based on the transaction amount of each micro-service in a unit time and then generates a multi-class micro-service subset, the following operations are specifically performed: obtaining preset multiple types of division areas; judging target intervals of the transaction processing amount of each micro service in unit time among the plurality of types of partition intervals one by one; determining the type of the target interval as the type of each micro service; and generating multi-class micro-service subsets according to the types of the micro-services.
In one embodiment, when the processor performs classification of the micro-service sets based on the transaction amount of each micro-service in a unit time and then generates a multi-class micro-service subset, the following operations are specifically performed: adopting a sliding window algorithm to create a sliding window; obtaining preset multiple types of division areas; associating preset multiple type division areas with a sliding window to obtain an associated sliding window; inputting the transaction processing amount of each micro service in unit time into the associated sliding window, and outputting the type of each micro service; and generating multi-class micro-service subsets according to the types of the micro-services.
In one embodiment, when the processor performs the test result sequence of each type of micro-service subset on the multiple preset hardware configurations corresponding to the micro-service subset, the following operations are specifically performed: extracting any one micro service from each type of micro service subset to determine as a target instance, and generating a plurality of target instances; when a resource testing component constructed aiming at each target instance is received, loading a plurality of preset hardware configurations corresponding to the resource testing component; and executing the constructed resource test component in each preset hardware configuration to generate a test result sequence of each type of micro-service subset.
In one embodiment, when the processor performs the calculation of the target transaction processing amount of each micro service in each type of micro service subset, the following operations are specifically performed: receiving a request sequence aiming at each micro service in each type of micro service subset; calculating the transaction processing amount of each micro service at a plurality of moments based on the request sequence; acquiring the maximum value of the transaction processing amount of each micro service from the transaction processing amount of each micro service at a plurality of moments; and calculating the target transaction processing amount of each micro service based on the maximum value of each micro service.
In one embodiment, the processor specifically performs the following operations when determining the actual result of each micro-service based on the target transaction amount of each micro-service and the test result sequence corresponding to the target transaction amount: determining a target interval of the target transaction processing amount of each micro service in the corresponding test result sequence; acquiring a maximum value in a target interval; the maximum value is determined as the actual result of each microservice.
In the embodiment of the application, a capacity calculation device for configuring hardware firstly determines micro-service sets existing in a system to be online, classifies the micro-service sets to generate multiple types of micro-service subsets, then calculates a test result sequence of each type of micro-service subset on multiple preset hardware configurations corresponding to the micro-service subset, secondly calculates a target transaction processing amount of each micro-service in each type of micro-service subset, then determines an actual result of each micro-service based on the target transaction processing amount of each micro-service and the test result sequence corresponding to the target transaction processing amount, and finally calculates the capacity of the configured hardware needed by the system to be online according to the actual result of each micro-service. According to the method and the device, the actual result of each micro service is determined by calculating the test result sequence of each type of micro service, so that the result of a single micro service is determined according to the actual result, and the obtained actual calculation result is more accurate, thereby reducing the waste of hardware resources or reducing the abnormal operation condition after the application software is on line.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer readable medium, and when executed, can include the processes of the embodiments of the methods described above. The medium may be a non-volatile medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only show some embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A capacity calculation method for configuring hardware, the method comprising:
determining a micro-service set existing in a system to be online, and classifying the micro-service set to generate a multi-class micro-service subset;
calculating a test result sequence of each type of micro-service subset on various corresponding preset hardware configurations;
calculating the target transaction processing amount of each micro service in each type of micro service subset;
determining an actual result of each micro service based on the target transaction processing amount of each micro service and the test result sequence corresponding to each micro service;
and calculating the capacity of the configured hardware required by the system to be on-line according to the actual result of each micro-service.
2. The method of claim 1, wherein the classifying the micro-service set to generate a multi-class micro-service subset comprises:
loading an application program corresponding to each micro service in the micro service set;
executing the application program corresponding to each micro service in unit time to obtain the transaction processing amount of each micro service in unit time;
and classifying the micro service sets based on the transaction processing amount of each micro service in the unit time to generate multi-class micro service subsets.
3. The method of claim 2, wherein classifying the micro-service sets based on the transaction amount of each micro-service in the unit time to generate multi-class micro-service subsets comprises:
obtaining preset multiple types of division areas;
judging target intervals of the transaction processing amount of each micro service in the unit time among the plurality of types of partition intervals one by one;
determining the type of the target interval as the type of each micro service;
and generating a multi-class micro-service subset according to the type of each micro-service.
4. The method of claim 2, wherein classifying the micro-service sets based on the transaction amount of each micro-service in the unit time to generate multi-class micro-service subsets comprises:
adopting a sliding window algorithm to create a sliding window;
obtaining preset multiple types of division areas;
associating the preset multiple types of division areas with the sliding window to obtain an associated sliding window;
inputting the transaction processing amount of each micro service in the unit time into the associated sliding window, and outputting the type of each micro service;
and generating a multi-class micro-service subset according to the type of each micro-service.
5. The method of claim 1, wherein said computing a sequence of test results of each of said micro-service subsets on a plurality of preset hardware configurations corresponding thereto comprises:
extracting any one micro service from each type of micro service subset to determine as a target instance, and generating a plurality of target instances;
when a resource testing component constructed aiming at each target instance is received, loading a plurality of preset hardware configurations corresponding to the resource testing component;
executing the constructed resource testing component in each preset hardware configuration, and generating a testing result sequence of each type of the micro-service subset.
6. The method of claim 1, wherein the calculating the target transaction amount for each micro-service in each type of the sub-set of micro-services comprises:
receiving a request sequence aiming at each micro service in each type of the micro service subset;
calculating the transaction processing amount of each micro service at a plurality of moments based on the request sequence;
acquiring the maximum value of the transaction processing amount of each micro service from the transaction processing amount of each micro service at a plurality of moments;
and calculating the target transaction processing amount of each micro service based on the maximum value of each micro service.
7. The method of claim 1, wherein determining the actual result of each microservice based on the target transaction amount of each microservice and the sequence of test results corresponding thereto comprises:
determining a target interval of the target transaction processing amount of each micro service in the test result sequence corresponding to the target transaction processing amount;
acquiring a maximum value in the target interval;
and determining the maximum value as the actual result of each micro service.
8. A capacity computation apparatus for configuring hardware, the apparatus comprising:
the micro-service classification module is used for determining a micro-service set existing in a system to be online and classifying the micro-service set to generate a multi-class micro-service subset;
the test result sequence calculation module is used for calculating the test result sequence of each type of micro-service subset on various preset hardware configurations corresponding to the micro-service subset;
the transaction processing amount calculation module is used for calculating the target transaction processing amount of each micro service in each type of micro service subset;
the actual result determining module is used for determining the actual result of each micro service based on the target transaction processing amount of each micro service and the test result sequence corresponding to the target transaction processing amount;
and the hardware resource calculation module is used for calculating the capacity of the configured hardware required by the system to be on-line according to the actual result of each micro-service.
9. A computer device comprising a memory and a processor, the memory having stored therein computer-readable instructions which, when executed by the processor, cause the processor to carry out the steps of the method of configuring a capacity calculation of hardware as claimed in any one of claims 1 to 7.
10. A medium having computer-readable instructions stored thereon which, when executed by one or more processors, cause the one or more processors to perform the steps of configuring a capacity calculation of hardware as claimed in any one of claims 1 to 7.
CN202111275363.2A 2021-10-29 2021-10-29 Capacity calculation method and device for configuration hardware, computer equipment and medium Pending CN113918345A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111275363.2A CN113918345A (en) 2021-10-29 2021-10-29 Capacity calculation method and device for configuration hardware, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111275363.2A CN113918345A (en) 2021-10-29 2021-10-29 Capacity calculation method and device for configuration hardware, computer equipment and medium

Publications (1)

Publication Number Publication Date
CN113918345A true CN113918345A (en) 2022-01-11

Family

ID=79243965

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111275363.2A Pending CN113918345A (en) 2021-10-29 2021-10-29 Capacity calculation method and device for configuration hardware, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN113918345A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114866598A (en) * 2022-04-29 2022-08-05 安徽宝葫芦信息科技集团股份有限公司 Module dynamic expansion and authorization system based on micro-service architecture and USB interface

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114866598A (en) * 2022-04-29 2022-08-05 安徽宝葫芦信息科技集团股份有限公司 Module dynamic expansion and authorization system based on micro-service architecture and USB interface
CN114866598B (en) * 2022-04-29 2023-09-19 安徽宝葫芦信息科技集团股份有限公司 Module dynamic expansion and authorization system based on micro-service architecture and USB interface

Similar Documents

Publication Publication Date Title
CN108595157B (en) Block chain data processing method, device, equipment and storage medium
CN108462760B (en) Electronic device, automatic cluster access domain name generation method and storage medium
CN108492005B (en) Project data processing method and device, computer equipment and storage medium
CN110597719B (en) Image clustering method, device and medium for adaptation test
CN111988429A (en) Algorithm scheduling method and system
CN111209111B (en) Resource allocation method, device, equipment and storage medium based on block chain system
CN113918345A (en) Capacity calculation method and device for configuration hardware, computer equipment and medium
CN112887371B (en) Edge calculation method and device, computer equipment and storage medium
CN114090204A (en) Resource prediction method and device
CN113703975A (en) Model distribution method and device, electronic equipment and computer readable storage medium
CN112214321B (en) Node selection method and device for newly added micro service and micro service management platform
CN114219497A (en) Account information determination method and device and server
CN115712571A (en) Interactive service test device, interactive service test device, computer equipment and storage medium
CN113741868B (en) Service computing task processing method, device, computer equipment and storage medium
CN114968603A (en) Capacity detection method and device supporting multi-gear load balance
CN110177006B (en) Node testing method and device based on interface prediction model
US20170090820A1 (en) Method and device for operating a many-core system
CN108509478B (en) Splitting and calling method of rule engine file, electronic device and storage medium
CN111966286A (en) Multi-data pool hierarchical migration method and system
CN111625343A (en) Container scheduling method and device, computer equipment and storage medium
CN112235152B (en) Flow size estimation method and device
CN113052687B (en) Transaction route distribution method and related device
CN116089020B (en) Virtual machine operation method, capacity expansion method and capacity expansion system
US20220198268A1 (en) Estimated online hard negative mining via probabilistic selection and scores history consideration
CN117370473B (en) Data processing method, device, equipment and storage medium based on integrity attack

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