Virtual resource allocation methods, devices, electronic equipment, media and program products
By integrating and virtualizing resources between the control server and the controlled server to generate a virtual resource pool, the problem of resource fragmentation on a single server is solved, and more efficient resource utilization and allocation are achieved.
Patent Information
- Application Number
- CN202410368017.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-28
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-03-28
AI Technical Summary
In existing technologies, the resources of a single server are fragmented and difficult to utilize, resulting in serious resource waste, especially in clusters where resources cannot be effectively allocated.
By connecting the control server and the controlled servers via a high-speed serial bus, the resources of all controlled servers are integrated and virtualized to generate a virtual resource pool. The virtual resource pool is then matched and allocated as a whole according to user needs, avoiding the fragmentation of individual servers.
This reduces fragmentation in the resource matching process, improves the resource utilization of a single controlled server, reduces resource waste, and enhances resource scheduling efficiency.
Smart Images

Figure CN118377574B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a virtual resource allocation method, apparatus, electronic device, medium, and program product. Background Technology
[0002] A cloud computing resource pool refers to the collection of various hardware and software involved in a cloud computing data center, which generally includes computing resources, storage resources, and network resources. Currently, with the widespread application of cloud computing technology, cloud computing resource pools of various sizes have emerged, including large-scale centralized cloud computing resource pools and distributed cloud computing resource pools.
[0003] In related technologies, virtualization technology is generally used to virtualize a single server. This means that all the resources of a server are virtualized into multiple functionally independent virtual machines, each with its own resources. These independent virtual machines are then allocated to users.
[0004] However, the above technologies have the problem of numerous fragmented resources on a single server that are difficult to utilize, leading to resource waste. Summary of the Invention
[0005] This invention provides a virtual resource allocation method, apparatus, electronic device, medium, and program product to address the shortcomings of existing technologies where there are many fragmented resources on a single server that are difficult to utilize, thereby achieving the technical effect of reducing server resource waste.
[0006] This invention provides a virtual resource allocation method applied to a management and control system. The management and control system includes a control server and at least one controlled server, with the control server and each controlled server connected via a high-speed serial bus. The method includes:
[0007] Obtain the user's resource requirements; the above resource requirements include relevant resource information of the resources required by the user;
[0008] Based on the relevant resource information, a match is made in the virtual resource pool corresponding to the control server to determine the target virtual resource that matches the relevant resource information; wherein, the aforementioned virtual resource pool is generated by the control server after integrating and virtualizing the resources of at least one controlled server;
[0009] Allocate the target virtual resources to the user.
[0010] According to a virtual resource allocation method provided by the present invention, the aforementioned relevant resource information includes the required resource size and the required resource type. The method involves matching the relevant resource information within a virtual resource pool corresponding to the control server to determine a target virtual resource that matches the relevant resource information, including:
[0011] Identify candidate resources in the virtual resource pool that match the required resource type;
[0012] Candidate resources are segmented according to the required resource size to determine the target virtual resources that match the required resource size; the aforementioned target virtual resources are a combination of resources from one or more controlled servers.
[0013] According to a virtual resource allocation method provided by the present invention, the above-mentioned allocation of target virtual resources to users includes:
[0014] Identify the target virtual server, which consists of the target virtual resources; the target virtual server is a combination of one or more of the controlled servers.
[0015] Send the login information corresponding to the target virtual server to the user's corresponding user terminal or user server.
[0016] According to a virtual resource allocation method provided by the present invention, the at least one controlled server includes multiple controlled servers, and further includes:
[0017] The control server and each controlled server are identified among multiple servers; all servers other than the control server are controlled servers.
[0018] The resources of each controlled server are integrated and virtualized to generate a virtual resource pool corresponding to the control server; the virtual resource pool includes the resources of all controlled servers.
[0019] According to a virtual resource allocation method provided by the present invention, the above-mentioned integration and virtualization of the resources of each controlled server to generate a virtual resource pool corresponding to the control server includes:
[0020] Send a first control instruction to each controlled server; the first control instruction includes a first machine identifier of the control server and is used to instruct the controlled server to change its second machine identifier to the first machine identifier.
[0021] Based on the time when each controlled server changed its second machine identifier to its first machine identifier, the resources of each controlled server are incorporated into the control server, and the controlled servers are virtualized to generate a virtual resource pool corresponding to the control server.
[0022] According to a virtual resource allocation method provided by the present invention, the above-mentioned method involves incorporating the resources of each controlled server into the control server based on the change time when each controlled server changes its second machine identifier to its first machine identifier, and performing virtualization processing on the controlled servers to generate a virtual resource pool corresponding to the control server, including:
[0023] Based on the time when each controlled server changed its second machine identifier to its first machine identifier, candidate addresses were sequentially determined for each controlled server using a preset address allocation method.
[0024] Send a second control instruction to each controlled server; the second control instruction includes a candidate address assigned to each controlled server and is used to instruct the controlled server to update its original address according to the candidate address;
[0025] The controlled servers are virtualized based on their candidate addresses to generate a virtual resource pool corresponding to the control server.
[0026] According to a virtual resource allocation method provided by the present invention, the above-mentioned candidate addresses to be allocated to each controlled server are determined sequentially according to the change time of each controlled server changing the second machine identifier to the first machine identifier using a preset address allocation method, including:
[0027] Based on the time when each controlled server changed its second machine identifier to its first machine identifier, a virtual identifier is generated for each controlled server; the virtual identifiers of each controlled server are different.
[0028] Candidate addresses are determined sequentially for each controlled server based on the virtual identifier and address allocation method.
[0029] The present invention also provides a virtual resource allocation device for use in a management and control system. The management and control system includes a control server and at least one controlled server, wherein the control server and each controlled server are connected via a high-speed serial bus.
[0030] The acquisition module is used to acquire the user's resource requirements; the resource requirements include relevant resource information of the resources required by the user.
[0031] The matching module is used to match the relevant resource information in the virtual resource pool corresponding to the control server, and determine the target virtual resource that matches the relevant resource information; wherein, the virtual resource pool is generated by the control server after integrating and virtualizing the resources of at least one controlled server;
[0032] The resource allocation module is used to allocate target virtual resources to users.
[0033] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the virtual resource allocation method as described above.
[0034] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the virtual resource allocation method as described above.
[0035] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the virtual resource allocation method as described above.
[0036] The virtual resource allocation method, apparatus, electronic device, medium, and program products provided by this invention are applied to a management and control system. This system includes a control server and at least one controlled server, connected via a high-speed serial bus. The system primarily acquires user resource requirements, matches them against relevant resource information from the control server's virtual resource pool based on these requirements, identifies target virtual resources matching the relevant information, and then allocates these target virtual resources to the user. The virtual resource pool is generated by the control server after integrating and virtualizing the resources of at least one controlled server. In this method, because the resources of all controlled servers can be integrated and virtualized into the control server's own virtual resource pool beforehand, resource matching according to user requirements can be performed as a whole within this virtual resource pool. This eliminates the need to segment individual controlled servers before matching, reducing fragmented resources during the matching process and thus minimizing resource waste on individual controlled servers, resulting in higher resource utilization per controlled server. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0038] Figure 1 This is a topology diagram of the management and control system provided by the present invention;
[0039] Figure 2 This is one of the flowcharts illustrating the virtual resource allocation method provided by the present invention;
[0040] Figure 3 This is the second flowchart illustrating the virtual resource allocation method provided by the present invention;
[0041] Figure 4 This is the third flowchart of the virtual resource allocation method provided by the present invention;
[0042] Figure 5 This is the fourth flowchart of the virtual resource allocation method provided by the present invention;
[0043] Figure 6 This is the fifth flowchart illustrating the virtual resource allocation method provided by the present invention;
[0044] Figure 7 This is a resource integration block diagram of the virtual resource allocation method provided by the present invention;
[0045] Figure 8 This is a schematic diagram of the structure of the virtual resource allocation device provided by the present invention;
[0046] Figure 9 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0048] Currently, virtualization technology is generally used to virtualize a single server. This involves virtualizing all the resources of a server into multiple functionally independent virtual machines (VMs), each with its own resources, and then allocating these VMs to users. However, this technology typically divides the server's resources into small blocks. When a user needs resources, these resources are combined to obtain the required resources. Since resources are usually configured holistically, there's a possibility that there might be enough resources of type A for allocation, but insufficient resources of type B, resulting in unavailable resources for users. This leads to numerous fragmented resources remaining on the server, which may become unusable later. In clusters with many servers, this fragmentation becomes even more pronounced, severely wasting server resources. Therefore, this invention provides a virtual resource allocation method, apparatus, electronic device, medium, and program product to solve these problems.
[0049] The following is combined with Figures 1-7 The present invention describes a virtual resource allocation method.
[0050] First, the application environment of this invention will be described. The virtual resource allocation method of this invention can be applied to management and control systems. See [link to relevant documentation]. Figure 1 The diagram shows the topology of a management and control system. This system includes a control server and at least one controlled server, connected via a high-speed serial bus. The system may also include a management and control platform, which can be installed on the control server or serve as a separate server within the system. This platform primarily controls and manages the resources of the cloud computing resource pool (i.e., the subsequent virtual resource pool), performing virtualization processes to obtain cloud hosts, cloud storage, etc.
[0051] In addition, the control server and each controlled server can be connected via a high-speed serial bus. The type of high-speed serial bus can be PCI Express (Peripheral Component Interconnect Express) or HyperTransport (HT bus), etc. Of course, when there are a large number of controlled servers, the control server and each controlled server can also be connected via a bus switch. This bus switch, also known as a PCIe switch, is responsible for server addressing, data, and control signal transmission. Internally, this bus switch uses a parallel configuration. It can include a data bus switch and a control bus switch. The data bus switch handles data transmission between servers, while the control bus switch handles resource addressing within the virtual resource pool; it is specifically used for address transmission and can also be called an address bus switch.
[0052] The aforementioned control server and each controlled server can serve as the basic resource unit of the entire cloud computing resource pool (i.e., the subsequent virtual resource pool). That is, a server is a basic resource unit that can be dynamically and elastically expanded to provide raw resources such as CPU (Central Processing Unit) / GPU (Graphics Processing Unit), memory / flash memory, and hard disk.
[0053] Furthermore, the control server / control management platform and each controlled server can also be connected via Ethernet and IPMI (Intelligent Platform Management Interface) for remote management of all servers, such as power on / off and resource monitoring.
[0054] By connecting the control server and each controlled server through a high-speed serial bus or bus switch, high-speed, low-latency bus communication can be achieved, improving data transmission efficiency.
[0055] It should be noted that the execution subject of the embodiments of the present invention may be the above-mentioned management and control system, or the management and control platform in the management and control system, or the control server, or the virtual resource allocation device in the control server, or the electronic device in the control server. The following embodiments will use the electronic device in the control server as the execution subject to describe the virtual resource allocation method of the present invention.
[0056] Figure 2 This is one of the flowcharts illustrating the virtual resource allocation method provided by the present invention. This embodiment relates to how to allocate the resources needed by users while reducing resource waste. See [link to relevant documentation]. Figure 2 As shown, the method may include the following steps:
[0057] S202, Obtain the user's resource requirements; the above resource requirements include relevant resource information of the resources required by the user.
[0058] Here, a user's resource requirement represents their desire to allocate resources. This requirement may include relevant resource information, as well as other information such as the user's identity information. The resources the user wants to allocate can be virtual or physical resources.
[0059] The resource information included in the resource requirements can include the required resource size and the required resource type. The required resource size refers to the amount of resources needed by the user, and the required resource type refers to the type of resources the user needs, which can be one type or a combination of multiple types. The resource type can generally include computing resources, storage resources, network resources, etc., so the user's required resource type can be one or more of these three resource types.
[0060] Specifically, when a user has a need to allocate resources, the user can input relevant resource information such as the size and type of resources required into the corresponding electronic device. This information is then packaged into the user's resource requirements, allowing the electronic device to obtain the user's resource requirements.
[0061] S204, Matching is performed in the virtual resource pool corresponding to the control server based on the relevant resource information to determine the target virtual resource that matches the relevant resource information; wherein, the aforementioned virtual resource pool is generated by the control server after integrating and virtualizing the resources of at least one controlled server.
[0062] The control server can pre-integrate the resources of each controlled server, and after virtualizing the resources of each controlled server, convert them all into virtual resources of the control server, forming a large virtual resource pool, which serves as the control server's virtual resource pool. This virtual resource pool can include various types of resources.
[0063] After obtaining the user's resource requirements, the resources in the virtual resource pool of the controlled server can be segmented based on the relevant resource information to obtain the target virtual resources required by the user. Generally, this segmentation can be performed on the resources of the controlled server as a whole, specifically from the perspective of the controlling server. Therefore, it can reduce the fragmentation of resources on the controlled server, thereby reducing resource waste and improving resource utilization.
[0064] S206, allocate the target virtual resource to the user.
[0065] In this step, after obtaining the target virtual resources that match the user's needs, the target virtual server composed of the target virtual resources can be identified. Then, the login information corresponding to the target virtual server is determined, and the login information corresponding to the target virtual server is sent to the user's corresponding user terminal or user server. This enables the allocation of the target virtual resources to the user, who can then log in using the login information to access and use the corresponding target virtual resources. The aforementioned target virtual server is a combination of one or more controlled servers.
[0066] The aforementioned virtual resource allocation method is applied to a management and control system. This system includes a control server and at least one controlled server, connected via a high-speed serial bus. The method primarily involves acquiring user resource requirements, matching them against the relevant resource information in the control server's virtual resource pool, identifying the target virtual resource that matches the relevant resource information, and then allocating the target virtual resource to the user. The virtual resource pool is generated by the control server after integrating and virtualizing the resources of at least one controlled server. This method allows for the integration and virtualization of all controlled server resources into the control server's own virtual resource pool. Therefore, resource matching based on user requirements can be performed entirely within this virtual resource pool, eliminating the need to segment individual controlled servers before matching. This reduces fragmented resources during the matching process, minimizing resource waste on individual controlled servers and increasing resource utilization per server.
[0067] The above embodiments mention that the relevant resource information may include the user's required resource size and required resource type. The following embodiments will explain how to obtain the user's target virtual resources when the relevant resource information includes these two aspects.
[0068] Figure 3 This is the second flowchart illustrating the virtual resource allocation method provided by the present invention. The aforementioned relevant resource information includes the required resource size and the required resource type. Based on the above embodiments, see [link to relevant documentation]. Figure 3 As shown, the above S204 may include the following steps:
[0069] S302, Identify candidate resources in the virtual resource pool that match the required resource type.
[0070] In this step, the virtual resource pool of the control server includes all the resources of multiple controlled servers. Each controlled server can have multiple types of resources, such as computing resources (e.g., CPU / GPU) and storage resources (e.g., memory / flash).
[0071] After obtaining the user's resource requirements, we can determine the required resource size and type. Generally, the required resource type is mostly virtual CPU / GPU resources, which are crucial components of the virtual machine. Then, resources matching the required resource type can be found in the virtual resource pool and recorded as candidate resources.
[0072] S304, divide the candidate resources according to the required resource size and determine the target virtual resource that matches the required resource size; the target virtual resource is a combination of resources from one or more controlled servers.
[0073] In this step, after obtaining candidate resources that match the required resources, assuming the obtained resources are candidate CPU / GPU resources, these candidate CPU / GPU resources can be segmented or partitioned to extract CPU / GPU resources that match the user's required resource size, which will then serve as the user's target virtual resource. Here, the target virtual resource matching the user's required resource size can generally be a virtual resource of the same size as the required resource, or a virtual resource that is slightly larger than the required resource size.
[0074] In addition, when splitting or dividing, the resources of the controlled server are generally split or divided as a whole, rather than splitting or dividing a single controlled server into smaller parts. The target virtual resources obtained can generally be a combination of resources from one or more controlled servers. This can significantly reduce the problem of severe resource fragmentation and waste caused by splitting resources on a single server, and effectively reduce resource waste.
[0075] In this embodiment, by first determining candidate resources that match the required resource type in the virtual resource pool, and then dividing the candidate resources according to the required resource size to obtain the matching target virtual resource, and the target virtual resource is a combination of resources from one or more controlled servers, the problem of severe resource fragmentation and waste caused by resource division on a single server can be greatly reduced, effectively reducing resource waste.
[0076] The above embodiments illustrate that the control server can pre-integrate and virtualize the resources of each controlled server into its own resources. In the case where at least one controlled server includes multiple controlled servers, the following embodiments will explain how to integrate and virtualize the resources of each controlled server into its own resources.
[0077] Figure 4 This is the third flowchart of the virtual resource allocation method provided by the present invention. Based on the above embodiments, see also... Figure 4 As shown, the above method may further include the following steps:
[0078] S402, determine the control server and each controlled server among multiple servers; all servers other than the control server are controlled servers.
[0079] In this step, the control and management system includes multiple servers. A control server can be determined from these servers. Then, all the other servers besides the control server are controlled servers. Generally, there are also multiple controlled servers.
[0080] When selecting a control server from multiple servers, the selection can be based on certain conditions, such as computing power requirements or bandwidth requirements. Generally, a server with better computing power can be selected as the control server.
[0081] In addition, each of the above servers has its own corresponding resources, such as computing resources and storage resources.
[0082] S404 integrates and virtualizes the resources of each controlled server to generate a virtual resource pool corresponding to the control server; the virtual resource pool includes the resources of all controlled servers.
[0083] In this step, after identifying the control server and the controlled servers, the control server can integrate the resources of each controlled server into a large resource pool with its own resources. The control server then performs virtualization processing, virtualizing all the resources of each controlled server into virtual resources of the control server. That is, all the resources of the controlled servers and the control server are in a virtual resource pool, and all of them are used as virtual resources of the control server for subsequent allocation.
[0084] The virtualization of the control server described above can be achieved by installing and running virtualization software on the control server. This virtualization software could be, for example, VMware (Virtual Machine ware), KVM (Kernel-based Virtual Machine), or other similar software. By virtualizing the control server, both the control server and the controlled servers can be divided into multiple virtual servers. Each virtual server can independently run a different operating system, and the control server can run multiple operating systems, thus fully utilizing the resources of both the control server and the controlled servers.
[0085] In this embodiment, after determining the controlled server and the controlled server among multiple servers, the resources of each controlled server are integrated and virtualized to generate a virtual resource pool for the control server. This can avoid the serious fragmentation problem of traditional cloud computing resource pools (i.e., virtual resource pools), improve the utilization rate of virtual resource pools, and also improve the resource scheduling efficiency of virtual resource pools, which is suitable for computing center scenarios.
[0086] The following examples illustrate how the control server integrates and virtualizes the resources of each controlled server.
[0087] Figure 5 This is the fourth flowchart of the virtual resource allocation method provided by the present invention. Based on the above embodiments, see also... Figure 5 As shown, the above S404 may include:
[0088] S502, send a first control instruction to each controlled server; the first control instruction includes a first machine identifier of the control server and is used to instruct the controlled server to change its second machine identifier to the first machine identifier.
[0089] In this step, when the control server integrates the resources of each controlled server, it can first send a first control command to each controlled server via a high-speed serial bus and bus switch. This first control command instructs the corresponding controlled server to change its own machine identifier to the control server's machine identifier. Specifically, the first control command may include the control server's machine identifier (denoted as the first machine identifier) and instruction information. The instruction information instructs the controlled server, upon receiving the first machine identifier information, to change its own machine identifier (denoted as the second machine identifier) to the first machine identifier, i.e., to the same machine identifier as the control server.
[0090] For example, suppose the machine identifier of the control server is 0, and the machine identifiers of each controlled server are from 1, ..., N (N is a natural number greater than 1). Then, the machine identifiers of each controlled server, 1, ..., N, can be changed to the machine identifier 0 of the control server.
[0091] S504: Based on the time when each controlled server changed its second machine identifier to its first machine identifier, the resources of each controlled server are incorporated into the control server, and the controlled servers are virtualized to generate a virtual resource pool corresponding to the control server.
[0092] In this step, after receiving the first control instruction sent by the control server, each controlled server can change its own second machine identifier to the first machine identifier of the control server according to the first control instruction. At the same time, it can send a response message to the control server, which indicates that the corresponding controlled server has completed the change of its own machine identifier. The response message can include the time when the controlled server changed its machine identifier. The change time can be the time when the controlled server completed the change of its machine identifier.
[0093] After receiving response messages from each controlled server, the control server can obtain the change time of each controlled server's machine identifier. Once each controlled server changes its machine identifier to the control server's machine identifier, it can be considered that the controlled server is under the control server's management. Therefore, the aforementioned change time represents the time when the corresponding controlled server was brought under the control server's management. Subsequently, based on the change time of each controlled server's machine identifier, each controlled server can be added to the control server's management list. The resources of each controlled server are then converted into the control server's resources. Finally, virtualization processing is performed on the control server's resources to obtain the control server's virtual resource pool.
[0094] In this embodiment, control commands including the machine identifier of the control server are sent to each controlled server to instruct each controlled server to change its own machine identifier to the machine identifier of the controlled server according to the control commands. Then, based on the change time of the machine identifier of each controlled server, each controlled server is incorporated into the control server and virtualized to generate a virtual resource pool. In this way, by changing the machine identifier of each controlled server, the resources of each controlled server can be quickly incorporated into the control server, which facilitates the subsequent fast and accurate scheduling and data storage of the resources of each controlled server.
[0095] The following examples illustrate the need to continue changing the addresses of each controlled server after it has been incorporated into the management of the control server in order to perform resource scheduling and data storage.
[0096] Figure 6 This is the fifth flowchart of the virtual resource allocation method provided by the present invention. Based on the above embodiments, see also... Figure 6 As shown, the above S504 may include:
[0097] S602, according to the time when each controlled server changes the second machine identifier to the first machine identifier, the candidate addresses to be allocated to each controlled server are determined sequentially using a preset address allocation method.
[0098] In this step, after obtaining the change time of the machine identifier of each controlled server, the change time of each controlled server can represent the time when the corresponding controlled server was included in the management of the control server. As an optional embodiment, virtual identifiers of each controlled server can be generated according to the change time when each controlled server changes the second machine identifier to the first machine identifier; and candidate addresses are sequentially determined for each controlled server according to each virtual identifier and address allocation method; the virtual identifiers of each controlled server are different.
[0099] In other words, the update times of each controlled server's self-identity can be sorted, and different labels can be assigned to each controlled server according to the sorting results, thus obtaining a label for each controlled server, which is recorded as a virtual identifier. When setting labels according to the sorting results, for example, the controlled server with an earlier update time will have its virtual identifier placed earlier. For example, different virtual identifiers can be assigned to each controlled server sequentially according to 1, 2, 3, 4, etc.
[0100] Then, based on the preset address allocation method and according to the virtual identifier of each controlled server, addresses to be allocated to each controlled server can be generated sequentially from front to back, and these are recorded as candidate addresses. These candidate addresses can include the PC (Program Counter) address and the page table base address. The PC address is a linear address, and generally, the PC address allocated to each controlled server is different. The format and size range of the PC address can be 0xC0000000-0xCFFFFFFF. Furthermore, the page table base address of each controlled server can remain unchanged.
[0101] S604, send a second control instruction to each controlled server; the second control instruction includes a candidate address assigned to each controlled server and is used to instruct the controlled server to update its original address according to the candidate address.
[0102] In this step, after obtaining the candidate address assigned to each controlled server, the candidate address and virtual identifier of each controlled server can be encapsulated in the control command to form the second control command for each controlled server, and the corresponding second control command can be sent to the corresponding controlled server.
[0103] The controlled server can receive the second control command through a high-speed serial bus and bus switch. After receiving the second control command, it can parse its own virtual identifier and candidate address. Then, it can use its own candidate address to update the original address of its own storage device (such as memory) and feed the update back to the control server so that the control server can uniformly manage and control the storage addresses of each controlled server.
[0104] S606 virtualizes the controlled servers based on their candidate addresses to generate a virtual resource pool corresponding to the control server.
[0105] In this step, after changing the machine identifier and address of each controlled server, all controlled servers are brought under the management of the control server, and the resources of each controlled server are converted into the resources of the control server. Then, the control server can be virtualized to generate a virtual resource pool for the control server.
[0106] Additionally, after deleting a controlled server and its corresponding resources, the virtual identifier position corresponding to that controlled server will be vacated. If a new controlled server is added, it will generally first check if there is a vacant position. If there is a vacant position, the new controlled server will be added to the vacant position first. If there is no vacant position, the new controlled server will be added sequentially to the end of the controlled servers managed by the control server, forming a new virtual resource pool.
[0107] In this embodiment, candidate addresses are determined for each controlled server based on the update time of the identifier of each controlled server and the preset address allocation method. The candidate addresses of each controlled server are then sent to the corresponding controlled server for address update via control commands. Finally, the control server is virtualized to generate a virtual resource pool. By changing the addresses of each controlled server, it is possible to quickly and accurately schedule and store the resources of each controlled server in the future.
[0108] To facilitate a detailed description of the technical solution of the present invention, a specific embodiment is given below to illustrate the method of the present invention. (See attached image.) Figure 7 The resource integration diagram shown above, based on the above embodiments, the method may include the following steps:
[0109] 1. All servers are interconnected via a bus switch.
[0110] 2. Power on all servers. For the controlled servers with machine IDs (identifications) from 1 to N, set the CPU / GPU machine ID to 0. That is, set the CPU machine ID of all controlled servers to the same value, and follow the machine ID of the control server under management control.
[0111] 3. The control server with machine ID 0 allocates PC and page table base addresses for the memory or storage (also known as disk or disk disk) of the controlled servers with machine IDs 1 to N. The format is 0xC0000000-0xCFFFFFFF.
[0112] 4. Virtualize the control server with machine ID 0, for example, by installing virtualization software such as VMware or KVM.
[0113] 5. Virtual machines (vCPU / vGPU) of any size can be created according to the needs of the application, and storage can also be RAID striped and virtual storage can be allocated.
[0114] 6. The control server for management and control is equipped with a virtualization management center to manage and allocate all virtual machines or virtual storage.
[0115] 7. The management and control server is equipped with a management and control platform and remotely manages all controlled servers through the IPMI interface, such as power on / off and resource monitoring.
[0116] In this embodiment, all servers in the data center are connected to a bus switch via a high-speed serial midline, achieving high-speed, low-latency bus interconnection. Based on this, data center resources, including CPU / GPU, memory / flash memory, and hard drives, can be integrated, then uniformly virtualized and partitioned for allocation to users. This integrates the data center's CPU / GPU, memory / flash memory, and hard drives into a resource pool, which is then partitioned and allocated according to user needs using virtualization technology. This not only avoids the severe fragmentation of traditional cloud computing resource pools and improves the utilization rate of cloud computing resource pools, but also enhances the resource scheduling efficiency of cloud resource pools, making it suitable for computing center scenarios.
[0117] The virtual resource allocation device provided by the present invention is described below. The virtual resource allocation device described below and the virtual resource allocation method described above can be referred to in correspondence.
[0118] Figure 8 This is a schematic diagram of the virtual resource allocation device provided by the present invention. See also: Figure 8 As shown, this device is applied to a management and control system, which includes a control server and at least one controlled server. The control server and each controlled server are connected via a high-speed serial bus, and may include:
[0119] The acquisition module 710 is used to acquire the user's resource requirements; the resource requirements include relevant resource information of the resources required by the user.
[0120] The matching module 720 is used to match the relevant resource information in the virtual resource pool corresponding to the control server to determine the target virtual resource that matches the relevant resource information; wherein, the virtual resource pool is generated by the control server after integrating and virtualizing the resources of at least one controlled server;
[0121] Resource allocation module 730 is used to allocate target virtual resources to users.
[0122] In an exemplary embodiment, the aforementioned relevant resource information includes the required resource size and the required resource type, the virtual resource pool includes multiple types of candidate resource pools, and the aforementioned matching module 720 may include:
[0123] The type matching unit is used to identify candidate resources in the virtual resource pool that match the required resource type.
[0124] The size matching unit is used to segment candidate resources according to the required resource size and determine the target virtual resource that matches the required resource size; the target virtual resource is a combination of resources from one or more controlled servers.
[0125] In one exemplary embodiment, the resource allocation module 730 described above may include:
[0126] The target virtual server determination unit is used to determine the target virtual server composed of target virtual resources; the target virtual server is a combination of one or more controlled servers.
[0127] The resource allocation unit is used to send the login information corresponding to the target virtual server to the user's corresponding user terminal or user server.
[0128] In one exemplary embodiment, the at least one controlled server includes a plurality of controlled servers, and the apparatus may further include:
[0129] The determination module is used to identify the control server and each controlled server among multiple servers; all servers other than the control server are controlled servers.
[0130] The generation module is used to integrate and virtualize the resources of each controlled server to generate a virtual resource pool corresponding to the control server; the virtual resource pool includes the resources of all controlled servers.
[0131] In one exemplary embodiment, the above-described generation module may include:
[0132] The sending unit is used to send a first control instruction to each controlled server; the first control instruction includes a first machine identifier of the control server and is used to instruct the controlled server to change its own second machine identifier to the first machine identifier.
[0133] The generation unit is used to incorporate the resources of each controlled server into the control server based on the time when each controlled server changes the second machine identifier to the first machine identifier, and to perform virtualization processing on the controlled servers to generate a virtual resource pool corresponding to the control server.
[0134] In one exemplary embodiment, the above-described generating unit may include:
[0135] The address determination subunit is used to determine the candidate addresses to be allocated to each controlled server in sequence according to the change time when each controlled server changes the second machine identifier to the first machine identifier, using a preset address allocation method.
[0136] The sending subunit is used to send a second control instruction to each controlled server; the second control instruction includes a candidate address assigned to each controlled server and is used to instruct the controlled server to update its original address according to the candidate address.
[0137] The generation subunit is used to virtualize the controlled servers based on the candidate addresses of each controlled server, and generate a virtual resource pool corresponding to the control server.
[0138] Optionally, the address determination subunit is specifically used to generate a virtual identifier for each controlled server according to the change time when each controlled server changes the second machine identifier to the first machine identifier; the virtual identifiers of each controlled server are different; and candidate addresses are sequentially determined for each controlled server based on each virtual identifier and the address allocation method.
[0139] Figure 9 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 9 As shown, the electronic device may include a processor 810, a communications interface 820, a memory 830, and a communication bus 840, wherein the processor 810, communications interface 820, and memory 830 communicate with each other via the communication bus 840. The processor 810 can invoke logical instructions in the memory 830 to execute a virtual resource allocation method, which includes: obtaining the user's resource requirements; the resource requirements including relevant resource information of the resources needed by the user; matching the relevant resource information in the virtual resource pool corresponding to the control server to determine the target virtual resource matching the relevant resource information; wherein the virtual resource pool is generated by the control server after integrating and virtualizing the resources of at least one controlled server; and allocating the target virtual resource to the user.
[0140] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium 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 described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0141] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the virtual resource allocation method provided by the above methods. The method includes: obtaining the user's resource requirements; the resource requirements include relevant resource information of the resources required by the user; matching the relevant resource information in the virtual resource pool corresponding to the control server to determine the target virtual resource that matches the relevant resource information; wherein the virtual resource pool is generated by the control server after integrating and virtualizing the resources of at least one controlled server; and allocating the target virtual resource to the user.
[0142] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the virtual resource allocation method provided by the above methods. The method includes: obtaining a user's resource requirements; the resource requirements including relevant resource information of the resources required by the user; matching the relevant resource information in a virtual resource pool corresponding to a control server to determine a target virtual resource that matches the relevant resource information; wherein the virtual resource pool is generated by the control server after integrating and virtualizing the resources of at least one controlled server; and allocating the target virtual resource to the user.
[0143] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0144] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0145] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for allocating virtual resources, characterized in that, The method is applied to a management and control system, which includes a control server and at least one controlled server, wherein the control server and each controlled server are connected via a high-speed serial bus. Obtain the user's resource requirements; the resource requirements include relevant resource information of the cloud computing resources required by the user; the relevant resource information includes resource information of the required virtual central processing unit, memory, and hard disk. The relevant resource information is matched in the cloud computing virtual resource pool corresponding to the control server to determine the target cloud computing virtual resource that matches the relevant resource information; wherein, the cloud computing virtual resource pool is generated by the control server after integrating and then virtualizing the resources of the at least one controlled server; Allocate the target virtual resource to the user; The at least one controlled server includes multiple controlled servers, and the method further includes: The control server integrates and virtualizes the resources of each controlled server through a high-speed serial bus to generate a cloud computing virtual resource pool corresponding to the control server; the cloud computing virtual resource pool includes the resources of all controlled servers; the resources include a central processing unit, memory, and hard disk; The process of integrating and virtualizing the resources of each controlled server via a high-speed serial bus to generate a cloud computing virtual resource pool corresponding to the control server includes: A first control command is sent to each of the controlled servers via a high-speed serial bus; the first control command includes a first machine identifier of the control server and is used to instruct the controlled server to change its second machine identifier to the first machine identifier. The system receives response messages from each of the controlled servers via a high-speed serial bus. The response message indicates that the corresponding controlled server has completed the change of its own machine identifier, and includes the time when the corresponding controlled server changed its second machine identifier to its first machine identifier. Based on the time when each controlled server changes its second machine identifier to its first machine identifier, the resources of each controlled server are incorporated into the control server for management. The resources of the controlled servers managed by the control server are then virtualized to generate a cloud computing virtual resource pool corresponding to the control server. Specifically, the virtualization process involves installing and running virtualization software on the control server to achieve virtualization of the resources of the controlled servers managed by the control server. The virtualization software includes VMware or KVM. The step of incorporating the resources of each controlled server into the control server for management based on the change time when each controlled server changes its second machine identifier to its first machine identifier, and performing virtualization processing on the resources of the controlled servers managed by the control server to generate a cloud computing virtual resource pool corresponding to the control server, includes: Based on the change time when each controlled server changes the second machine identifier to the first machine identifier, candidate addresses are sequentially determined using a preset address allocation method; the change time represents the time when the corresponding controlled server is included in the management of the control server; the candidate addresses include the instruction counter PC address and the page table base address, the PC address allocated to each controlled server is different, and the page table base address of each controlled server remains unchanged; A second control instruction is sent to each of the controlled servers via a high-speed serial bus; the second control instruction includes a candidate address assigned to each of the controlled servers and is used to instruct the controlled server to update its original address according to the candidate address; The resources of the controlled servers managed by the control server are virtualized based on the candidate addresses of each controlled server to generate a virtual resource pool corresponding to the control server.
2. The virtual resource allocation method according to claim 1, characterized in that, The relevant resource information includes the required resource size and the required resource type. The step of matching the relevant resource information within the cloud computing virtual resource pool corresponding to the control server to determine the target cloud computing virtual resource that matches the relevant resource information includes: In the cloud computing virtual resource pool, determine the cloud computing candidate resources that match the required resource type; The candidate cloud computing resources are segmented according to the required resource size to determine the target virtual cloud computing resource that matches the required resource size; the target virtual cloud computing resource is a combination of resources from one or more of the controlled servers.
3. The virtual resource allocation method according to claim 1 or 2, characterized in that, The method further includes: The control server and each of the controlled servers are determined among multiple servers; all servers other than the control server are considered controlled servers.
4. The virtual resource allocation method according to claim 1, characterized in that, The step of determining candidate addresses for each controlled server sequentially using a preset address allocation method, based on the change time when each controlled server changes the second machine identifier to the first machine identifier, includes: A virtual identifier is generated for each of the controlled servers according to the time when the second machine identifier is changed to the first machine identifier; the virtual identifiers of each of the controlled servers are different. Candidate addresses are sequentially determined for each of the controlled servers based on the virtual identifiers and the address allocation method.
5. A virtual resource allocation device, characterized in that, An application in a management and control system, wherein the management and control system includes a control server and at least one controlled server, the control server and each of the controlled servers being connected via a high-speed serial bus, the device comprising: The acquisition module is used to acquire the user's resource requirements; the resource requirements include relevant resource information of the cloud computing resources required by the user; the relevant resource information includes resource information of the required virtual central processing unit, memory, and hard disk. The matching module is used to match the relevant resource information in the cloud computing virtual resource pool corresponding to the control server, and determine the cloud computing target virtual resource that matches the relevant resource information; wherein, the cloud computing virtual resource pool is generated by the control server after integrating and then virtualizing the resources of the at least one controlled server; A resource allocation module is used to allocate the target virtual resource to the user; The at least one controlled server includes multiple controlled servers, and the apparatus further includes: The generation module is used to integrate and virtualize the resources of each of the controlled servers through a high-speed serial bus to generate a cloud computing virtual resource pool corresponding to the control server; the cloud computing virtual resource pool includes the resources of all the controlled servers; the resources include a central processing unit, memory, and hard disk; The generation module includes: The transmitting unit is configured to transmit a first control instruction to each of the controlled servers via a high-speed serial bus; the first control instruction includes a first machine identifier of the control server and is configured to instruct the controlled server to change its second machine identifier to the first machine identifier. The generation unit is used to receive response messages from each of the controlled servers via a high-speed serial bus; the response message indicates that the corresponding controlled server has completed the change of its own machine identifier, and includes the change time when the corresponding controlled server changed its own second machine identifier to the first machine identifier. The generation unit is further configured to, based on the change time when each of the controlled servers changed the second machine identifier to the first machine identifier, incorporate the resources of each of the controlled servers into the control server for management, and perform virtualization processing on the resources of the controlled servers managed by the control server to generate a cloud computing virtual resource pool corresponding to the control server; specifically, when performing virtualization processing on the resources of the controlled servers managed by the control server, virtualization software is installed on the control server and run to realize the virtualization processing of the resources of the controlled servers managed by the control server, and the virtualization software includes VMware or KVM; The generation unit includes: The address determination subunit is used to sequentially determine candidate addresses for each of the controlled servers according to the change time when each controlled server changes the second machine identifier to the first machine identifier, using a preset address allocation method; the change time represents the time when the corresponding controlled server is included in the management of the control server; the candidate address includes the instruction counter PC address and the page table base address, the PC address assigned to each controlled server is different, and the page table base address of each controlled server remains unchanged; A sending subunit is configured to send a second control instruction to each of the controlled servers; the second control instruction includes a candidate address assigned to each of the controlled servers and is configured to instruct the controlled server to update its original address according to the candidate address; A generation subunit is used to virtualize the resources of the controlled servers managed by the control server based on the candidate addresses of each controlled server, and generate a virtual resource pool corresponding to the control server.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the virtual resource allocation method as described in any one of claims 1 to 4.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the virtual resource allocation method as described in any one of claims 1 to 4.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the virtual resource allocation method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Construct method of distributed virtual machine monitor system
CN101398768A