Virtual instance management method based on cloud computing technology, and cloud management platform
By connecting a high-speed interconnect bus and a global memory management node in the cloud management platform, cross-server virtual instance memory sharing is achieved, solving the problems of low cross-server data communication and memory utilization efficiency, improving communication efficiency and memory utilization, and reducing management complexity.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2026-04-02
AI Technical Summary
Existing memory sharing capabilities are limited to the same host and cannot achieve efficient data communication and memory utilization between virtual instances across servers. Although RDMA technology provides remote access to memory across hosts, it is cumbersome to use and does not support multi-host sharing.
By connecting to a high-speed interconnect bus in the cloud management platform, memory sharing of virtual instances across servers can be achieved. A mapping relationship between physical memory and global memory addresses can be established using a global memory management node. Direct read and write operations can be performed on a parallel bus with synchronous memory access semantics. Permission information can be flexibly set to achieve memory sharing and redundancy removal across servers.
It improves the efficiency of data communication between virtual instances across servers, achieves redundancy removal across host memory, improves memory utilization efficiency, and reduces the complexity of memory address management.
Smart Images

Figure CN2025104819_02042026_PF_FP_ABST
Abstract
Description
Virtual instance management method based on cloud computing technology and cloud management platform
[0001] The present application claims priority to the Chinese patent application No. 202411388092.5, filed on September 30, 2024, entitled "Virtual instance management method based on cloud computing technology and cloud management platform", the whole content of which is incorporated herein by reference. TECHNICAL FIELD
[0002] Embodiments of the present application relate to the field of cloud computing, and more specifically, to a virtual instance management method based on cloud computing technology and a cloud management platform. BACKGROUND
[0003] Memory sharing capability enables multiple processes to map the same block of physical memory into their respective virtual addresses, thereby directly reading and writing the contents in the same block of physical memory without the need for other communication methods such as message passing. In other words, memory sharing enables data sharing between processes without additional copying, eliminating redundancy, thereby improving process communication efficiency and reducing memory overhead.
[0004] With the development of cloud computing, there is also a large amount of data communication demand between virtual instances such as virtual machines or containers deployed on different servers. However, the existing memory sharing capability is limited within the host, i.e., it can only enable memory sharing between different processes on the same host. Although the remote direct memory access (RDMA) technology provides remote access capability of memory across hosts, it relies on the configuration of InfiniBand (IB) or RDMA over converged Ethernet (RoCE) network between servers, and the application must also be modified according to the RDMA protocol, so the usage is cumbersome, and it does not support multiple hosts to share the same block of memory or cross-host redundant memory deduplication.
[0005] Therefore, how to improve the data communication efficiency and memory utilization efficiency between virtual instances across servers has become a technical problem to be solved. SUMMARY
[0006] Embodiments of the present application provide a virtual instance management method based on cloud computing technology and a cloud management platform, which can enable memory sharing of virtual instances (including but not limited to containers and virtual machines) across servers, thereby improving the data communication efficiency between virtual instances across servers, and also enabling cross-host memory deduplication, improving the utilization efficiency of cross-server memory.
[0007] In a first aspect, a virtual instance management method based on cloud computing technology is provided. The method is applied to a cloud management platform, and the cloud management platform is used to manage a cloud data center. The cloud data center includes a plurality of servers, and the plurality of servers are connected to a high-speed interconnection bus inside the cloud data center. The method includes the following steps: the cloud management platform receives a virtual instance memory creation request input by a tenant. The virtual instance shared memory creation request includes a capacity of a virtual instance memory to be created and a type of the virtual instance memory. The type includes a shared memory type and / or a private memory type. The cloud management platform selects a first server from the plurality of servers in response to the virtual instance memory creation request. The first server has a physical memory matching the capacity. A first control command is sent to the first server. The first control command is used to instruct the first server to create the virtual instance memory according to the physical memory. The cloud management platform receives a first virtual instance memory binding request. The first virtual instance memory binding request includes an identifier of a first virtual instance to which the virtual instance memory is to be bound. The first virtual instance is deployed in a second server of the plurality of servers. The cloud management platform sends a second control command to the first server in response to the first virtual instance memory binding request. The second control command is used to instruct the first server to provide the virtual instance memory to the first virtual instance for use through the high-speed interconnection bus. In a case where the type is the shared memory type, the virtual instance memory is provided to the first virtual instance in a manner that allows sharing with other virtual instances. In a case where the type is the private memory type, the virtual instance memory is provided to the first virtual instance in a manner that does not allow sharing with other virtual instances.
[0008] Optionally, the virtual instance includes, but is not limited to, a virtual machine and / or a container.
[0009] According to the technical solution provided in the present application, by connecting the plurality of servers to the high-speed interconnection bus, the virtual instance deployed on a certain server can directly read and / or write the memory on other servers. On this basis, after a certain physical memory on a certain server is divided as a virtual instance memory, the virtual instance memory is bound to the virtual instance deployed on other servers based on the high-speed interconnection bus, so that the virtual instance can use the virtual instance memory across hosts, thereby improving the data communication efficiency of the virtual instance across servers and providing a basis for realizing memory sharing across servers between virtual instances.
[0010] In some implementations of the first aspect, the type is a shared memory type, and the method further includes: receiving, by the cloud management platform, a second virtual instance memory binding request, the second virtual instance memory binding request including an identifier of a second virtual instance to which the virtual instance memory is to be bound, the second virtual instance being deployed on a third server of the plurality of servers; and sending, by the cloud management platform, a third control command to the first server in response to the second virtual instance memory binding request, the third control command instructing the first server to provide the virtual instance memory to the second virtual instance for use via the high-speed interconnect bus, wherein the virtual instance memory is configured to allow the first virtual instance and the second virtual instance to access the virtual instance memory jointly.
[0011] According to the above technical solution, the divided virtual instance memory can be bound to multiple virtual instances across servers, so that the multiple virtual instances across servers can jointly access the same shared type of virtual memory, thereby realizing memory sharing of virtual instances across servers, improving data communication efficiency, and also realizing cross-host memory deduplication and improving the utilization efficiency of cross-server memory.
[0012] In some implementations of the first aspect, the first virtual instance memory binding request further includes permission information that sets a read-write or read-only permission of the first virtual instance on the virtual instance memory, and the second control command further instructs the first server to allow the first virtual instance to read and write the virtual instance memory or to allow the first virtual instance to read the virtual instance memory and prohibit the first virtual instance from writing the virtual instance memory, and the second virtual instance memory binding request further includes permission information that sets a read-write or read-only permission of the second virtual instance on the virtual instance memory, and the third control command further instructs the first server to allow the second virtual instance to read and write the virtual instance memory or to allow the second virtual instance to read the virtual instance memory and prohibit the second virtual instance from writing the virtual instance memory.
[0013] According to the above technical solution, by setting the permission information, the virtual instance memory can be flexibly switched between the read-write mode and the read-only mode for each bound virtual instance, thereby ensuring the consistency of data in the virtual instance memory.
[0014] In some implementations of the first aspect, the method further includes: receiving, by the cloud management platform, a first virtual instance memory unbinding request input by a tenant, the first virtual instance memory unbinding request including an identifier of the first virtual instance; and sending, by the cloud management platform, a fourth control command to the first server in response to the first virtual instance memory unbinding request, the fourth control command instructing the first server to stop providing the virtual instance memory to the first virtual instance for use.
[0015] According to the technical solution, the binding relationship between the virtual instance and the virtual instance memory can be released according to the tenant demand, thereby improving the flexibility of virtual instance memory allocation.
[0016] With reference to the first aspect, in some implementations of the first aspect, the method further includes: receiving, by the cloud management platform, a virtual instance memory deletion request input by the tenant; and sending, by the cloud management platform, a fifth control command to the first server in response to the virtual instance memory deletion request, the fifth control command being used to instruct the first server to release the virtual instance memory.
[0017] According to the technical solution, the virtual instance memory can be deleted according to the tenant demand, thereby releasing redundant memory resources in a timely manner and improving the utilization efficiency of the memory.
[0018] With reference to the first aspect, in some implementations of the first aspect, the cloud data center is further provided with a global memory management node, the global memory management node being used to establish a mapping relationship between the physical memory address matched with the capacity in the first server and the global memory address, the first server confirming the global memory address corresponding to the physical memory address through the global memory management node, and the global memory management node being distributed in each of the plurality of servers or being centrally arranged in one of the plurality of servers.
[0019] According to the technical solution, the physical memory addresses of the plurality of servers are uniformly addressed as the global memory addresses for unified management, thereby enabling any global memory address interval to be allocated to a virtual instance on any server, and enabling each virtual instance to access any physical memory without knowing the actual server where the physical memory is located, thereby reducing the complexity of memory address management.
[0020] With reference to the first aspect, in some implementations of the first aspect, the high-speed interconnection bus is a parallel bus with a bandwidth not less than 40 Gb / s and supporting synchronous memory access semantics.
[0021] According to the technical solution, the high-speed interconnection bus supports synchronous memory access semantics, enabling the server to directly read and / or write the memory of the opposite end server when accessing other servers across the host, without the need to copy the memory content of the opposite end server to the local memory, thereby improving the access efficiency of the cross-server virtual instance memory.
[0022] In a second aspect, a virtual instance management method based on cloud computing technology is provided. The method is applied to a cloud management platform, and the cloud management platform is used to manage a cloud data center. The cloud data center includes a plurality of servers, and the plurality of servers are connected to a high-speed interconnection bus inside the cloud data center. The method includes the following steps: the cloud management platform receives a virtual instance creation request input by a tenant, the virtual instance creation request including a capacity of a virtual instance shared memory and a virtual instance specification to be created; the cloud management platform selects a first server from the plurality of servers in response to the virtual instance creation request, and sends a first control command to the first server. The first control command is used to instruct the first server to create the virtual instance shared memory according to a physical memory in the first server that matches the capacity, and to create a first virtual instance in the first server according to the virtual instance specification, and set the virtual instance shared memory to allow the first virtual instance to access, wherein the first server is provided with hardware resources that can provide the virtual instance specification; the cloud management platform receives a virtual instance memory binding request, the virtual instance memory binding request including an identifier of a second virtual instance to which the virtual instance shared memory is to be bound, the second virtual instance being deployed in a second server of the plurality of servers; and the cloud management platform sends a second control command to the first server in response to the virtual instance memory binding request. The second control command is used to instruct the first server to provide the virtual instance shared memory to the second virtual instance for use through the high-speed interconnection bus, wherein the virtual instance shared memory is set to be provided to the second virtual instance for use in a manner that allows the first virtual instance to share the virtual instance shared memory.
[0023] Optionally, the virtual instance includes, but is not limited to, a virtual machine and / or a container.
[0024] According to the technical solution provided in the present application, by connecting the plurality of servers to the high-speed interconnection bus, the virtual instance deployed on a certain server can directly read and / or write the memory on other servers. On this basis, part or all of the virtual instance memory of the virtual instance created on a certain server can be specified as a virtual instance shared memory, and then the virtual instance shared memory is bound to other virtual instances deployed on other servers based on the high-speed interconnection bus, so that a plurality of virtual instances across servers can access the same virtual instance shared memory, thereby realizing memory sharing of the virtual instance across servers, improving data communication efficiency, and realizing cross-host memory deduplication and improving the utilization efficiency of cross-server memory.
[0025] With reference to the second aspect, in some implementations of the second aspect, the method further includes: receiving, by the cloud management platform, a first virtual instance release request input by the tenant, the first virtual instance release request including an identifier of the first virtual instance; and sending, by the cloud management platform, a third control command to the first server in response to the first virtual instance release request, the third control command being used to instruct the first server to: unload the first virtual instance, release the virtual instance shared memory, and release hardware resources occupied by the first virtual instance.
[0026] According to the above technical solution, the virtual instance shared memory can be released when the dependent virtual instance is unloaded, so that redundant memory resources are released in time, and the utilization efficiency of the memory is improved.
[0027] With reference to the second aspect, in some implementations of the second aspect, the virtual instance creation request further includes: setting permission information of the first virtual instance on the virtual instance shared memory, the permission information indicating that the first virtual instance is allowed to read and write the virtual instance shared memory or is allowed to read the virtual instance shared memory but is not allowed to write the virtual instance shared memory; the first control command is further used to instruct the first server to: allow the first virtual instance to read and write the virtual instance shared memory, or allow the first virtual instance to read the virtual instance shared memory but not to write the virtual instance shared memory; and the virtual instance memory binding request further includes: setting permission information of the second virtual instance on the virtual instance shared memory, the permission information indicating that the second virtual instance is allowed to read and write the virtual instance shared memory or is allowed to read the virtual instance shared memory but is not allowed to write the virtual instance shared memory; and the second control command is further used to instruct the first server to: allow the second virtual instance to read and write the virtual instance shared memory, or allow the second virtual instance to read the virtual instance shared memory but not to write the virtual instance shared memory.
[0028] According to the above technical solution, by setting the permission information, the virtual instance shared memory can be flexibly switched between the read-write mode and the read-only mode for each bound virtual instance, so as to ensure the consistency of data in the virtual instance memory.
[0029] With reference to the second aspect, in some implementations of the first aspect, the cloud data center is further provided with a global memory management node, the global memory management node being used to establish a mapping relationship between the physical memory address matched with the capacity in the first server and the global memory address, the first server confirming the global memory address corresponding to the physical memory address through the global memory management node, and the global memory management node being distributed in each of the plurality of servers or being centrally arranged in one of the plurality of servers.
[0030] According to the technical solution, the global memory address corresponding to the physical memory address of the virtual instance shared memory is uniformly managed, so that the physical memory can be allocated to the virtual instance on any server as a shared source, and each virtual instance can access the virtual instance shared memory without knowing the actual location of the corresponding physical memory on which server, thereby reducing the complexity of memory address management.
[0031] In combination with the second aspect, in some implementations of the first aspect, the high-speed interconnection bus is a parallel bus with a bandwidth of no less than 40 Gb / s and supporting synchronous memory access semantics.
[0032] According to the technical solution, the high-speed interconnection bus supports synchronous memory access semantics, so that when a server accesses other servers across the host, the memory of the opposite end server can be directly read and / or written, without the need to copy the memory content of the opposite end server to the local memory, thereby improving the access efficiency of the virtual instance memory across servers.
[0033] In a third aspect, a cloud management platform is provided, which is used to manage a cloud data center, the cloud data center including a plurality of servers, the plurality of servers being connected to a high-speed interconnection bus inside the cloud data center. The cloud management platform includes: a receiving module configured to receive a virtual instance memory creation request input by a tenant, the virtual instance shared memory creation request including the capacity of the virtual instance memory to be created, and the type of the virtual instance memory, the type including a shared memory type and / or a private memory type; a processing module configured to select a first server from the plurality of servers in response to the virtual instance memory creation request, wherein the first server has physical memory matching the capacity, and send a first control command to the first server, the first control command being used to instruct the first server to create the virtual instance memory according to the physical memory; the receiving module is further configured to receive a first virtual instance memory binding request, the first virtual instance memory binding request including the identification of a first virtual instance to which the virtual instance memory is to be bound, the first virtual instance being deployed in a second server of the plurality of servers; and the processing module is further configured to send a second control command to the first server in response to the first virtual instance memory binding request, the second control command being used to instruct the first server to provide the virtual instance memory to the first virtual instance through the high-speed interconnection bus, wherein: in the case of the type being the shared memory type, the virtual instance memory is provided to the first virtual instance in a manner allowing sharing with other virtual instances; and / or in the case of the type being the private memory type, the virtual instance memory is provided to the first virtual instance in a manner not allowing sharing with other virtual instances.
[0034] Optionally, the virtual instance includes but is not limited to a virtual machine and / or a container.
[0035] In some implementations of the third aspect, in conjunction with the third aspect, the type is a shared memory type, the receiving module is further configured to receive a second virtual instance memory binding request, the second virtual instance memory binding request comprising an identifier of a second virtual instance to which the virtual instance memory is to be bound, the second virtual instance being deployed on a third server of the plurality of servers; and the processing module is further configured to send, in response to the second virtual instance memory binding request, a third control command to the first server, the third control command being configured to instruct the first server to provide the virtual instance memory to the second virtual instance for use via the high-speed interconnect bus, wherein the virtual instance memory is configured to allow both the first virtual instance and the second virtual instance to access the virtual instance memory.
[0036] In some implementations of the third aspect, in conjunction with the third aspect, the first virtual instance memory binding request further comprises permission information indicating whether the first virtual instance is allowed to read and write the virtual instance memory or is allowed to read the virtual instance memory but is not allowed to write the virtual instance memory; the second control command is further configured to instruct the first server to allow the first virtual instance to read and write the virtual instance memory or to allow the first virtual instance to read the virtual instance memory but not to write the virtual instance memory; the second virtual instance memory binding request further comprises permission information indicating whether the second virtual instance is allowed to read and write the virtual instance memory or is allowed to read the virtual instance memory but is not allowed to write the virtual instance memory; and the third control command is further configured to instruct the first server to allow the second virtual instance to read and write the virtual instance memory or to allow the second virtual instance to read the virtual instance memory but not to write the virtual instance memory.
[0037] In some implementations of the third aspect, in conjunction with the third aspect, the receiving module is further configured to receive a first virtual instance memory unbinding request input by the tenant, the first virtual instance memory unbinding request comprising an identifier of the first virtual instance; and the processing module is further configured to send, in response to the first virtual instance memory unbinding request, a fourth control command to the first server, the fourth control command being configured to instruct the first server to stop providing the virtual instance memory to the first virtual instance for use.
[0038] In some implementations of the third aspect, in conjunction with the third aspect, the receiving module is further configured to receive a virtual instance memory deletion request input by the tenant; and the processing module is further configured to send, in response to the virtual instance memory deletion request, a fifth control command to the first server, the fifth control command being configured to instruct the first server to release the virtual instance memory.
[0039] In some implementations of the third aspect, the cloud data center is further provided with a global memory management node, the global memory management node is configured to establish a mapping relationship between the physical memory address matched with the capacity in the first server and the global memory address, the first server confirms the global memory address corresponding to the physical memory address through the global memory management node, and the global memory management node is distributed in each of the plurality of servers or is centrally arranged in one of the plurality of servers.
[0040] In some implementations of the third aspect, the high-speed interconnection bus is a parallel bus with a bandwidth of no less than 40 Gb / s and supporting synchronous memory access semantics.
[0041] In the fourth aspect, a cloud management platform is provided, which is configured to manage a cloud data center, the cloud data center comprising a plurality of servers connected to a high-speed interconnection bus network inside the cloud data center. The cloud management platform comprises: a receiving module configured to receive a virtual instance creation request input by a tenant, the virtual instance creation request comprising a capacity of a virtual instance shared memory and a virtual instance specification to be created; a processing module configured to select a first server from the plurality of servers in response to the virtual instance creation request, and send a first control command to the first server, the first control command being configured to instruct the first server to: create the virtual instance shared memory according to a physical memory matched with the capacity in the first server, and create a first virtual instance in the first server according to the virtual instance specification, and set the virtual instance shared memory to be accessible by the first virtual instance, wherein the first server is provided with hardware resources capable of providing the virtual instance specification; the receiving module is further configured to receive a virtual instance memory binding request, the virtual instance memory binding request comprising an identifier of a second virtual instance to be bound with the virtual instance shared memory, the second virtual instance being deployed in a second server of the plurality of servers; and the processing module is further configured to send a second control command to the first server in response to the virtual instance memory binding request, the second control command being configured to instruct the first server to provide the virtual instance shared memory to the second virtual instance through the high-speed interconnection bus, wherein the virtual instance shared memory is provided to the second virtual instance in a manner allowing it to be shared with the first virtual instance.
[0042] Optionally, the virtual instance comprises, but is not limited to, a virtual machine and / or a container.
[0043] In some implementations of the fourth aspect, in combination with the fourth aspect, the receiving module is further configured to receive a first virtual instance release request input by the tenant, the first virtual instance release request comprising an identifier of the first virtual instance; and the processing module is further configured to send a third control command to the first server in response to the first virtual instance release request, the third control command being used to instruct the first server to: unload the first virtual instance, release the virtual instance shared memory, and release hardware resources occupied by the first virtual instance.
[0044] In some implementations of the fourth aspect, in combination with the fourth aspect, the virtual instance creation request further comprises: permission information of the first virtual instance on the virtual instance shared memory, the permission information indicating that the first virtual instance is allowed to read and write the virtual instance shared memory or is allowed to read the virtual instance shared memory but is not allowed to write the virtual instance shared memory; the first control command is further used to instruct the first server to: allow the first virtual instance to read and write the virtual instance shared memory, or allow the first virtual instance to read the virtual instance shared memory but not to write the virtual instance shared memory; and the virtual instance memory binding request further comprises: permission information of the second virtual instance on the virtual instance shared memory, the permission information indicating that the second virtual instance is allowed to read and write the virtual instance shared memory or is allowed to read the virtual instance shared memory but is not allowed to write the virtual instance shared memory; and the second control command is further used to instruct the first server to: allow the second virtual instance to read and write the virtual instance shared memory, or allow the second virtual instance to read the virtual instance shared memory but not to write the virtual instance shared memory.
[0045] In some implementations of the fourth aspect, in combination with the fourth aspect, the cloud data center is further provided with a global memory management node, the global memory management node being used to establish a mapping relationship between the capacity-matched physical memory address in the first server and the global memory address, the first server confirming the global memory address corresponding to the physical memory address through the global memory management node, and the global memory management node being distributed in each of the plurality of servers or being centrally arranged in one of the plurality of servers.
[0046] In some implementations of the fourth aspect, in combination with the fourth aspect, the high-speed interconnection bus is a parallel bus with a bandwidth of no less than 40 Gb / s and supporting synchronous memory access semantics.
[0047] In the fifth aspect, a computing device is provided, comprising a processor and a memory, wherein the memory is configured to store instructions, and the processor is configured to invoke and run the instructions from the memory, so that the computing device executes the method in the first aspect or any possible implementation manner of the first aspect.
[0048] In the sixth aspect, a computing device is provided, comprising a processor and a memory, wherein the memory is configured to store instructions, and the processor is configured to invoke and run the instructions from the memory, so that the computing device executes the method in the second aspect or any possible implementation manner of the second aspect.
[0049] In a seventh aspect, a computing device cluster is provided, comprising at least one computing device, each computing device comprising a processor and a memory, wherein the memory is configured to store instructions and the processor is configured to invoke and execute the instructions from the memory, so that the computing device cluster performs the method in the first aspect or any possible implementation of the first aspect.
[0050] In an eighth aspect, a computing device cluster is provided, comprising at least one computing device, each computing device comprising a processor and a memory, wherein the memory is configured to store instructions and the processor is configured to invoke and execute the instructions from the memory, so that the computing device cluster performs the method in the second aspect or any possible implementation of the second aspect.
[0051] Optionally, the processor can be a general-purpose processor, which can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented by software, the processor can be a general-purpose processor, which reads software codes stored in the memory to implement the processor. The memory can be integrated in the processor or exist independently outside the processor.
[0052] In a ninth aspect, a chip is provided, which obtains instructions and executes the instructions to implement the method in the first aspect or any possible implementation of the first aspect.
[0053] In a tenth aspect, a chip is provided, which obtains instructions and executes the instructions to implement the method in the second aspect or any possible implementation of the second aspect.
[0054] Optionally, as an implementation, the chip comprises a processor and a data interface. The processor reads instructions stored in the memory through the data interface and executes the method in the first aspect or any possible implementation of the first aspect.
[0055] Optionally, as an implementation, the chip can further comprise a memory, which stores instructions. The processor is configured to execute the instructions stored in the memory. When the instructions are executed, the processor is configured to execute the method in the first aspect or any possible implementation of the first aspect.
[0056] In an eleventh aspect, a computer program product comprising instructions is provided, which, when executed by a computing device or a computing device cluster, causes the computing device or the computing device cluster to perform the method in the first aspect or any possible implementation of the first aspect.
[0057] In a twelfth aspect, a computer program product including instructions, which when executed by a computing device or a cluster of computing devices, cause the computing device or the cluster of computing devices to perform the method of the second aspect or any possible implementation of the second aspect.
[0058] In a thirteenth aspect, a computer-readable storage medium includes computer program instructions, which when executed by a computing device or a cluster of computing devices, cause the computing device or the cluster of computing devices to perform the method of the first aspect or any possible implementation of the first aspect.
[0059] In a fourteenth aspect, a computer-readable storage medium includes computer program instructions, which when executed by a computing device or a cluster of computing devices, cause the computing device or the cluster of computing devices to perform the method of the second aspect or any possible implementation of the second aspect.
[0060] By way of example, such computer-readable storage media include one or more of the following: a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), a Flash memory, an electrically EPROM (EEPROM), and a hard drive.
[0061] Optionally, as an implementation form, the storage medium can be a non-volatile storage medium. BRIEF DESCRIPTION OF DRAWINGS
[0062] FIG. 1 is a schematic diagram of a system architecture of an embodiment of the present application.
[0063] FIG. 2 is a schematic diagram of a cloud system according to an embodiment of the present application.
[0064] FIG. 3 is a schematic flow chart of a virtual instance management method according to an embodiment of the present application.
[0065] FIG. 4 is a schematic diagram of an application scenario of a virtual instance management method according to an embodiment of the present application.
[0066] FIG. 5 is a schematic diagram of an application scenario of another virtual instance management method according to an embodiment of the present application.
[0067] FIG. 6 is a schematic diagram of an application scenario of another virtual instance management method according to an embodiment of the present application.
[0068] FIG. 7 is a schematic diagram of an application scenario of another virtual instance management method according to an embodiment of the present application.
[0069] FIG. 8 is a schematic diagram of an application scenario of another virtual instance management method according to an embodiment of the present application.
[0070] FIG. 9 is a schematic diagram of an application scenario of another virtual instance management method according to an embodiment of the present application.
[0071] FIG. 10 is a schematic flow chart of another virtual instance management method according to an embodiment of the present application.
[0072] FIG. 11 is a schematic diagram of an application scenario of a virtual instance management method according to an embodiment of the present application.
[0073] FIG. 12 is a schematic structural block diagram of a cloud management platform according to an embodiment of the present application.
[0074] FIG. 13 is a schematic structural block diagram of another cloud management platform according to an embodiment of the present application.
[0075] FIG. 14 is a schematic structural block diagram of a computing device according to an embodiment of the present application.
[0076] FIG. 15 is a schematic structural block diagram of a computing device cluster according to an embodiment of the present application.
[0077] FIG. 16 is a schematic structural block diagram of another computing device cluster according to an embodiment of the present application. DETAILED DESCRIPTION
[0078] The technical solutions in the present application will be described below with reference to the accompanying drawings.
[0079] The present application will present various aspects, embodiments or features around a system including a plurality of devices, components, modules, etc. It should be understood and appreciated that each system can include additional devices, components, modules, etc., and / or can not include all the devices, components, modules, etc. discussed in connection with the accompanying drawings. In addition, combinations of these solutions can also be used.
[0080] In addition, in the embodiments of the present application, the words "example", "for example", etc. are used to mean by way of example, illustration or description. Any embodiment or design solution described as "example" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design solutions. Rather, the word "example" is intended to present the concept in a specific manner.
[0081] In the embodiments of the present application, "corresponding" and "relevant" can be used interchangeably at times. It should be pointed out that when the distinction is not emphasized, the meanings expressed are consistent.
[0082] The network architecture and service scenarios described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of network architecture and the appearance of new service scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0083] In this specification, a statement that something is "one embodiment" or "some embodiments" means that a specific feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. The appearances of the phrase "in one embodiment" or "in some embodiments" in various places in the specification are not necessarily all referring to the same embodiment, although they can. The terms "comprising," "including," "having," and their variations, as used in this specification, mean "including but not limited to," unless expressly specified otherwise.
[0084] In this application, "at least one" means one or more, and "multiple" means two or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the following cases: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can represent a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.
[0085] Memory sharing capability enables multiple processes in the same host to map the same block of physical memory into their respective virtual addresses, thereby directly reading and writing the contents of the same block of physical memory without the need for other communication methods such as message passing. In other words, memory sharing enables data sharing between processes without additional copying, eliminating redundancy, thereby improving process communication efficiency and reducing memory overhead.
[0086] With the development of cloud computing, there is also a large amount of data communication demand between virtual instances such as virtual machines or containers deployed on different servers. Limited to the memory sharing capability within the host, the memory sharing capability can no longer meet the data communication demand between virtual instances in this cloud scenario.
[0087] Compute express link (CXL) is a protocol based on the high-speed serial computer expansion bus standard (peripheral component interconnect express, PCIE) physical link. The protocol uses a traditional device architecture and can support remote access of memory, input / output (I / O) and other devices. In addition, the protocol can support independent memory devices shared among multiple hosts, and support cache coherency of multiple hosts accessing the same memory device concurrently. However, this protocol does not support sharing of memory between hosts or between virtual machines, and does not provide a solution for presenting shared memory to tenants in a virtualization scenario. Therefore, this protocol cannot provide good support for cross-node memory sharing in a cloud scenario.
[0088] Kernel samepage merging (KSM) is a memory sharing technology applied in a virtualization environment, which supports scanning and sharing of the same page in a host. The KSM technology scans and compares memory page contents (based on page hashing or byte-by-byte comparison) through the kernel layer of an operating system (OS), maps multiple host virtual addresses or virtual machine virtual addresses to the same host physical address or virtual machine virtual address, and thus realizes sharing and merging of multiple pages at the host OS level or the virtual machine OS level. The above merging process is invisible to processes or applications on the host or virtual machine. When a process performs a write operation on the merged page, a write copy mechanism is automatically triggered, that is, a new page is allocated and a new mapping relationship is established, to ensure that the merged page content is not tampered with. However, the KSM technology cannot support cross-host memory sharing requirements, and there is a problem that applications cannot effectively utilize shared memory pages.
[0089] In addition, although the remote direct memory access (RDMA) technology provides cross-host memory remote access capability, it relies on InfiniBand (IB) or RDMA over converged ethernet (RoCE) network configured between servers, and applications must also be modified according to the RDMA protocol, so the usage is cumbersome, and it does not support multiple hosts sharing the same memory or cross-host redundant memory deduplication.
[0090] Therefore, how to improve the data communication efficiency and memory utilization efficiency between virtual instances across servers has become a technical problem to be solved.
[0091] In view of this, the embodiment of the present application provides a virtual instance management method based on cloud computing technology, which can realize memory sharing of virtual instances (including but not limited to containers and virtual machines) across servers, thereby improving the data communication efficiency between virtual instances across servers, and can also realize memory deduplication across hosts, thereby improving the utilization efficiency of memory across servers.
[0092] FIG. 1 is a schematic diagram of a system architecture to which the embodiment of the present application can be applied. As shown in FIG. 1, the system can be composed of multiple hosts (for example, host A, host B, host C, etc. in the figure). The system can include a host memory manager 110, a global memory manager 120, and virtual instances and / or processes running on the hosts, which can include but are not limited to virtual machines and / or containers.
[0093] The multiple hosts in the system can be connected through a high-speed interconnection bus, so that the processes and / or virtual instances deployed on a host can remotely and synchronously access the physical memory of other hosts in the system. Each host can have a dedicated interface, so that the host can directly access the high-speed interconnection bus. Optionally, the high-speed interconnection bus can be a parallel bus with a bandwidth of not less than 40 Gb / s and supporting synchronous memory access semantics. The synchronous memory access semantics means that when a server accesses the memory of another server across hosts through the high-speed interconnection bus, the memory content of the peer server does not need to be copied to the local memory, and the memory of the peer server is directly read and / or written. The high-speed interconnection bus can include but is not limited to an InfiniBand (IB) bus, a compute express link (CXL) bus, or any other parallel bus with a bandwidth of not less than 40 Gb / s, etc., which is not limited in the present application.
[0094] The host memory manager 110 can be deployed on each host respectively, for managing the physical memory of the respective host, and establishing the mapping relationship between the physical memory address of the host (which can also be referred to as host physical address (Host PA)) and the global memory address (which can also be referred to as global virtual address (Globa VA)).
[0095] The global memory manager 120 can be distributedly deployed on each host in the system, or can also be centrally deployed on one of the hosts in the system. The global memory manager 120 is used to establish and maintain the global memory address interval of the system, and to allocate the global memory addresses in the global memory address interval to the corresponding virtual instances and / or processes according to the needs of each host.
[0096] Virtual instances and processes are objects that use memory resources deployed on a host, including but not limited to processes 131, containers 132, and virtual machines 133, and the like. It should be understood that the specific implementation of virtual instances and / or processes using global memory addresses can be different depending on the object type and / or technical scenario. For example, in some possible implementations, host A, host B, or host C can provide one or more GlobaVAs to processes 131 for use through global memory manager 120, which can be referred to as the address of the memory space of processes 131, which can be controlled by the corresponding process 131. For another example, in some other possible implementations, host A, host B, or host C can establish a mapping relationship between one or more GlobaVAs and the physical memory addresses (also referred to as guest physical addresses (GuestPAs)) of containers 132 and / or virtual machines 133, or establish a mapping relationship between one or more GlobaVAs and the virtual memory addresses (also referred to as guest virtual addresses (GuestVAs)) of containers 132 and / or virtual machines 133 through global memory manager 120. The GuestVA can be an address formed by mapping the GuestPA by the operating system of the virtual machine, and the operating system of the virtual machine can provide the GuestVA to the processes or application software set on the operating system of the virtual machine for use, and the operating system of the virtual machine can record the mapping relationship between the GuestVA and the GuestPA, and the conversion between the GuestVA and the GuestPA can be implemented by the page table of the operating system of the virtual machine.
[0097] It should be understood that the term "address" in this application represents the address of the memory. Therefore, the physical memory address can also be referred to as the physical address (PA) hereinafter, and the virtual memory address can also be referred to as the virtual address (VA) hereinafter.
[0098] Based on the high-speed interconnection bus, the host can provide memory resources of any host to virtual instances and / or processes on any host (including the host where the memory resources are located and other hosts) through host memory manager 110 and global memory manager 120, thereby providing a basis for implementing cross-server memory sharing for virtual instances.
[0099] The virtual instance management method provided by the embodiments of the present application can be applied to a cloud management platform. FIG. 2 shows a schematic diagram of a cloud system provided by the embodiments of the present application. As shown in FIG. 2, a cloud management platform 210 is configured to manage a cloud data center 230. The cloud data center 230 can include a plurality of servers, which are connected to a high-speed interconnection bus inside the cloud data center. Optionally, the servers in the cloud data center 230 can be, for example, the hosts shown in the system of FIG. 1. Each server can provide physical memory resources at the hardware layer and deploy virtual instances such as virtual machines and / or containers at the software layer.
[0100] The cloud management platform 210 provides an access interface (such as an interface or an application program interface (API)), and a tenant can remotely access the access interface to register a cloud account and a password on the cloud management platform through a client. After the cloud management platform authenticates the cloud account and the password successfully, the tenant can further select and purchase a virtual instance of a specific specification by paying a fee on the cloud management platform. After the payment is successful, the cloud management platform provides a remote login account and password of the purchased virtual instance, and the client can remotely log in to the virtual instance and manage the virtual instance.
[0101] Specifically, the tenant can use the client 220 to log in to the cloud management platform 210 through the Internet, so as to perform operations such as creating a virtual instance, binding a virtual instance memory, releasing a virtual instance memory, and deleting a virtual instance through the cloud management platform 210. In addition, the cloud management platform 210 can also provide other virtual instance management services for the tenant, including but not limited to a user console, a computing management service, a network management service, a storage management service, an authentication service, and an image management service. The user console provides an interface or an API to interact with the tenant, the computing management service is configured to manage servers running virtual machines and containers and bare metal servers, the network management service is configured to manage network services (such as gateways and firewalls), the storage management service is configured to manage storage services (such as data bucket services), the authentication service is configured to manage the account and password of the tenant, and the image management service is configured to manage virtual machine images. The present application does not make a specific limitation in this regard.
[0102] Optionally, a global memory management node (not shown in FIG. 2) can also be arranged in the cloud data center 230. The global memory management node can include the host memory manager 110 and the global memory manager 120 shown in FIG. 1, and is configured to establish a mapping relationship between the physical memory addresses of the servers in the cloud data center 230 and the global memory addresses. The servers in the cloud data center 230 can confirm the global memory addresses corresponding to the physical memory addresses through the global memory management node, and assign the global memory addresses to the virtual instances deployed on the servers. Optionally, the global memory management node can be distributed in each of the servers in the cloud data center 230, or can be centrally arranged in one of the servers in the cloud data center 230.
[0103] The method for managing virtual instances provided by the present application will be described in detail below with reference to FIG. 3. Optionally, the method shown in FIG. 3 can be applied to the cloud management platform 210 shown in FIG. 2. As shown in FIG. 3, the method includes the following steps.
[0104] Step S310: receiving a virtual instance memory creation request input by a tenant.
[0105] For example, in step S310, the tenant can log in to the cloud management platform through a client to create a virtual instance memory. Specifically, the cloud management platform can receive a virtual instance memory creation request input by the tenant through the client. The virtual instance shared memory creation request can include the capacity of the virtual instance memory to be created, and can also include the type of the virtual instance memory to be created. The type of the virtual instance memory can include a shared memory type and / or a private memory type. The private memory type means that the virtual instance memory is bound to only one virtual instance and is accessed by the virtual instance alone, and the shared memory type means that the virtual instance memory can be bound to multiple virtual instances and is accessed by the multiple virtual instances.
[0106] It should be understood that the tenant can indicate the creation of multiple pieces of virtual instance memory through the virtual instance memory creation request, and the capacity and / or type of each piece of virtual instance memory can be the same or different. The multiple pieces of virtual instance memory can be created by sending multiple virtual instance memory creation requests respectively, or can be created at one time by sending one virtual instance memory creation request, which is not limited in the present application.
[0107] Step S320: selecting a first server from the multiple servers in response to the virtual instance memory creation request, and sending a first control command to the first server.
[0108] For example, in step S320, the cloud management platform can select a first server capable of creating the virtual instance from a plurality of servers in the cloud data center according to the capacity of the virtual memory indicated in the virtual instance memory creation request. The first server has physical memory matching the capacity of the virtual memory to be created, i.e., the first server can provide sufficient physical memory resources for creating the virtual memory. After determining the appropriate first server, the cloud management platform can send a first control command to the first server, which instructs the first server to create the virtual instance memory according to the physical memory.
[0109] In some possible embodiments, the first server can create the virtual instance memory according to the physical memory through a pass-through technology. That is, the first server can directly allocate the physical memory matching the capacity of the virtual memory to be created to the virtual instance, bypassing the virtualization layer. After the virtual instance is bound to the virtual instance memory, the virtual instance can access the real I / O space of the physical memory, thereby improving performance and reducing latency.
[0110] In other possible embodiments, the first server can create the virtual instance memory according to the physical memory through a virtualization technology. That is, the first server can map the memory address of the physical memory matching the capacity of the virtual memory to be created to a virtual memory address, and then allocate the corresponding physical memory resources to the corresponding virtual instance through the mapping relationship between the virtual memory address and the physical memory address of the virtual instance.
[0111] Step S330: receiving a first virtual instance memory binding request.
[0112] For example, in step S330, the tenant can request the cloud management platform to bind the virtual instance memory created in step S320 to the first virtual instance. Optionally, the virtual instance includes but is not limited to a virtual machine and / or a container. Specifically, the cloud management platform can receive a virtual instance memory binding request input by the tenant through the client, and the virtual instance memory binding request can include the identifier of the first virtual instance to be bound to the aforementioned virtual instance memory.
[0113] It should be understood that the tenant inputting the virtual instance memory binding request to the cloud management platform in step S330 can be the same tenant inputting the virtual instance memory creation request in step S310, or can be a different other tenant, which is not specifically limited in the present application. As an example, a first tenant can request to create a virtual instance memory through the cloud management platform, and then the first tenant can request to bind the virtual instance memory to a first virtual instance through the cloud management platform; or, after the first tenant requests to create a virtual instance memory through the cloud management platform, the first tenant can authorize a second tenant, and after authorization, the second tenant also requests to bind the virtual instance memory to the first virtual instance through the cloud management platform.
[0114] The first virtual instance to be bound with the virtual instance memory can be deployed on a server where the physical memory resource corresponding to the virtual instance memory is located, or can be deployed on another server in the cloud data. As an example, the virtual instance memory can be created on a first server in a cloud data center, the first virtual instance can be deployed on the first server, and the first virtual instance can also be deployed on a second server in the cloud data center. The first server and the second server are two different servers in the cloud data center.
[0115] Step S340: sending a second control command to the first server in response to the first virtual instance memory binding request.
[0116] For example, in step S340, the cloud management platform can send a control command to the first server where the physical memory resource corresponding to the virtual instance memory is located according to the identifier of the first virtual instance in the virtual instance memory binding request. The control command is used to instruct the first server to provide the virtual instance memory to the first virtual instance for use. If the first virtual instance is deployed on the first server where the physical memory resource corresponding to the virtual instance memory is located, the first server can directly provide the virtual instance memory to the first virtual instance for use; if the first virtual instance is deployed on another server (for example, the second server) in the cloud data center, the first server can provide the virtual instance memory to the first virtual instance for use through a high-speed interconnection bus.
[0117] Optionally, the virtual instance memory provided for use by the first virtual instance can be presented as normal memory in the first virtual instance, or the virtual instance memory can also be presented as a separate read-write memory device. For example, the virtual instance memory can be presented as normal memory, i.e., directly merged into the existing memory of the first virtual instance. In this case, the virtual instance memory can be distinguished from the existing memory of the first virtual instance by a non-uniform memory access (NUMA) architecture or a different GuestPA address segment. The virtual instance memory presented as normal memory can be taken over by the first virtual instance operating system, and its usage can be consistent with the existing memory of the first virtual instance, e.g., by using malloc, free, memset, memcpy, etc. instructions. For another example, the virtual instance memory can be presented as a separate read-write memory device, i.e., the virtual instance memory is provided as an additional memory device, and the first virtual instance mounts the memory device. The virtual instance memory presented as a separate read-write memory device can be directly read and written by an application in the first virtual instance, e.g., by using open, close, read, write, etc. instructions. The presentation of the virtual instance memory in the first virtual instance can be flexibly selected by the tenant according to needs, e.g., the virtual instance memory binding request input by the tenant can include information about whether the virtual instance memory is presented as normal memory or a separate memory device in the virtual instance to be bound.
[0118] Optionally, the cloud management platform can also indicate the way in which the virtual instance memory is provided for use by the virtual instance according to the type of the virtual instance memory in the virtual instance memory creation request. For example, in the case where the type of the virtual instance memory is the shared memory type, the virtual instance memory can be provided for use by the first virtual instance in a manner that allows sharing with other virtual instances; and / or in the case where the type of the virtual instance memory is the exclusive memory type, the virtual instance memory can be provided for use by the first virtual instance in a manner that does not allow sharing with other virtual instances.
[0119] It should be understood that a virtual instance can be bound to one or more pieces of virtual instance memory, and the types of the pieces of virtual instance memory bound to the same virtual instance can be the same or different. For example, the first virtual instance can be bound to two pieces of different virtual instance memory, one of which is of the exclusive memory type and the other of which is of the shared memory type. The virtual instance memory of the exclusive memory type can also be referred to as exclusive segment memory, and the virtual instance memory of the shared memory type can also be referred to as shared segment memory.
[0120] In some possible implementation, the virtual instance memory binding request can further include permission information, which is used to indicate the read-write permission of the bound virtual instance to the virtual instance memory. For example, the first virtual instance memory binding request can include permission information that sets the first virtual instance to have read-write permission to the virtual instance memory, and correspondingly, the second control command can be used to instruct the first server to allow the first virtual instance to read and write the virtual instance memory. For another example, the first virtual instance memory binding request can include permission information that sets the first virtual instance to have read-only permission to the virtual instance memory, and correspondingly, the second control command can be used to instruct the first server to allow the first virtual instance to read the virtual instance memory and prohibit the first virtual instance from writing the virtual instance memory. By setting the permission information, the virtual instance memory can be flexibly switched between the read-write mode and the read-only mode for each bound virtual instance, thereby ensuring the consistency of data in the virtual instance memory.
[0121] In some possible implementation, in the case where the type of the virtual instance memory is the shared memory type, the virtual memory can continue to be bound to other virtual instances after being bound to the first virtual instance, thereby realizing the sharing of the virtual instances. The above method can be implemented through optional steps S350 and S360.
[0122] Optionally, in step S350, a second virtual instance memory binding request is received.
[0123] For example, in step S350, the tenant can request, through the cloud management platform, to bind the virtual instance memory of the shared type to a second virtual instance, and the virtual instance memory of the shared type can have been bound to the first virtual instance. Optionally, the virtual instance includes but is not limited to a virtual machine and / or a container. Specifically, the cloud management platform can receive the virtual instance memory binding request input by the tenant through the client, and the virtual instance memory binding request can include the identifier of the second virtual instance to be bound to the aforementioned virtual instance memory of the shared type.
[0124] Similar to step S330, the tenant that inputs the virtual instance memory binding request to the cloud management platform in step S350 can be the same tenant that inputs the virtual instance memory creation request, or can be another tenant authorized by the tenant. In addition, the tenant that inputs the second virtual instance memory binding request in step S350 can be the same tenant as the tenant that inputs the first virtual instance memory binding request in step S330, or can be a different tenant, which is not limited in the present application.
[0125] The second virtual instance can be deployed on the server where the physical memory resource corresponding to the shared virtual instance memory is located, or can be deployed on another server in the cloud data. In addition, the first virtual instance and the second virtual instance bound to the same virtual instance memory can be deployed on the same server, or can be deployed on different servers.
[0126] Optionally, in step S360, a third control command is sent to the first server in response to the second virtual instance memory binding request.
[0127] For example, in step S360, the cloud management platform can send a control command to the first server where the physical memory resource corresponding to the virtual instance memory is located according to the identifier of the second virtual instance in the virtual instance memory binding request, and the control command is used to instruct the first server to provide the virtual instance memory to the second virtual instance. If the second virtual instance is deployed on the first server where the physical memory resource corresponding to the virtual instance memory is located, the first server can directly provide the virtual instance memory to the first virtual instance; if the second virtual instance is deployed on another server in the cloud data center, the first server can provide the virtual instance memory to the first virtual instance through the high-speed interconnection bus.
[0128] Optionally, the virtual instance memory provided to the second virtual instance can be presented as normal memory in the second virtual instance, or the virtual instance memory can also be presented as an independent read-write memory device. The specific implementation mode can refer to the description of the binding mode of the first virtual instance in step S340, which will not be described here.
[0129] In some possible embodiments, the virtual instance memory binding request can further include permission information for indicating the read-write permission of the bound virtual instance to the virtual instance memory. For example, the second virtual instance memory binding request can include permission information for setting the second virtual instance to be able to read and write the virtual instance memory, and correspondingly, the third control command can be used to instruct the first server to allow the second virtual instance to read and write the virtual instance memory. For another example, the second virtual instance memory binding request can include permission information for setting the second virtual instance to be able to read but not write the virtual instance memory, and correspondingly, the third control command can be used to instruct the first server to allow the second virtual instance to read the virtual instance memory and prohibit the second virtual instance to write the virtual instance memory.
[0130] Optionally, the mapping relationship of the memory addresses of the virtual instance memory can be uniformly managed by a global memory management node arranged in the cloud data center. For example, the global memory management node can be used to establish a mapping relationship between the physical memory addresses matched with the capacity in the first server and the global memory addresses, and the first server can confirm the global memory addresses corresponding to the physical memory addresses through the global memory management node, and assign the global memory addresses to the first virtual instance and / or the second virtual instance.
[0131] In some possible embodiments, the type of the virtual instance memory can be presented to the bound virtual instance.
[0132] For example, as shown in the embodiment of FIG. 4, after the tenant creates a virtual machine or container 1 on the host A, the tenant can allocate two pieces of memory (the physical addresses can not be continuous) via the global memory manager, and establish a mapping relationship between the global virtual addresses (GlobaVAs) and the host physical addresses (HostPAs). One of the two pieces of memory can be exclusively used by the virtual machine or container 1, and thus can be referred to as an exclusive segment memory. The other of the two pieces of memory can support multiple instances (for example, processes, containers or virtual machines) to share, and thus can be referred to as a shared segment memory. The shared segment memory can be permission managed by the global memory manager, and the management forms can include but are not limited to page table tags, global hash, etc. Then, the two pieces of memory can be mapped to the virtual machine or container 1, that is, a mapping relationship between the GlobaVAs and the guest physical addresses (GuestPAs) is established. After the tenant creates a virtual machine or container 2 on the host B, the tenant can specify the shared segment memory of the shared virtual machine or container 1, and establish a mapping relationship between the GlobaVAs and the GuestPAs via the global memory manager (the mapping relationship between the GlobaVAs and the HostPAs of the shared segment memory does not need to be repeatedly established). In addition, the virtual machine or container 2 can also be allocated with new exclusive segment memory, and the establishment process of the mapping relationship of the virtual machine or container 2 exclusive segment memory can refer to that of the virtual machine or container 1, which will not be described herein again.
[0133] Optionally, shared segment memory can be presented as ordinary standard memory within a virtual machine or container, distinguished by a non-uniform memory access (NUMA) architecture or different GuestPA address ranges. Shared segment memory presented as ordinary standard memory can be managed by the operating system, and its usage can be consistent with dedicated segment memory, such as through instructions like malloc, free, memset, and memcpy. Shared segment memory can also be presented as an independent read-write memory device within a virtual machine or container, directly read and written by applications, for example, through instructions like open, close, read, and write. The presentation method of shared segment memory can be flexibly selected according to the actual needs of the tenant and can be specified when creating the virtual machine or container.
[0134] Optionally, shared segment memory can be configured in read-write mode or read-only mode. For example, shared segment memory can be associated with a second identifier, which indicates whether the memory pages of the shared segment memory can be written to. The mode where shared segment memory pages can be written to by instances can be called read-write mode. In this mode, if a virtual machine or container 1 on host A writes data to a fixed address in an independent memory region, a virtual machine or container 2 on host B can read it, and vice versa. Data consistency can be protected using hardware (e.g., cache coherence, CC) or software (e.g., critical sections / locking mechanisms). The mode where shared segment memory pages cannot be written to by instances can be called read-only mode. In this mode, shared segment memory only supports read operations; write operations trigger write protection, so applications do not need to worry about data consistency. The read-write mode and read-only mode of shared segment memory can be specified when the virtual instance memory is created, or can be flexibly switched during virtual machine or container runtime, depending on the tenant's specific needs.
[0135] Furthermore, as in the embodiment shown in Figure 5, the physical memory mapped to dedicated segment memory and / or shared segment memory can also be located on other hosts. In other words, the physical memory mapped to dedicated segment memory and / or shared segment memory can be located on host A where the virtual machine or container 1 resides, or on host B where the virtual machine or container 2 resides, or on other hosts besides host A and host B (e.g., host C).
[0136] In the embodiments shown in Figure 4 or Figure 5, the allocation strategy for dedicated segment memory and shared segment memory can be specified when the virtual machine or container 1 is created, or it can be allocated by the Infrastructure as a Service (IaaS) layer itself. This application does not make any specific limitations on this.
[0137] Through the technical solution, cross-host memory flexible allocation and cross-host sharing can be supported, and shared segment memory in the virtual machine or the container can be presented to the application for flexible application.
[0138] Optionally, the object of sharing the virtual instance memory across hosts in the above solution can not be limited to other virtual instances. For example, in the embodiment shown in FIG. 6, the virtual machine or the container can also share the memory across hosts with the host process, and the shared memory is presented in the virtual machine or the container. Specifically, after the tenant creates the virtual machine or the container on the host A, the mapping relationship between the GlobaVA and the GuestPA and the mapping relationship between the GlobaVA and the HostPA are established. The establishment process of the mapping relationship can be the same as that described in the embodiment of FIG. 4, which will not be described here. The difference from the embodiment shown in FIG. 4 is that the shared segment memory of the virtual machine or the container 1 can also be used as the memory space of the kernel and / or the user process on any host. The memory space can be allocated by the operating system on the host and controlled by the kernel process or the user process on the host, and the global reference count is managed by the GlobaVA. Only when the virtual machine or the container sharing the memory space are all stopped, the memory space is allowed to be released. It should be understood that the memory space of the process in FIG. 6 is shared with one virtual machine or container only for the purpose of illustration, and the number of virtual machines or containers sharing the memory space of the process is not limited by the technical solution of the present application, that is, the memory space of the process can be mapped to multiple virtual machines or containers. Optionally, the memory space of the process as the shared segment memory can also support the read-write mode or the read-only mode, and the specific implementation can refer to the description of the embodiment shown in FIG. 5, which will not be described here.
[0139] Through the technical solution, the shared memory can exist independently of the virtual machine or the container, which simplifies the management and also effectively releases the CPU resources.
[0140] In some other possible embodiments, the type of the virtual instance memory can not be presented to the virtual instance, but the memory addresses of the virtual instance are flattened, and the sharing of the memory pages is achieved by dynamically adjusting the mapping relationship.
[0141] For example, in the embodiment shown in FIG. 7, after the tenant creates the virtual machine or the container 1 on the host A, the mapping relationship between the GlobaVA and the GuestPA and the mapping relationship between the GlobaVA and the HostPA are established. The establishment process of the mapping relationship can be similar to that described in the embodiment of FIG. 4, except that the exclusive segment memory and the shared segment memory are no longer specified, but the memory addresses are flattened, and the tenant normally uses the allocated memory according to the conventional virtual machine memory usage mode. Similarly, after the tenant creates the virtual machine or the container 2 on the host B, the mapping relationship between the GlobaVA and the GuestPA and the mapping relationship between the GlobaVA and the HostPA are also established.
[0142] During the running of the multiple virtual machines or containers, the global memory manager can compare the contents of multiple memory pages being used (i.e., the memory pages mapped to the virtual instances) to determine whether the contents are the same, and then dynamically adjust the mapping relationship to release the memory pages with the same contents. For example, the four memory pages mapped by the virtual machine or container 1 are located on the host A, and the four memory pages mapped by the virtual machine or container 2 are located on the host B. The global memory manager compares to determine that one of the four memory pages mapped by the virtual machine or container 1 (the memory page represented by the dark color in the host A in FIG. 7, hereinafter referred to as memory page a) has the same content as one of the four memory pages mapped by the virtual machine or container 2 (the memory page represented by the dark color in the host B in FIG. 7, hereinafter referred to as memory page b). Then, the global memory manager can release the mapping relationship of the memory page b (including the mapping relationship between the GlobaVA and the GuestPA and the mapping relationship between the GlobaVA and the HostPA), and map the GlobaVA of the memory page a to the virtual machine or container 2 (the memory segment originally mapped to the memory page b). Through the above manner, the content of the memory page presented to the virtual machine or container 2 does not change, and in the case of no awareness of the virtual machine or container, the memory page a is shared by the virtual machine or container 2, and the resource of the memory page b is released.
[0143] Through the above technical solution, compared with the KSM of the same host, the memory is shared across hosts, and the memory utilization efficiency of the cluster is further improved.
[0144] Optionally, the object in the above solution that realizes the cross-host sharing of the virtual instance memory by the virtual instance in the case of no awareness can not be limited to other virtual instances. For example, in the embodiment shown in FIG. 8, the virtual machine or container can also share the memory with the host process across the hosts, and the virtual machine or container is not aware. Specifically, after the user creates the virtual machine or container on the host A, the mapping relationship between the GlobaVA and the GuestPA and the mapping relationship between the GlobaVA and the HostPA are established. The establishment process of the mapping relationship can be the same as that described in the embodiment of FIG. 7, which will not be described here. Similarly to the process described in the embodiment of FIG. 7, during the running of the virtual machine or container, the global memory manager can compare the content of the memory page being used by the virtual machine or container with the content of the memory page of the memory space of the kernel-mode process or the user-mode process. By adjusting the mapping relationship of the memory page, the memory page is shared by the virtual machine or container and the host process of the process in the case of no awareness of the process, container or virtual machine, and the redundant memory page is released.
[0145] Through the above technical solution, the memory sharing can be applied to the scenario of sharing the host disk cache or the file system by the virtual machine or container.
[0146] In addition, for example, the embodiment shown in FIG. 9, in some possible implementation manners, a plurality of host processes across hosts can also share the same memory space, without starting a virtual machine or a container. Alternatively, the memory space shared by the plurality of kernel mode processes and / or user mode processes can also support read-write mode or read-only mode, and the specific implementation can refer to the description of the embodiment shown in FIG. 4, which is not described here again.
[0147] Through the technical solution, the memory sharing can be applied to the scenario of sharing the disk cache or the file system between hosts.
[0148] It should be understood that the first virtual instance and the second virtual instance bound with the virtual instance memory in the above embodiment are only used for illustration, and the number of virtual instances sharing the same virtual instance memory is not limited in the present application. As an example, in the above method, after the virtual instance memory is bound with the first virtual instance and the second virtual instance, the cloud management platform can further receive a third virtual instance memory binding request and send a control command to the first server in response to the third virtual instance memory binding request, to instruct the first server to provide the virtual instance memory to the third virtual instance, the fourth virtual instance and / or other virtual instances, and the binding manner can be the same as that of the second virtual instance, which is not described here again.
[0149] Through the virtual instance management method provided by the above embodiments of the present application, by connecting a plurality of servers to the high-speed interconnection bus, the instance (process, container and / or virtual machine) deployed on a certain server can directly read and / or write the memory on other servers. On this basis, after a certain physical memory on a server is divided as a virtual instance memory, the virtual instance memory is bound with one or more instances deployed on other servers based on the high-speed interconnection bus, thereby realizing the memory sharing of the instance (process, container and / or virtual machine) across servers, improving the data communication efficiency, and also realizing the cross-host memory deduplication and improving the utilization efficiency of the cross-server memory.
[0150] In addition, optionally, the above virtual instance management method can further include the following steps: the cloud management platform receives a first virtual instance memory unbinding request input by a tenant, the first virtual instance memory unbinding request including an identifier of the first virtual instance; the cloud management platform sends a fourth control command to the first server in response to the first virtual instance memory unbinding request, the fourth control command being used to instruct the first server to stop providing the virtual instance memory to the first virtual instance.
[0151] Through the technical solution, the binding relationship between the virtual instance and the virtual instance memory can be unbound according to the tenant demand, thereby improving the flexibility of virtual instance memory allocation.
[0152] Further, the virtual instance management method can further include the following steps: the cloud management platform receives a virtual instance memory deletion request input by the tenant; and the cloud management platform sends a fifth control command to the first server in response to the virtual instance memory deletion request, the fifth control command being used to instruct the first server to release the virtual instance memory. The release of the virtual instance memory means that, after receiving a new virtual instance memory creation request, the physical memory resource occupied by the virtual instance memory can be provided to the new virtual instance memory. Optionally, the above steps can be executed after all virtual instances having a binding relationship with the virtual instance memory are unbound.
[0153] Through the above technical solution, the virtual instance memory can be deleted according to the tenant demand, so as to release redundant memory resources in time and improve the utilization efficiency of the memory.
[0154] In some possible implementation manners, when the cross-server memory sharing is implemented, the cloud management platform can also not uniformly address the physical memory addresses of the plurality of servers in the cloud data center as Global VA, but can specify a certain block of physical address of a host or a Guest PA (the Host PA corresponding to the host) of a virtual instance already running as a sharing source according to needs, so as to be mapped to the Guest PA of the virtual instance of the user on other hosts. The following will be described in detail in combination with FIG. 10. Optionally, the method shown in FIG. 10 can be applied to the cloud management platform 210 shown in FIG. 2. As shown in FIG. 10, the method includes the following steps.
[0155] Step S1010: receiving a virtual instance creation request input by the tenant.
[0156] For example, in step S1010, the tenant can log in to the cloud management platform through a client to create a virtual instance. Specifically, the cloud management platform can receive a virtual instance creation request input by the tenant through the client. The virtual instance shared memory creation request can include the specification of the virtual instance to be created, and can also include the capacity of the virtual instance shared memory.
[0157] The specification of the virtual instance can include one or more of the following: a computing resource, a network resource and / or a storage resource. The computing resource includes but is not limited to a CPU specification (for example, the number of cores of the CPU, the number of threads of the CPU, etc.) and a memory specification (for example, the capacity of the memory, the speed of the memory, etc.). The network resource includes but is not limited to a network card specification (for example, an interface type, a transmission rate, a supported protocol, etc.), a public network IP address, a private network IP address and a bandwidth specification. The storage resource can include but is not limited to a disk specification (for example, the capacity of the disk, the read / write speed, etc.).
[0158] The memory specification in the specification of the virtual instance can refer to a specification of virtual instance non-shared memory. The memory resource used by the virtual instance to be created can include virtual instance non-shared memory and virtual instance shared memory, and the capacity of the virtual instance shared memory is additionally specified in the virtual instance creation request. Alternatively, the tenant can also set the virtual instance non-shared memory to 0 according to the needs of the tenant, and then the memory in the computing resource used by the virtual instance to be created will be all virtual instance shared memory of the shared type.
[0159] Step S1020: selecting a first server from the plurality of servers in response to the virtual instance creation request, and sending a first control command to the first server.
[0160] For example, in step S1020, the cloud management platform can select a first server capable of creating the virtual instance from the plurality of servers in the cloud data center according to the specification of the virtual memory indicated in the virtual instance creation request. The first server has hardware resources matching the specification of the virtual memory to be created. After determining the appropriate first server, the cloud management platform can send a first control command to the first server, which instructs the first server to create virtual instance shared memory according to the physical memory with matching capacity in the first server, create a first virtual instance in the first server according to the virtual instance specification, and set the virtual instance shared memory to allow the first virtual instance to access.
[0161] Alternatively, the first server can create the virtual instance shared memory through a pass-through technology, or can create the virtual instance shared memory through a memory virtualization technology, which is not limited in the present application.
[0162] Alternatively, the virtual instance memory provided for the first virtual instance can be presented as ordinary memory in the first virtual instance, or the virtual instance memory can also be presented as an independent read-write memory device. The specific implementation mode can refer to the description of step S340 in the method described above, which will not be described here.
[0163] In some possible implementation, the virtual instance creation request can further include permission information for indicating read-write permission of the first virtual instance to the virtual instance shared memory. For example, the virtual instance creation request can include permission information for setting the first virtual instance as readable and writable to the virtual instance shared memory, and correspondingly, the first control command can be used for instructing the first server to allow the first virtual instance to read and write the virtual instance shared memory. For another example, the virtual instance creation request can include permission information for setting the first virtual instance as readable but not writable to the virtual instance shared memory, and correspondingly, the first control command can be used for instructing the first server to allow the first virtual instance to read the virtual instance shared memory and prohibit the first virtual instance from writing the virtual instance shared memory.
[0164] Step S1030: receiving a virtual instance memory binding request.
[0165] For example, in step S1030, the tenant can request to bind the virtual instance shared memory to the second virtual instance through the cloud management platform. Specifically, the cloud management platform can receive a virtual instance memory binding request input by the tenant through the client, and the virtual instance memory binding request can include an identifier of the second virtual instance to be bound to the virtual instance shared memory. The tenant who inputs the virtual instance memory binding request to the cloud management platform can be the same tenant who inputs the virtual instance creation request in step S1010, or can be another tenant authorized by the tenant.
[0166] The second virtual instance can be deployed on the server where the physical memory resource corresponding to the virtual instance shared memory is located, or can be deployed on another server in the cloud data center. In other words, the second virtual instance and the first virtual instance as the sharing source can be deployed on the same server, or can be deployed on different servers.
[0167] Step S1040: sending a second control command to the first server in response to the virtual instance memory binding request.
[0168] For example, in step S1040, the cloud management platform can send a control command to the first server where the physical memory resource corresponding to the virtual instance shared memory is located according to the identifier of the second virtual instance in the virtual instance memory binding request, and the control command is used for instructing the first server to provide the virtual instance shared memory to the first virtual instance for use. If the first virtual instance is deployed on the first server where the physical memory resource corresponding to the virtual instance shared memory is located, the first server can directly provide the virtual instance memory to the first virtual instance for use; if the first virtual instance is deployed on another server in the cloud data center, the first server can provide the virtual instance memory to the first virtual instance for use through the high-speed interconnection bus.
[0169] Optionally, the virtual instance shared memory provided for use by the second virtual instance can be presented as normal memory in the second virtual instance, or the virtual instance shared memory can also be presented as an independent read-write memory device. The specific implementation can refer to the description of step S340 in the foregoing method, and details are not described herein.
[0170] In some possible embodiments, the virtual instance memory binding request can further include permission information for indicating the read-write permission of the virtual instance shared memory by the bound virtual instance. For example, the virtual instance memory binding request can include permission information for setting the second virtual instance as readable and writable to the virtual instance shared memory, and correspondingly, the second control command can be further used for instructing the first server to allow the second virtual instance to read and write the virtual instance shared memory. For another example, the virtual instance memory binding request can include permission information for setting the second virtual instance as readable but not writable to the virtual instance shared memory, and correspondingly, the second control command can be further used for instructing the first server to allow the second virtual instance to read the virtual instance shared memory and prohibit the second virtual instance from writing the virtual instance shared memory.
[0171] For example, in the embodiment shown in FIG. 11, after the tenant creates the virtual machine or container 1 on the host A, the tenant can establish a mapping relationship between the guest physical address (Guest PA) and the host physical address (Host PA). The Guest PA can include the shared segment memory and the exclusive segment memory. After the tenant creates the virtual machine or container 2 on the host B, the tenant can map the Guest PA of the shared segment memory of the virtual machine or container 1 to the virtual machine or container 2 as a shared source together with the host A and the corresponding Host PA on the host A, and establish a mapping relationship between the Guest PA of the virtual machine or container 2 and the host A and the corresponding Host PA on the host A. In addition, the virtual machine or container 2 can also be allocated new exclusive segment memory, and the establishment process of the mapping relationship of the exclusive segment memory of the virtual machine or container 2 can refer to the virtual machine or container 1, and details are not described herein.
[0172] It should be understood that the second virtual instance in the above embodiments is only used for illustration, and the number of virtual instances bound to the virtual instance shared memory is not specifically limited in the present application. For example, in the above method, after the virtual instance shared memory is bound to the second virtual instance, the cloud management platform can further receive a new virtual instance memory binding request and respond to the new virtual instance memory binding request by sending a control command to the first server, to instruct the first server to provide the virtual instance shared memory for use by a third virtual instance, a fourth virtual instance and / or other virtual instances, and the binding mode can be the same as that of the second virtual instance, and details are not described herein.
[0173] By the virtual instance management method of the embodiments of the present application, the virtual instance deployed on a certain server can directly read and / or write the memory on other servers by connecting multiple servers to the high-speed interconnection bus. On this basis, part or all of the virtual instance memory of the virtual instance created on a certain server can be specified as virtual instance shared memory, and then the virtual instance shared memory is bound to other virtual instances deployed on other servers based on the high-speed interconnection bus, so that multiple virtual instances across servers can access the same virtual instance shared memory, thereby realizing memory sharing of virtual instances across servers, improving data communication efficiency, and also realizing cross-host memory deduplication and improving the utilization efficiency of cross-server memory.
[0174] In addition, the virtual instance management method can further include the following steps: the cloud management platform receives a first virtual instance release request input by a tenant, the first virtual instance release request including an identifier of the first virtual instance; the cloud management platform sends a third control command to the first server in response to the first virtual instance release request, the third control command being used to instruct the first server to: uninstall the first virtual instance, release the virtual instance shared memory, and release the hardware resources occupied by the first virtual instance. Releasing the virtual instance shared memory means that after receiving a new virtual instance creation request, the physical memory resources occupied by the virtual instance shared memory can be provided to the new virtual instance memory for use.
[0175] The above describes the method embodiments of the virtual instance management provided by the present application in combination with FIG. 3 to FIG. 11. The following describes the device embodiments of the virtual instance management provided by the present application in combination with FIG. 12 to FIG. 16.
[0176] FIG. 12 shows a schematic structural diagram of a cloud management platform 1200 according to an embodiment of the present application.
[0177] As shown in FIG. 12, the cloud management platform 1200 includes a receiving module 1210 and a processing module 1220.
[0178] Specifically, the receiving module 1210 is configured to receive a virtual instance memory creation request input by a tenant, the virtual instance shared memory creation request including the capacity of the virtual instance memory to be created and the type of the virtual instance memory, the type including a shared memory type and / or a private memory type.
[0179] Specifically, the processing module 1220 is configured to select a first server from the multiple servers in response to the virtual instance memory creation request, the first server having physical memory matching the capacity, and send a first control command to the first server, the first control command being used to instruct the first server to create the virtual instance memory according to the physical memory.
[0180] Optionally, the first virtual instance memory binding request further comprises permission information of setting the first virtual instance to read and write or read but not write the virtual instance memory; and the second control command is further used for instructing the first server to allow the first virtual instance to read and write the virtual instance memory, or to allow the first virtual instance to read but not write the virtual instance memory.
[0181] Specifically, the receiving module 1210 is further configured to receive a first virtual instance memory binding request, the first virtual instance memory binding request comprising an identifier of a first virtual instance to which virtual instance memory is to be bound, the first virtual instance being deployed in a second server of the plurality of servers.
[0182] Specifically, the processing module 1220 is further configured to send, in response to the first virtual instance memory binding request, a second control command to the first server, the second control command being used for instructing the first server to provide the virtual instance memory to the first virtual instance for use through the high-speed interconnection bus, wherein: in a case where the type of the virtual instance memory is a shared memory type, the virtual instance memory is provided to the first virtual instance for use in a manner that allows sharing with other virtual instances; and / or in a case where the type of the virtual instance memory is an exclusive memory type, the virtual instance memory is provided to the first virtual instance for use in a manner that does not allow sharing with other virtual instances.
[0183] Optionally, the second virtual instance memory binding request further comprises permission information of setting the second virtual instance to read and write or read but not write the virtual instance memory; and the third control command is further used for instructing the first server to allow the second virtual instance to read and write the virtual instance memory, or to allow the second virtual instance to read but not write the virtual instance memory.
[0184] Optionally, in a case where the type of the virtual instance memory is a shared memory type, the receiving module 1210 is further configured to receive a second virtual instance memory binding request, the second virtual instance memory binding request comprising an identifier of a second virtual instance to which virtual instance memory is to be bound, the second virtual instance being deployed in a third server of the plurality of servers; and the processing module 1220 is further configured to send, in response to the second virtual instance memory binding request, a third control command to the first server, the third control command being used for instructing the first server to provide the virtual instance memory to the second virtual instance for use through the high-speed interconnection bus, wherein the virtual instance memory is set to be accessible by the first virtual instance and the second virtual instance.
[0185] Optionally, the receiving module 1210 is further configured to receive a first virtual instance memory unbinding request input by a tenant, the first virtual instance memory unbinding request comprising an identifier of a first virtual instance; and the processing module 1220 is further configured to send a fourth control command to the first server in response to the first virtual instance memory unbinding request, the fourth control command being used to instruct the first server to stop providing virtual instance memory to the first virtual instance for use.
[0186] Optionally, the receiving module 1210 is further configured to receive a virtual instance memory deletion request input by a tenant; and the processing module 1220 is further configured to send a fifth control command to the first server in response to the virtual instance memory deletion request, the fifth control command being used to instruct the first server to release the virtual instance memory.
[0187] FIG. 13 shows a schematic structural diagram of another cloud management platform 1300 provided by an embodiment of the present application.
[0188] As shown in FIG. 13, the cloud management platform 1300 comprises a receiving module 1310 and a processing module 1320.
[0189] Specifically, the receiving module 1310 is configured to receive a virtual instance creation request input by a tenant, the virtual instance creation request comprising a capacity of virtual instance shared memory and a virtual instance specification to be created.
[0190] Specifically, the processing module 1320 is configured to select a first server from a plurality of servers in response to the virtual instance creation request, and send a first control command to the first server, the first control command being used to instruct the first server to: create the virtual instance shared memory according to physical memory in the first server that matches the capacity, create a first virtual instance in the first server according to the virtual instance specification, and set the virtual instance shared memory to be accessible by the first virtual instance, wherein the first server is provided with hardware resources that can provide the virtual instance specification.
[0191] Optionally, the virtual instance creation request further comprises permission information for setting the first virtual instance to be readable and writable or readable and non-writable to the virtual instance shared memory; and the first control command is further used to instruct the first server to allow the first virtual instance to read and write the virtual instance shared memory, or to allow the first virtual instance to read the virtual instance shared memory and prohibit the first virtual instance from writing the virtual instance shared memory.
[0192] Specifically, the receiving module 1310 is further configured to receive a virtual instance memory binding request, the virtual instance memory binding request comprising an identifier of a second virtual instance to which virtual instance shared memory is to be bound, the second virtual instance being deployed in a second server of the plurality of servers.
[0193] Specifically, the processing module 1320 is further configured to send a second control command to the first server in response to the virtual instance memory binding request, the second control command being used to instruct the first server to provide the virtual instance shared memory to the second virtual instance for use through the high-speed interconnection bus, wherein the virtual instance shared memory is provided to the second virtual instance for use in a manner that allows sharing with the first virtual instance.
[0194] Optionally, the virtual instance memory binding request further includes permission information that sets the second virtual instance to be readable and writable or readable and non-writable to the virtual instance shared memory; and the second control command is further used to instruct the first server to allow the second virtual instance to read and write the virtual instance shared memory, or to allow the second virtual instance to read the virtual instance shared memory and prohibit the second virtual instance to write the virtual instance shared memory.
[0195] Optionally, the receiving module 1310 is further configured to receive a first virtual instance release request input by a tenant, the first virtual instance release request including an identifier of the first virtual instance; and the processing module 1320 is further configured to send a third control command to the first server in response to the first virtual instance release request, the third control command being used to instruct the first server to: uninstall the first virtual instance, release the virtual instance shared memory, and release hardware resources occupied by the first virtual instance.
[0196] The above modules can be implemented by software or by hardware. For example, the implementation of the processing module 1220 is described below. Similarly, the implementation of the receiving module 1210, the receiving module 1310, and the processing module 1320 can refer to the implementation of the processing module 1220.
[0197] As an example of a software functional unit, the processing module 1220 can include code running on a computing instance. The computing instance can include at least one of a physical host (computing device), a virtual machine, and a container. Further, the computing instance can be one or more. For example, the processing module 1220 can include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code can be distributed in the same region, or can be distributed in different regions. Further, the multiple hosts / virtual machines / containers used to run the code can be distributed in the same availability zone (AZ), or can be distributed in different AZs, each AZ including one data center or multiple data centers with similar geographical locations. Generally, one region can include multiple AZs.
[0198] Similarly, the plurality of hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Among them, usually one VPC is set in one region, and communication between two VPCs in the same region and between VPCs in different regions needs to set a communication gateway in each VPC to realize the interconnection between VPCs through the communication gateway.
[0199] As an example of a hardware functional unit, the processing module 1220 can include at least one computing device, such as a server, etc. Alternatively, the processing module 1220 can also be a device implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), etc. Among them, the above-mentioned PLD can be implemented by a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0200] The plurality of computing devices included in the processing module 1220 can be distributed in the same region or in different regions. The plurality of computing devices included in the processing module 1220 can be distributed in the same AZ or in different AZs. Similarly, the plurality of computing devices included in the processing module 1220 can be distributed in the same VPC or in multiple VPCs. Among them, the plurality of computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0201] It should be noted that in other embodiments, the receiving module 1210 and the processing module 1220 can be used to perform any steps of the above virtual instance management method, and the steps implemented by the receiving module 1210 and the processing module 1220 can be specified as needed. The cloud management platform 1200 can realize all functions by realizing different steps of the above virtual instance management method through the receiving module 1210 and the processing module 1220 respectively.
[0202] Similarly, in other embodiments, the receiving module 1310 and the processing module 1320 can be used to perform any of the steps of the above-described virtual instance management method, and the steps implemented by the receiving module 1310 and the processing module 1320 can be specified as needed, and the entire function of the cloud management platform 1300 can be implemented by the receiving module 1310 and the processing module 1320 implementing different steps of the above-described virtual instance management method.
[0203] The present application also provides a computing device 100. As shown in FIG. 14, the computing device 100 includes a bus 102, a processor 104, a memory 106, and a communication interface 108. The processor 104, the memory 106, and the communication interface 108 communicate with each other through the bus 102. The computing device 100 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 100.
[0204] The bus 102 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one line is shown in FIG. 14, but it does not mean that there is only one bus or only one type of bus. The bus 102 can include a path for transmitting information between various components (e.g., the memory 106, the processor 104, the communication interface 108) of the computing device 100.
[0205] The processor 104 can include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP), etc.
[0206] The memory 106 can include a volatile memory (e.g., a random access memory (RAM)). The memory 106 can also include a non-volatile memory (e.g., a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD)).
[0207] The memory 106 stores executable program code, and the processor 104 executes the executable program code to implement the functions of the aforementioned receiving module and processing module respectively, thereby implementing the aforementioned virtual instance management method. That is, the memory 106 stores instructions for executing the aforementioned virtual instance management method.
[0208] The communication interface 108 uses a command distribution module such as, but not limited to, a network interface card, a transceiver, to implement communication between the computing device 100 and other devices or communication networks.
[0209] The embodiments of the present disclosure also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a notebook computer, or a smart phone.
[0210] As shown in FIG. 15, the computing device cluster includes at least one computing device 100. The memory 106 in one or more computing devices 100 in the computing device cluster can store the same instructions for executing the aforementioned virtual instance management method.
[0211] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster can also respectively store partial instructions for executing the aforementioned virtual instance management method. In other words, the combination of one or more computing devices 100 can collectively execute the instructions for executing the aforementioned virtual instance management method.
[0212] It should be noted that the memory 106 in different computing devices 100 in the computing device cluster can store different instructions for respectively executing part of the functions of the aforementioned cloud management platform. That is, the instructions stored in the memory 106 in different computing devices 100 can implement the functions of one or more of the receiving module and the processing module.
[0213] In some possible implementations, one or more computing devices in the computing device cluster can be connected through a network. The network can be a wide area network or a local area network, etc. FIG. 16 shows one possible implementation. As shown in FIG. 16, two computing devices 100A and 100B are connected through a network. Specifically, the communication interface in each computing device is connected to the network. In this type of possible implementation, the memory 106 in the computing device 100A stores instructions for executing the functions of the receiving module. Meanwhile, the memory 106 in the computing device 100B stores instructions for executing the functions of the processing module.
[0214] It should be understood that the functions of the computing device 100A shown in FIG. 16 can also be completed by multiple computing devices 100. Similarly, the functions of the computing device 100B can also be completed by multiple computing devices 100.
[0215] The embodiment of the present application further provides a chip, which comprises a processor and a data interface. The processor reads instructions stored on a memory through the data interface to execute the virtual instance management method.
[0216] The embodiment of the present application further provides a computer program product comprising instructions. The computer program product can be a software or program product comprising instructions, which can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device is caused to execute the virtual instance management method.
[0217] The embodiment of the present application further provides a computer readable storage medium. The computer readable storage medium can be any available medium that a computing device can store or a data storage device such as a data center comprising one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk), etc. The computer readable storage medium comprises instructions, which instruct the computing device to execute the virtual instance management method.
[0218] The technical features of the above embodiments can be combined in any manner. To make the description concise, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combinations of the technical features do not contradict each other, they should be considered as the scope of the present application.
[0219] The above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the protection scope of the technical solutions of the embodiments of the present application.
Claims
A virtual instance management method based on cloud computing technology, characterized in that, The method is applied to a cloud management platform for managing a cloud data center, the cloud data center comprising a plurality of servers accessing a high-speed interconnection bus inside the cloud data center, the method comprising: The cloud management platform receives a virtual instance memory creation request input by a tenant, the virtual instance shared memory creation request comprising a capacity of a virtual instance memory to be created, and a type of the virtual instance memory, the type comprising a shared memory type and / or a private memory type; The cloud management platform selects a first server from the plurality of servers in response to the virtual instance memory creation request, wherein the first server has a physical memory matching the capacity, and sends a first control command to the first server, the first control command being used to instruct the first server to create the virtual instance memory according to the physical memory; The cloud management platform receives a first virtual instance memory binding request, the first virtual instance memory binding request comprising an identification of a first virtual instance to which the virtual instance memory is to be bound, the first virtual instance being deployed in a second server of the plurality of servers; The cloud management platform sends a second control command to the first server in response to the first virtual instance memory binding request, the second control command being used to instruct the first server to provide the virtual instance memory to the first virtual instance for use through the high-speed interconnection bus, wherein: in the case that the type is the shared memory type, the virtual instance memory is provided to the first virtual instance for use in a manner that allows sharing with other virtual instances; and / or, in the case that the type is the private memory type, the virtual instance memory is provided to the first virtual instance for use in a manner that does not allow sharing with other virtual instances. The method of claim 1, wherein The type is the shared memory type, and the method further comprises: The cloud management platform receives a second virtual instance memory binding request, the second virtual instance memory binding request comprising an identification of a second virtual instance to which the virtual instance memory is to be bound, the second virtual instance being deployed in a third server of the plurality of servers; The cloud management platform sends a third control command to the first server in response to the second virtual instance memory binding request, the third control command being used to instruct the first server to provide the virtual instance memory to the second virtual instance for use through the high-speed interconnection bus, wherein the virtual instance memory is set to allow common access by the first virtual instance and the second virtual instance. The method according to claim 2, characterized in that The first virtual instance memory binding request further comprises: permission information setting the first virtual instance as readable and writable or readable and non-writable to the virtual instance memory; The second control command is further used to instruct the first server to: allow the first virtual instance to read and write the virtual instance memory, or allow the first virtual instance to read the virtual instance memory and prohibit the first virtual instance from writing the virtual instance memory; The type is the private memory type, and the method further comprises: The cloud management platform receives a second virtual instance memory binding request, the second virtual instance memory binding request comprising an identification of a second virtual instance to which the virtual instance memory is to be bound, the second virtual instance being deployed in a third server of the plurality of servers; The cloud management platform sends a third control command to the first server in response to the second virtual instance memory binding request, the third control command being used to instruct the first server to provide the virtual instance memory to the second virtual instance for use through the high-speed interconnection bus, wherein the virtual instance memory is set to allow common access by the first virtual instance and the second virtual instance. The first virtual instance memory binding request further comprises: permission information setting the first virtual instance as readable and writable or readable and non-writable to the virtual instance memory; The second control command is further used to instruct the first server to: allow the first virtual instance to read and write the virtual instance memory, or allow the first virtual instance to read the virtual instance memory and prohibit the first virtual instance from writing the virtual instance memory; The second virtual instance memory binding request further includes: setting permission information of the second virtual instance on the virtual instance memory being readable and writable or readable and non-writable; The third control command is further used for instructing the first server to: allow the second virtual instance to read and write the virtual instance memory, or allow the second virtual instance to read the virtual instance memory and prohibit the second virtual instance from writing the virtual instance memory. The method according to any one of claims 1 to 3, characterized in that The method further includes: The cloud management platform receives a first virtual instance memory unbinding request input by the tenant, and the first virtual instance memory unbinding request includes an identifier of the first virtual instance; The cloud management platform sends a fourth control command to the first server in response to the first virtual instance memory unbinding request, and the fourth control command is used for instructing the first server to stop providing the virtual instance memory to the first virtual instance. The method according to any one of claims 1 to 4, characterized in that The method further includes: The cloud management platform receives a virtual instance memory deletion request input by the tenant; The cloud management platform sends a fifth control command to the first server in response to the virtual instance memory deletion request, and the fifth control command is used for instructing the first server to release the virtual instance memory. The method according to any one of claims 1 to 5, characterized in that The cloud data center is further provided with a global memory management node, the global memory management node is used for establishing a mapping relationship between a physical memory address matched with the capacity in the first server and a global memory address, the first server confirms the global memory address corresponding to the physical memory address through the global memory management node, and the global memory management node is distributed in each of the plurality of servers or is centrally arranged in one of the plurality of servers. The method according to any one of claims 1 to 6, characterized in that The high-speed interconnection bus is a parallel bus with a bandwidth of not less than 40 Gb / s and supporting synchronous memory access semantics. The method according to any one of claims 1 to 7, characterized in that The virtual instance includes a virtual machine and / or a container. A virtual instance management method based on cloud computing technology, characterized in that, The method is applied to a cloud management platform, the cloud management platform is used for managing a cloud data center, the cloud data center includes a plurality of servers, the plurality of servers access a high-speed interconnection bus network inside the cloud data center, and the method includes: The cloud management platform receives a virtual instance creation request input by a tenant, and the virtual instance creation request includes a capacity of a virtual instance shared memory and a virtual instance specification to be created; The cloud management platform selects a first server in the plurality of servers in response to the virtual instance creation request, sends a first control command to the first server, and the first control command is used for instructing the first server to: create the virtual instance shared memory according to a physical memory matched with the capacity in the first server, create a first virtual instance according to the virtual instance specification in the first server, and set the virtual instance shared memory to be accessible by the first virtual instance, wherein the first server is provided with hardware resources capable of providing the virtual instance specification. The cloud management platform receives a virtual instance memory binding request, the virtual instance memory binding request comprising an identifier of a second virtual instance to which the virtual instance shared memory is to be bound, the second virtual instance being deployed in a second server of the plurality of servers; The cloud management platform sends a second control command to the first server in response to the virtual instance memory binding request, the second control command being used to instruct the first server to provide the virtual instance shared memory to the second virtual instance for use through the high-speed interconnection bus, wherein the virtual instance shared memory is provided to the second virtual instance for use in a manner that allows sharing with the first virtual instance. The method of claim 9, wherein The method further comprises: The cloud management platform receives a first virtual instance release request input by the tenant, the first virtual instance release request comprising an identifier of the first virtual instance; The cloud management platform sends a third control command to the first server in response to the first virtual instance release request, the third control command being used to instruct the first server to unload the first virtual instance, release the virtual instance shared memory, and release the hardware resources occupied by the first virtual instance. The method according to claim 9 or 10, characterized in that The virtual instance creation request further comprises permission information that sets the first virtual instance as readable and writable or readable and non-writable to the virtual instance shared memory; The first control command is further used to instruct the first server to allow the first virtual instance to read and write the virtual instance shared memory, or allow the first virtual instance to read the virtual instance shared memory and prohibit the first virtual instance from writing the virtual instance shared memory; The virtual instance memory binding request further comprises permission information that sets the second virtual instance as readable and writable or readable and non-writable to the virtual instance shared memory; The second control command is further used to instruct the first server to allow the second virtual instance to read and write the virtual instance shared memory, or allow the second virtual instance to read the virtual instance shared memory and prohibit the second virtual instance from writing the virtual instance shared memory. The method according to any one of claims 9 to 11, characterized in that The cloud data center is further provided with a global memory management node, the global memory management node being used to establish a mapping relationship between the capacity-matched physical memory address in the first server and a global memory address, the first server confirming the global memory address corresponding to the physical memory address through the global memory management node, and the global memory management node being distributed in each server of the plurality of servers or being centrally disposed in one of the plurality of servers. The method according to any one of claims 9 to 12, characterized in that The high-speed interconnection bus network is a parallel bus network with a bandwidth of no less than 40 Gb / s and supporting synchronous memory access semantics. The method according to any one of claims 9 to 13, characterized in that The virtual instance comprises a virtual machine and / or a container. The virtual instance comprises a virtual machine and / or a container. A cloud management platform characterized by The cloud management platform is used for managing a cloud data center, the cloud data center comprising a plurality of servers, the plurality of servers being accessed into a high-speed interconnection bus inside the cloud data center, the cloud management platform comprising: a receiving module configured to receive a virtual instance memory creation request input by a tenant, the virtual instance shared memory creation request comprising a capacity of a virtual instance memory to be created, and a type of the virtual instance memory, the type comprising a shared memory type and / or a private memory type; a processing module configured to select a first server from the plurality of servers in response to the virtual instance memory creation request, wherein the first server has a physical memory matching the capacity, and send a first control command to the first server, the first control command being used for instructing the first server to create the virtual instance memory according to the physical memory; the receiving module is further configured to receive a first virtual instance memory binding request, the first virtual instance memory binding request comprising an identification of a first virtual instance to which the virtual instance memory is to be bound, the first virtual instance being deployed in a second server of the plurality of servers; the processing module is further configured to send a second control command to the first server in response to the first virtual instance memory binding request, the second control command being used for instructing the first server to provide the virtual instance memory to the first virtual instance for use through the high-speed interconnection bus, wherein: in a case where the type is the shared memory type, the virtual instance memory is provided to the first virtual instance for use in a manner that allows sharing with other virtual instances; and / or, in a case where the type is the private memory type, the virtual instance memory is provided to the first virtual instance for use in a manner that does not allow sharing with other virtual instances. The cloud management platform of claim 15, wherein, the type is the shared memory type, the receiving module is further configured to receive a second virtual instance memory binding request, the second virtual instance memory binding request comprising an identification of a second virtual instance to which the virtual instance memory is to be bound, the second virtual instance being deployed in a third server of the plurality of servers; the processing module is further configured to send a third control command to the first server in response to the second virtual instance memory binding request, the third control command being used for instructing the first server to provide the virtual instance memory to the second virtual instance for use through the high-speed interconnection bus, wherein the virtual instance memory is set to be accessible to the first virtual instance and the second virtual instance. The cloud management platform of claim 16, wherein, the first virtual instance memory binding request further comprises permission information for setting the first virtual instance to be readable and writable or readable and non-writable to the virtual instance memory; the second control command is further used for instructing the first server to allow the first virtual instance to read and write the virtual instance memory, or allow the first virtual instance to read the virtual instance memory and prohibit the first virtual instance from writing the virtual instance memory; The second virtual instance memory binding request further includes: setting permission information of the second virtual instance on the virtual instance memory being readable and writable or readable and non-writable; The third control command is further used for instructing the first server to allow the second virtual instance to read and write the virtual instance memory, or to allow the second virtual instance to read the virtual instance memory and prohibit the second virtual instance from writing the virtual instance memory. The cloud management platform according to any one of claims 15 to 17, characterized in that, The receiving module is further configured to receive a first virtual instance memory unbinding request input by the tenant, the first virtual instance memory unbinding request including an identifier of the first virtual instance. The processing module is further configured to send a fourth control command to the first server in response to the first virtual instance memory unbinding request, the fourth control command being used for instructing the first server to stop providing the virtual instance memory to the first virtual instance for use. The cloud management platform according to any one of claims 15 to 18, characterized in that, The receiving module is further configured to receive a virtual instance memory deletion request input by the tenant. The processing module is further configured to send a fifth control command to the first server in response to the virtual instance memory deletion request, the fifth control command being used for instructing the first server to release the virtual instance memory. The cloud management platform according to any one of claims 15 to 19, characterized in that The cloud data center is further provided with a global memory management node, the global memory management node being used for establishing a mapping relationship between the physical memory address matched with the capacity in the first server and a global memory address, the first server confirming the global memory address corresponding to the physical memory address through the global memory management node, and the global memory management node being distributed in each of the plurality of servers or being centrally arranged in one of the plurality of servers. The cloud management platform according to any one of claims 15 to 20, characterized in that The high-speed interconnection bus is a parallel bus with a bandwidth of no less than 40 Gb / s and supporting synchronous memory access semantics. The cloud management platform according to any one of claims 15 to 21, characterized in that The virtual instance includes a virtual machine and / or a container. A cloud management platform characterized by The cloud management platform is used for managing a cloud data center, the cloud data center including a plurality of servers, the plurality of servers being accessed to a high-speed interconnection bus network inside the cloud data center, and the cloud management platform including: a receiving module configured to receive a virtual instance creation request input by a tenant, the virtual instance creation request including a capacity of a virtual instance shared memory and a virtual instance specification to be created; The processing module is configured to select a first server from the plurality of servers in response to the virtual instance creation request, and send a first control command to the first server, where the first control command is used to instruct the first server to create the virtual instance shared memory according to the physical memory matched with the capacity in the first server, and create a first virtual instance according to the virtual instance specification in the first server, and set the virtual instance shared memory to allow the first virtual instance to access, where the first server is provided with hardware resources that can provide the virtual instance specification; The receiving module is further configured to receive a virtual instance memory binding request, where the virtual instance memory binding request comprises an identifier of a second virtual instance to which the virtual instance shared memory is to be bound, and the second virtual instance is deployed in a second server of the plurality of servers; The processing module is further configured to send a second control command to the first server in response to the virtual instance memory binding request, where the second control command is used to instruct the first server to provide the virtual instance shared memory to the second virtual instance for use through the high-speed interconnection bus, and the virtual instance shared memory is set to be provided to the second virtual instance for use in a manner that allows the first virtual instance to share the virtual instance shared memory. The cloud management platform according to claim 23, wherein The receiving module is further configured to receive a first virtual instance release request input by the tenant, where the first virtual instance release request comprises an identifier of the first virtual instance; The processing module is further configured to send a third control command to the first server in response to the first virtual instance release request, where the third control command is used to instruct the first server to unload the first virtual instance, release the virtual instance shared memory, and release hardware resources occupied by the first virtual instance. The cloud management platform according to claim 23 or 24, characterized in that, The virtual instance creation request further comprises permission information that sets the first virtual instance to be readable and writable or readable and non-writable to the virtual instance shared memory; The first control command is further used to instruct the first server to allow the first virtual instance to read and write the virtual instance shared memory, or allow the first virtual instance to read the virtual instance shared memory and prohibit the first virtual instance from writing the virtual instance shared memory; The virtual instance memory binding request further comprises permission information that sets the second virtual instance to be readable and writable or readable and non-writable to the virtual instance shared memory; The second control command is further used to instruct the first server to allow the second virtual instance to read and write the virtual instance shared memory, or allow the second virtual instance to read the virtual instance shared memory and prohibit the second virtual instance from writing the virtual instance shared memory. The cloud management platform according to any one of claims 23 to 25, characterized in that The cloud data center is also provided with a global memory management node, which is configured to establish a mapping relationship between the physical memory address matched with the capacity in the first server and the global memory address, and the first server confirms the global memory address corresponding to the physical memory address through the global memory management node, and assigns the global memory address to the first virtual instance and the second virtual instance. The global memory management node is distributed in each of the plurality of servers, or is centrally arranged in one of the plurality of servers. The cloud management platform according to any one of claims 23 to 26, characterized in that The high-speed interconnection bus network is a parallel bus network with a bandwidth of no less than 40 Gb / s and supporting synchronous memory access semantics. The cloud management platform according to any one of claims 23 to 27, characterized in that The virtual instance includes a virtual machine and / or a container. A computing device, characterized in that A computer program product including instructions that, when executed by a computing device or a cluster of computing devices, cause the computing device or the cluster of computing devices to perform the method of any one of claims 1 to 8, or the method of any one of claims 9 to 14. A cluster of computing devices, characterized in that, A computing device or a cluster of computing devices including a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the method of any one of claims 1 to 8, or the method of any one of claims 9 to 14. A computer program product, characterized in that A computer program product including instructions that, when executed by a computing device or a cluster of computing devices, cause the computing device or the cluster of computing devices to perform the method of any one of claims 1 to 8, or the method of any one of claims 9 to 14. A computer-readable storage medium, characterized by A computer program product including instructions that, when executed by a computing device or a cluster of computing devices, cause the computing device or the cluster of computing devices to perform the method of any one of claims 1 to 8, or the method of any one of claims 9 to 14.
Citation Information
Patent Citations
Memory sharing method and device, electronic equipment and storage medium
CN111813584A
Method and device for sharing memory between host and virtual machine, equipment and medium
CN114077480A
Container creation method and device and storage medium
CN117215712A
Server and cloud system based on cloud computing technology
CN117389677A
Virtual instance configuration method based on cloud computing technology and cloud management platform
WO2024193268A1