Resource measurement and calculation method and device, equipment, storage medium and program product
By acquiring resource requirement data of virtual machines and containers in the data center and using a fixed algorithm to determine the number of compute nodes and bare metal, the problem of complex and time-consuming manual calculation in data center resource planning is solved, and standardized and automated resource calculation is achieved, improving efficiency and accuracy.
Patent Information
- Application Number
- CN202511901726.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-03-20
AI Technical Summary
In existing technologies, manual calculation methods for data center resource planning are complex, have excessively long calculation cycles, and are highly subjective, making it impossible to standardize them after personnel changes.
By acquiring resource requirement data for virtual machines and containers in each target area of the data center, using a fixed algorithm to determine the number of compute nodes and bare metal, and combining this with a preset sharing mode, resource calculation results are generated, achieving standardized and automated resource calculation.
It reduces repetitive work, shortens the calculation cycle, improves the efficiency and accuracy of resource calculation, and ensures the standardization and consistency of calculation results.
Smart Images

Figure CN121705022A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of financial technology, and in particular to a resource measurement method, apparatus, equipment, storage medium, and program product. Background Technology
[0002] With the growth of data center business and the deepening of architecture transformation, the required infrastructure resources, computing resources, storage resources, and bare metal resources for data centers are increasing. With the widespread application of virtualization technology, the planning of infrastructure resources, computing resources, storage resources, bare metal resources, virtual machines, and other resources has become a core aspect of data center operation.
[0003] Resource planning is playing an increasingly important role in resource procurement, resource adjustment, and resource allocation. Currently, the common practice is to manually calculate the required resources. However, manual calculation methods are complex and time-consuming. Furthermore, when annual demand adjustments require recalculation, manual calculation methods are highly subjective and cannot be standardized after personnel changes.
[0004] Therefore, there is an urgent need for a standardized and automated resource measurement method to improve the efficiency and accuracy of data center resource measurement. Summary of the Invention
[0005] This application provides a resource measurement method, apparatus, equipment, storage medium, and program product to solve the technical problems of complex manual measurement methods and excessively long measurement cycles.
[0006] Firstly, this application provides a resource measurement method, including:
[0007] For each target area of the data center, obtain the resource requirement data of at least one virtual machine in the target area, as well as the resource requirement data of multiple containers associated with the virtual machine;
[0008] Based on the resource requirement data of at least one of the virtual machines, determine the total requirement of each type of resource, and based on the total requirement of each type of resource, determine the number of computing nodes to be deployed in the target area.
[0009] Based on the resource requirement data of the multiple containers and the preset sharing mode, the requirement type of each container is determined, and based on the requirement type of each container, the amount of bare metal required by the multiple containers is determined.
[0010] Based on the number of computing nodes and the amount of bare metal corresponding to each target area of the data center, the resource calculation results of the data center are generated.
[0011] Secondly, this application provides a resource measurement device, comprising:
[0012] The acquisition module is used to acquire resource requirement data of at least one virtual machine in each target area of the data center, as well as resource requirement data of multiple containers associated with the virtual machine.
[0013] The processing module is used to determine the total demand for each type of resource based on the demand data corresponding to each type of resource in the resource demand data of at least one of the virtual machines, and to determine the number of computing nodes to be deployed in the target area based on the total demand for each type of resource.
[0014] The processing module is further configured to determine the demand type of each container based on the resource demand data of the multiple containers and a preset sharing mode, and to determine the amount of bare metal required by the multiple containers based on the demand type of each container.
[0015] The generation module is used to generate resource calculation results for the data center based on the number of computing nodes and the number of bare metals corresponding to each target area of the data center.
[0016] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0017] The memory stores computer-executed instructions;
[0018] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0019] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0020] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0021] The resource calculation method, apparatus, equipment, storage medium, and program products provided in this application, for each target area of a data center, acquire resource requirement data of at least one virtual machine and its associated containers within the target area. Based on the resource requirement data of at least one virtual machine, the total requirement of each type of resource is determined. Then, based on the total requirement of each type of resource, the number of compute nodes to be deployed in the target area is determined. Based on the resource requirement data of each container and a preset sharing mode, the requirement type of each container is determined. Based on the requirement type of each container, the required amount of bare metal is determined. Based on the number of compute nodes and the amount of bare metal corresponding to each target area of the data center, the resource calculation results of the data center are generated. By replacing manual calculation with a fixed algorithm, repetitive work is reduced, and standardized resource calculation is achieved without the need for multiple algorithm modifications. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0023] Figure 1 A schematic diagram of a data center architecture provided for an embodiment of this application;
[0024] Figure 2 A flowchart illustrating a resource calculation method provided in this application embodiment. Figure 1 ;
[0025] Figure 3 A flowchart illustrating a resource calculation method provided in this application embodiment. Figure 2 ;
[0026] Figure 4 This is a schematic diagram of the structure of a resource calculation device provided in an embodiment of this application;
[0027] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0028] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0029] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0030] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant countries and regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation access points for users to choose to authorize or refuse.
[0031] Furthermore, the technical solution involved in this application, which involves big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.) and the use of artificial intelligence technology for automated decision-making, and makes decisions that have a significant impact on personal rights based on the results of automated decision-making, provides users with corresponding operation entry points for users to choose to agree to or reject the results of automated decision-making; if the user chooses to reject, the process will proceed to the expert decision-making process.
[0032] It should be noted that the resource calculation method, apparatus, equipment, storage medium and program products provided in this application can be used in the field of financial technology, or in any field other than financial technology. The application fields of the resource calculation method, apparatus, equipment, storage medium and program products in this application are not limited.
[0033] First, let me explain the terms used in this application:
[0034] Base device: A collection of physical hardware devices used to manage a resource domain;
[0035] Bare metal: refers to the physical server.
[0036] Figure 1 This application provides a schematic diagram of a data center architecture, as shown in the embodiment of the present application. Figure 1As shown, data center 10 includes multiple resource domains 100, each containing multiple compute nodes 101 and multiple storage nodes 102. A unified cloud management platform 103 manages the compute nodes 101 and storage nodes 102 within resource domains 101. The unified cloud management platform 103 can communicate directly with the compute nodes 101 and storage nodes 102 within resource domains 101 to manage the resource domains. Alternatively, the unified cloud management platform 103 can communicate with management nodes within the resource domains, and each resource domain's management node then communicates with the compute nodes 101 and storage nodes 102 within its respective resource domain to achieve resource domain management.
[0037] With the growth of data center business and the deepening of architectural transformation, the resources required for the unified cloud management platform 103, management nodes, compute nodes 101, and storage nodes 102 are increasing. With the widespread application of virtualization technology, the planning of resources such as infrastructure, compute, storage, bare metal, and virtual machines has become a core aspect of data center operations.
[0038] Resource planning is playing an increasingly important role in resource procurement, resource adjustment, and resource allocation. Currently, the common practice is to manually calculate the required resources. However, manual calculation methods are complex and time-consuming. Furthermore, when annual demand adjustments require recalculation, manual calculation methods are highly subjective and cannot be standardized after personnel changes.
[0039] This application provides a resource measurement method, which aims to solve the above-mentioned technical problems in the prior art by constructing a standardized and automated resource measurement method.
[0040] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0041] Figure 2 A flowchart illustrating a resource calculation method provided in this application embodiment. Figure 1 ,like Figure 2 As shown, the method includes:
[0042] S201. For each target area of the data center, obtain the resource requirement data of at least one virtual machine in the target area, as well as the resource requirement data of multiple containers associated with the virtual machine.
[0043] In this context, a data center could be, for example, a financial data center. The target area is divided according to resource measurement dimensions, which can be any one of physical region, processor architecture, business requirements, or resource domain. A physical region could be, for example, a campus or a region.
[0044] Resource requirements data can include, for example, computing resource requirements, storage data resource requirements, bare metal resource requirements, and base device resource requirements.
[0045] Resource requirement data can be obtained monthly or after adjustments to business needs. It can be derived from analyzing historical monitoring data from the data center or from reports submitted by users within the target area based on subsequent business requirements.
[0046] Historical monitoring data can include, for example, processor (CPU) usage, memory usage, number of virtual machines, storage capacity, and business metrics.
[0047] A predictive model can be obtained by training a machine learning model with historical monitoring data and historical business needs as input features and historical resource demand data as labels, in order to predict resource demand data.
[0048] It can also perform visualization analysis on historical monitoring data. By fitting the growth trend of historical monitoring data through a linear regression model, the basic resource requirements can be obtained. The sum of the basic resource requirements and subsequent business requirements can be used as the resource requirement data.
[0049] S202. Based on the resource requirement data of at least one virtual machine, determine the total requirement of each type of resource, and based on the total requirement of each type of resource, determine the number of computing nodes to be deployed in the target area.
[0050] The total demand for all types of resources is determined using the following formula:
[0051]
[0052] in, It is the first The total demand for this type of resource This is the virtual machine's requirement data for this type of resource.
[0053] Understandably, the capacity of a single computing node to accommodate various resources is limited. Therefore, the number of computing nodes needed to accommodate the total demand for each type of resource can be determined by the ratio of the total demand for each type of resource to the capacity threshold of a single node for each type of resource. Since the number of computing nodes must be an integer, it needs to be rounded down. To ensure that all types of resources are accommodated, the calculated maximum value is used as the number of computing nodes.
[0054] In one possible implementation, the determination of the total demand for each type of resource based on the demand data corresponding to each type of resource in the resource demand data of at least one virtual machine is explained in detail:
[0055] Redundant resources are identified from historical operation and maintenance data, and the proportion of redundant resources in the total resources is determined. Based on the resource redundancy ratio, redundancy compensation is calculated for the total demand of various types of resources to obtain the actual total demand of various types of resources.
[0056] Resource redundancy includes: version iteration redundancy, resource fragmentation redundancy, downtime emergency redundancy, and daily emergency expansion redundancy. The resource redundancy ratio can be determined by statistical analysis of historical operation and maintenance data and redundant resources, or it can be obtained by training a machine learning model with historical operation and maintenance data to predict fluctuations in business demand.
[0057] To improve the reliability and availability of data centers and prevent data loss in the event of a single node failure, some resources need to take over corresponding functions. In actual operation, redundant resources from version iterations can also be used for emergency response during downtime. Therefore, when calculating resources, the actual resource requirements can be calculated based on the resource redundancy ratio.
[0058] Based on daily operation and maintenance data statistics, determine the proportion of reserved CPU and memory resources (i.e., redundant resources) required for version iteration, resource fragmentation, daily emergency expansion, and daily computing resource downtime within the total resources. For example, the resource redundancy ratio could be 40%, with 25% for version iteration redundancy, 5% for resource fragmentation redundancy, and 10% for emergency redundancy. Emergency redundancy includes downtime emergency redundancy and daily emergency expansion redundancy, each potentially accounting for 5%.
[0059] By determining the resource redundancy ratio, actual resource needs can be identified, reducing procurement costs while ensuring high data center reliability.
[0060] In one possible implementation, the various resources include processor resources and memory resources. A detailed explanation is provided regarding determining the number of computing nodes to be deployed within the target area based on the total demand for each type of resource.
[0061] Based on the total demand for processor and memory resources, the ratio is calculated to the resource capacity threshold of the compute nodes for processor and memory resources. Based on the virtual machine multiplier, the virtual machine capacity threshold for each compute node is determined, and the ratio of the total demand for virtual machines to the virtual machine capacity threshold of the compute nodes is calculated. The maximum value among these ratios is taken as the number of compute nodes that need to be deployed in the target area.
[0062] The virtual machine multiplier is the ratio of virtual resources to physical resources. It includes processor multiplier (CPU multiplier) and memory multiplier. For example, if the physical memory is 64GB and the total virtual machine memory allocation is 96GB, the memory multiplier is 1.5:1.
[0063] The ratio of the total demand for compute processor resources to the processor resources of the compute nodes, rounded up, is used to determine the number of first compute nodes. The ratio of the total demand for compute memory resources to the resource capacity threshold of the compute nodes, rounded up, is used to determine the number of second compute nodes.
[0064] Calculate the first virtual machine capacity threshold for the compute node based on the virtual machine multiplier. :
[0065] = (Number of logical cores × CPU multiplier) ÷ Number of virtual processors;
[0066] Calculate the second virtual machine capacity threshold for the compute node based on the memory multiplier. :
[0067] = (Total logical memory × Memory multiplier) ÷ Virtual machine virtual memory;
[0068] Compare and The minimum value is used as the virtual machine capacity threshold for each compute node.
[0069] The ratio of the total demand for virtual machines to the virtual machine capacity threshold of the compute nodes is used to obtain the number of third compute nodes. The number of first, second, and third compute nodes is then compared, and the maximum value is taken as the number of compute nodes.
[0070] For example, the resource capacity threshold for processor resources on a single computing node could be 200 logical CPUs, the resource capacity threshold for memory resources could be 600GB of logical memory, and the virtual machine capacity threshold could be 30.
[0071] By replacing subjective experience with a fixed algorithm, the accuracy of the calculated number of computing nodes can be ensured, human error can be eliminated, and the standardization of the measurement results can be improved.
[0072] S203. Based on the resource requirement data of multiple containers and the preset sharing mode, determine the requirement type of each container, and based on the requirement type of each container, determine the amount of bare metal required for multiple containers.
[0073] Each container has different CPU, memory, and storage requirements. Based on the preset sharing mode, it is determined whether each container has its own bare metal device or shares a bare metal device with other virtual machines.
[0074] For example, if a container requires more than 64 CPU cores, it indicates that the container has high performance requirements and therefore needs to be dedicated to a bare metal container.
[0075] In one possible implementation, based on the resource requirement data of multiple containers and the preset sharing mode, the requirement type of each container is determined, and based on the requirement type of each container, the required amount of bare metal for multiple containers is determined in detail:
[0076] Based on the resource requirement data of each container, determine whether the resource requirement data meets the requirement threshold for the exclusive type; if so, determine that the container's requirement type is exclusive, and the exclusive type container exclusively occupies one bare metal; if not, determine that the container's requirement type is shared; N shared type containers share one bare metal; N is a positive integer greater than 1; based on the ratio of the number of exclusive type containers to the number of shared type containers to N, determine the amount of bare metal required by multiple containers.
[0077] Among them, exclusive containers occupy a single bare metal, while N shared containers share a single bare metal, where N can range from 5 to 60.
[0078] For each container, based on its resource requirement data, determine whether the container's resource requirement data meets the demand threshold for the exclusive type. If it does, the container's demand type is determined to be exclusive, and the number of containers with the exclusive type is counted. If it does not meet the threshold, the container's demand type is determined to be shared, and the number of containers with the shared type is counted. The required amount of bare metal is then determined by summing the ratio of the number of exclusive type containers to the ratio of the number of shared type containers to N.
[0079] For example, the rules corresponding to the sharing mode can be as follows:
[0080] 1) Based on the resource requirement data, if the resource requirement of a single container is greater than 64 cores (60C), or memory greater than 128G, or storage greater than 10T, then a bare metal container must be dedicated to it on a 1:1 basis. The memory can be increased according to the actual situation.
[0081] 2) Based on the resource requirement data, if a single container requires no more than 2C7G of memory, then 60 containers need to share a bare metal container. The memory can be increased according to the actual situation.
[0082] 3) Based on the resource requirement data, if a single container requires a capacity of no more than 16C128G, then 5 containers need to share a bare metal container. The memory can be increased according to the actual situation.
[0083] By using resource demand data, the demand type of containers can be determined differently to achieve refined allocation of bare metal resources, improve resource utilization, and reduce procurement costs.
[0084] S204. Based on the number of computing nodes and bare metal in each target area of the data center, generate the resource calculation results of the data center.
[0085] The resource calculation results include computing resource requirements, bare metal quantity, and storage resource requirements.
[0086] Understandably, after determining the number of compute nodes, the required computing resources for the target area can be determined based on the number of compute nodes and their logical processors, i.e., the computing resource requirement data. The storage capacity required by the compute nodes of that number is then determined, and the storage nodes required for that storage capacity are configured to determine the necessary storage resources, resulting in resource calculation results, including computing resource requirement data, bare metal quantity, and storage resource requirement data.
[0087] In one possible implementation, the resource assessment results include: base equipment requirement data, and a detailed explanation of the resource assessment results for the data center generated based on the number of computing nodes and bare metal in each target area of the data center.
[0088] Calculate the ratios of the number of bare metal nodes, the number of compute nodes, and the capacity thresholds corresponding to the resource domains, respectively, and round up to the nearest integer. Select the maximum value as the number of resource domains in the target area. Calculate the ratio between the sum of the number of resource domains in each target area of the data center and the resource domain capacity threshold of the unified cloud management platform, and use this ratio as the number of unified cloud management platforms. Based on the number of resource domains and the number of unified cloud management platforms, determine the base equipment requirements. Based on the number of bare metal nodes, the number of compute nodes, and the base equipment requirements, generate the data center resource calculation results.
[0089] The base equipment requirements data include: the number of base equipment required for the management nodes of the resource domain and the number of base equipment required for the unified cloud management platform.
[0090] Calculate the ratios of the number of bare metals, the number of computing nodes, and the capacity threshold corresponding to the resource domain, respectively, and round up to select the maximum value as the number of resource domains in the target area.
[0091] The ratio between the total number of resource domains in each target area of the data center and the resource domain capacity threshold of the unified cloud management platform is used as the number of unified cloud management platforms.
[0092] The requirement for first-base devices is determined by multiplying the number of unified cloud management platforms by the number of first-base devices required for each unified cloud management platform. For example, if there are 3 unified cloud management platforms and each unified cloud management platform requires 2 first-base devices, then the requirement for first-base devices is 6.
[0093] Understandably, if there are management nodes in a resource domain, it is necessary to determine the number of second base station devices required for each management node based on the number of resource domains, as well as the number of resource domains in each target area of the data center, and thus determine the second base station device requirement data.
[0094] Based on the number of resource domains and the number of unified cloud management platforms, the required data for the base equipment is determined, and the resource calculation results for the data center are generated based on the number of bare metals, the number of computing nodes, and the required data for the base equipment.
[0095] For example, the capacity threshold for resource domain compute nodes is 1000, and the capacity threshold for resource domain bare metal is 1500.
[0096] 1) The number of first resource domains = [the number of computing nodes in the target region / 1000] and rounded up;
[0097] 2) The number of second resource domains = [the number of bare metals in the target area / 1500] and rounded up;
[0098] 3) Required number of resource domains = MAX(number of first resource domains, number of second resource domains)
[0099] By using a unified cloud management platform for the data center and a fixed combination of management nodes, standardized calculation data for base equipment requirements is achieved, ensuring the synergy between the resource domain and the unified cloud management platform.
[0100] This embodiment provides a resource calculation method. For each target area of a data center, it acquires resource requirement data for at least one virtual machine within that target area. Based on the resource requirement data of each virtual machine, it determines the total demand for each type of resource. Then, based on the total demand for each type of resource, it determines the number of compute nodes to be deployed in the target area. Based on the resource requirement data of each virtual machine and a preset sharing mode, it determines the demand type of each virtual machine. Based on the demand type of each virtual machine, it determines the amount of bare metal required for at least one virtual machine. Based on the number of compute nodes and the amount of bare metal corresponding to each target area of the data center, it generates the resource calculation results for the data center. By replacing manual calculation with a fixed algorithm, repetitive work is reduced, the calculation cycle is shortened, standardized resource calculation is achieved, and the efficiency and accuracy of the calculation are improved.
[0101] Figure 3A flowchart illustrating a resource calculation method provided in this application embodiment. Figure 2 In this embodiment, the resource calculation results include: storage resource requirement data. Figure 2 Based on the implementation examples, this paper provides a detailed explanation of how to generate resource assessment results for a data center based on the number of computing nodes and bare metal in each target area of the data center. Figure 3 As shown, the method includes:
[0102] S301. Determine the number of storage nodes that need to be deployed in the target area based on the number of computing nodes and the supply relationship between computing nodes and storage nodes.
[0103] In one possible implementation, the determination of the number of storage nodes to be deployed in the target area based on the number of compute nodes and the supply relationship between compute and storage nodes is explained in detail:
[0104] The required storage capacity of the compute nodes is determined based on the number of virtual machines supplied by the compute nodes and the storage capacity required by each virtual machine; the supplied storage capacity of the storage nodes is determined based on the number of hard disks, the capacity of a single hard disk, and the available capacity coefficient of each hard disk; the ratio of the required storage capacity to the supplied storage capacity is used as the ratio coefficient between the compute nodes and the storage nodes.
[0105] The proportionality coefficient indicates the supply relationship between compute nodes and storage nodes. Demand storage capacity refers to the storage resources required by a compute node to maintain its own computing tasks. Supply storage capacity is the storage resources provided by storage nodes to compute nodes. The available capacity coefficient is used to deduct the storage capacity occupied by a single hard drive on a storage node.
[0106] To balance high availability and resource utilization in the storage pool, the storage resources required by compute nodes and the storage resources that the storage nodes can provide should be matched to reduce storage resource waste. For example, when the storage capacity supplied by a storage node exceeds the storage capacity required by a compute node, storage resources are wasted. When the storage capacity supplied by a storage node cannot meet the storage capacity required by a compute node, the compute node's needs cannot be met, and the compute node may be interrupted when performing business tasks.
[0107] The required storage capacity of a compute node is calculated by multiplying the number of virtual machines supplied by the compute node by the storage capacity required by each virtual machine.
[0108] Calculate the product of the number of hard drives, the capacity of a single hard drive, and the available capacity coefficient of each hard drive for the storage node. If data replicas need to be created when storing data to avoid data loss, the ratio of this product to the number of data replicas should be used as the storage capacity supplied by the storage node.
[0109] For example, assuming a single compute node can support approximately 25 8C virtual machines, and each virtual machine requires 600GB of storage, with each storage node using 12 hard drives (7.68TB per drive), an available capacity factor of 0.82, and 3 data replicas, the ratio of compute nodes to storage nodes can be calculated.
[0110] The required storage capacity for a single compute node = 25 * 600G / 1024 = 14.65T;
[0111] The available storage capacity of a single storage node = 7.68T * 12 * 0.82 / 3 = 25.19T;
[0112] The ratio of compute nodes to storage nodes is then:
[0113] Compute node: Storage node = 1.72:1.
[0114] Determine the ratio between the number of computing nodes and the scaling factor. Based on the ratio and the configuration requirements of the storage pools in the target area, determine the number of storage pools in the target area. The product of the number of storage pools and the storage nodes in the storage pools is taken as the number of storage nodes that need to be deployed in the target area.
[0115] Based on the ratio between compute nodes and storage nodes, the theoretical number of storage nodes is calculated. Then, based on the configuration requirements of the storage pool, the number of storage pools required for the theoretical number of storage nodes is determined. Finally, the product of the number of storage pools and the number of storage nodes in the storage pools is taken as the number of storage nodes that need to be deployed in the target area.
[0116] For example, if the configuration requirement of a storage pool includes 32 storage nodes per storage pool, and the pools are built together with dual fault domains, then the number of storage pools = {number of compute nodes / 1.72] / 32} rounded up to the nearest even integer. Therefore, the required number of storage nodes = {number of compute nodes / 1.72] / 32} rounded up to the nearest even integer × 32.
[0117] By establishing a fixed ratio between compute nodes and storage nodes, and constraining the configuration requirements of the storage pool according to rules, the calculated number of storage nodes ensures that it meets both business needs and high availability, thereby reducing the waste of storage resources.
[0118] S302. The product of the number of storage nodes and the number of hard disks in the storage nodes is used as the storage resource requirement data for the target area.
[0119] After determining the number of storage nodes, the product of the number of storage nodes and the number of hard drives in the storage nodes is the storage resource requirement data for the target area.
[0120] S303. Based on the storage resource demand data of multiple target areas, generate storage resource demand data for the data center, and generate resource calculation results based on the number of computing nodes, the number of bare metals, and the storage resource demand data.
[0121] After generating the resource calculation results, the required equipment cost corresponding to the resource calculation results can also be calculated as follows: Calculation resource requirement data × Single calculation cost + Storage resource requirement data × Single storage cost + Number of bare metals × Single bare metal cost + Number of base devices for resource domain management nodes × Single base device cost + Number of base devices for unified meta management platform × Single base device cost.
[0122] This application provides a resource calculation method that determines the number of storage nodes to be deployed in a target area by measuring the number of computing nodes and the supply relationship between computing nodes and storage nodes. The product of the number of storage nodes and the number of hard disks in the storage nodes is used as the storage resource requirement data for the target area. Based on the storage resource requirement data of multiple target areas, storage resource requirement data for the data center is generated. By using a fixed supply relationship between computing nodes and storage nodes, it is ensured that the calculated number of storage nodes can meet both business needs and high availability, thereby reducing storage resource waste.
[0123] Figure 4 This is a schematic diagram of the structure of a resource calculation device provided in an embodiment of this application, as shown below. Figure 4 As shown, the resource calculation device 40 provided in this embodiment includes:
[0124] The acquisition module 401 is used to acquire resource requirement data of at least one virtual machine in each target area of the data center, as well as resource requirement data of multiple containers associated with the virtual machine.
[0125] The processing module 402 is used to determine the total demand for each type of resource based on the demand data corresponding to each type of resource in the resource demand data of at least one virtual machine, and to determine the number of computing nodes to be deployed in the target area based on the total demand for each type of resource.
[0126] The processing module 402 is also used to determine the demand type of each container based on the resource demand data of multiple containers and the preset sharing mode, and to determine the amount of bare metal required by multiple containers based on the demand type of each container.
[0127] The generation module 403 is used to generate resource calculation results for the data center based on the number of computing nodes and the number of bare metals corresponding to each target area of the data center.
[0128] In one possible implementation, the processing module 402 is further configured to identify redundant resources from historical operation and maintenance data, and determine the resource redundancy ratio of the redundant resources in the total resources. The resource redundancy includes: version iteration redundancy, resource fragment redundancy, and downtime emergency redundancy. Based on the resource redundancy ratio, the redundancy compensation calculation is performed on the total demand of various types of resources to obtain the actual total demand of various types of resources.
[0129] In one possible implementation, the various resources include processor resources and memory resources. The processing module 402 is further configured to: determine the virtual machine capacity threshold for each computing node based on the ratio of the total demand for processor resources and memory resources to the resource capacity threshold of the computing node's processor resources and memory resources, according to the virtual machine multiplier, and calculate the ratio of the total demand for virtual machines to the virtual machine capacity threshold of the computing node; and take the maximum value among the ratios as the number of computing nodes to be deployed in the target area.
[0130] In one possible implementation, when determining the number of bare metals, the processing module 402 specifically performs the following: based on the resource requirement data of each container, it determines whether the resource requirement data meets the requirement threshold for the exclusive type; if so, it determines that the requirement type of the container is exclusive, and the exclusive type container exclusively occupies one bare metal; if not, it determines that the requirement type of the container is shared; N shared type containers share one bare metal; N is a positive integer greater than 1; based on the ratio of the number of exclusive type containers to the number of shared type containers to N, it determines the number of bare metals required by multiple containers.
[0131] In one possible implementation, the resource calculation results include: base equipment requirement data; the generation module 403 is also used to calculate the ratio of the number of bare metals, the number of computing nodes, and the capacity threshold corresponding to the resource domain, and round up to select the maximum value as the number of resource domains in the target area; the ratio between the sum of the number of resource domains in each target area of the data center and the resource domain capacity threshold of the unified cloud management platform is used as the number of unified cloud management platforms; based on the number of resource domains and the number of unified cloud management platforms, the base equipment requirement data is determined, which includes: the number of base equipment required for the management nodes of the resource domains and the number of base equipment required for the unified cloud management platform.
[0132] In one possible implementation, the resource calculation results also include: storage resource demand data. The generation module 403 is further used to determine the number of storage nodes that need to be deployed in the target area based on the number of computing nodes and the supply relationship between computing nodes and storage nodes; to use the product of the number of storage nodes and the number of hard disks of the storage nodes as the storage resource demand data of the target area; and to generate storage resource demand data of the data center based on the storage resource demand data of multiple target areas.
[0133] In one possible implementation, the generation module 403 is further configured to: determine the required storage capacity of the compute nodes based on the number of virtual machines supplied by the compute nodes and the storage capacity required by each virtual machine; determine the supplied storage capacity of the storage nodes based on the number of hard disks, the capacity of a single hard disk, and the available capacity coefficient of each hard disk; use the ratio of the required storage capacity to the supplied storage capacity as a proportionality coefficient between the compute nodes and the storage nodes, the proportionality coefficient indicating the supply relationship between the compute nodes and the storage nodes; determine the ratio between the number of compute nodes and the proportionality coefficient, and determine the number of storage pools in the target area based on the ratio and the configuration requirements of the storage pools in the target area; and use the product of the number of storage pools and the storage nodes in the storage pools as the number of storage nodes to be deployed in the target area.
[0134] The resource calculation device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0135] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device 50 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the electronic device 50 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus.
[0136] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.
[0137] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0138] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0139] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0140] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0141] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0142] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0143] When integrated units / modules are implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor can be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.
[0144] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application.
[0145] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0146] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0147] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.
[0148] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0149] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0150] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0151] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A resource measurement method, characterized in that, include: For each target area of the data center, obtain the resource requirement data of at least one virtual machine in the target area, as well as the resource requirement data of multiple containers associated with the virtual machine; Based on the resource requirement data of at least one of the virtual machines, determine the total requirement of each type of resource, and based on the total requirement of each type of resource, determine the number of computing nodes to be deployed in the target area. Based on the resource requirement data of the multiple containers and the preset sharing mode, the requirement type of each container is determined, and based on the requirement type of each container, the amount of bare metal required by the multiple containers is determined. Based on the number of computing nodes and the amount of bare metal corresponding to each target area of the data center, the resource calculation results of the data center are generated.
2. The method according to claim 1, characterized in that, The step of determining the total demand for each type of resource based on the demand data corresponding to each type of resource in the resource demand data of at least one of the virtual machines includes: Redundant resources are identified from historical operation and maintenance data, and the proportion of redundant resources in the total resources is determined. The resource redundancy includes: version iteration redundancy, resource fragment redundancy, downtime emergency redundancy, and daily emergency expansion redundancy. Based on the resource redundancy ratio, redundancy compensation calculations are performed on the total demand for each type of resource to obtain the actual total demand for each type of resource.
3. The method according to claim 1, characterized in that, The various resources include processor resources and memory resources. Determining the number of computing nodes to be deployed in the target area based on the total demand for each type of resource includes: The ratio of the total demand for processor and memory resources to the resource capacity threshold of the computing node; Based on the virtual machine multiplier, determine the virtual machine capacity threshold for each compute node, and calculate the ratio of the total demand for virtual machines to the virtual machine capacity threshold of the compute node. The maximum value among the ratios is taken as the number of computing nodes that need to be deployed in the target area.
4. The method according to claim 1, characterized in that, The process of determining the demand type of each container based on the resource requirement data of the multiple containers and a preset sharing mode, and then determining the required amount of bare metal for each container based on its demand type, includes: Based on the resource requirement data of each container, determine whether the resource requirement data meets the requirement threshold of the dedicated type; If so, then the demand type of the container is determined to be exclusive, and the exclusive type container exclusively occupies one bare metal unit; If not, then the required type of the container is determined to be shared; N containers of the shared type share one bare metal; N is a positive integer greater than 1; The required amount of bare metal for the multiple containers is determined based on the ratio of the number of exclusive type containers to the number of shared type containers to N.
5. The method according to claim 1, characterized in that, The resource calculation results include: base equipment requirement data; and the generation of resource calculation results for the data center based on the number of computing nodes and bare metal quantity corresponding to each target area of the data center, including: Calculate the ratios of the number of bare metals, the number of computing nodes, and the capacity threshold corresponding to the resource domain, respectively, and round up to select the maximum value as the number of resource domains in the target area; The ratio between the total number of resource domains in each target area of the data center and the resource domain capacity threshold of the unified cloud management platform is taken as the number of unified cloud management platforms. Based on the number of resource domains and the number of unified cloud management platforms, the base equipment requirement data is determined. The base equipment requirement data includes: the number of base equipment required for the management nodes of the resource domains and the number of base equipment required for the unified cloud management platforms. Based on the amount of bare metal, the number of computing nodes, and the base equipment requirements, the resource calculation results of the data center are generated.
6. The method according to claim 1, characterized in that, The resource assessment results also include: storage resource requirement data. The generation of resource assessment results for the data center based on the number of computing nodes and the amount of bare metal corresponding to each target area of the data center includes: Based on the number of computing nodes and the supply relationship between computing nodes and storage nodes, determine the number of storage nodes that need to be deployed in the target area; The product of the number of storage nodes and the number of hard disks in the storage nodes is used as the storage resource requirement data for the target area. Based on the storage resource demand data of multiple target areas, the storage resource demand data of the data center is generated, and based on the number of computing nodes, the number of bare metals, and the storage resource demand data, the resource calculation results are generated.
7. The method according to claim 6, characterized in that, Determining the number of storage nodes to be deployed in the target area based on the number of computing nodes and the supply relationship between computing nodes and storage nodes includes: Based on the number of virtual machines supplied by the compute node and the storage capacity required by each virtual machine, determine the required storage capacity of the compute node; The available storage capacity of the storage node is determined based on the number of hard drives, the capacity of a single hard drive, and the available capacity coefficient of each hard drive. The ratio of the required storage capacity to the supplied storage capacity is used as a proportionality coefficient between the computing nodes and storage nodes, and the proportionality coefficient is used to indicate the supply relationship between the computing nodes and storage nodes; Determine the ratio between the number of computing nodes and the proportional coefficient, and based on the ratio and the configuration requirements of the storage pools in the target area, determine the number of storage pools in the target area; The product of the number of storage pools and the storage nodes in the storage pools is taken as the number of storage nodes that need to be deployed in the target area.
8. A resource measurement device, characterized in that, include: The acquisition module is used to acquire resource requirement data of at least one virtual machine in each target area of the data center, as well as resource requirement data of multiple containers associated with the virtual machine. The processing module is used to determine the total demand for each type of resource based on the demand data corresponding to each type of resource in the resource demand data of at least one of the virtual machines, and to determine the number of computing nodes to be deployed in the target area based on the total demand for each type of resource. The processing module is further configured to determine the demand type of each container based on the resource demand data of the multiple containers and a preset sharing mode, and to determine the amount of bare metal required by the multiple containers based on the demand type of each container. The generation module is used to generate resource calculation results for the data center based on the number of computing nodes and the number of bare metals corresponding to each target area of the data center.
9. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 7.
11. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 7.