Server application migration method and device
By translating and converting the difference in the CPU instruction set between servers, the problem of low application migration efficiency is solved, and efficient application migration without recompilation is achieved.
Patent Information
- Application Number
- CN202510537506.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-04-27
AI Technical Summary
When performing application migration between servers with different central processor architectures, the existing technology requires recompiling the application, resulting in low migration efficiency.
By obtaining the difference between the central processor instruction set of the first server and the second server, the first instruction is translated and converted into the second instruction so that it simulates the function of the first instruction on the second server, avoiding recompilation.
It realizes application migration between different central processor architectures without recompilation, improving migration efficiency and stability.
Smart Images

Figure CN120045290B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to application migration between servers. Background Art
[0002] In related art, when migrating applications between different servers in the same server cluster, the CPU architectures of the different servers may differ, resulting in significant differences in the instruction sets of the CPUs with different architectures. This can cause application errors when the application is run using the target server's instruction set after being migrated to the target server. Therefore, when migrating applications between servers with different CPU architectures, the application needs to be recompiled before migration. This recompilation takes a long time, resulting in low application migration efficiency. Therefore, there is a problem of low application migration efficiency.
[0003] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0004] The present application provides a method and apparatus for migrating applications of a server, so as to at least solve the problem of low efficiency of application migration in related technologies.
[0005] The present application provides a server application migration method, comprising: obtaining an application deployed on a first server in a server cluster, wherein the first server uses a first central processing unit instruction set, and the first central processing unit instruction set is a basic command set used by the central processing unit of the first server to interact with and execute upper-layer applications; in response to an application migration request of the application, obtaining a second central processing unit instruction set used by a second server in the server cluster, wherein the application migration request is used to request that the application be migrated and deployed to the second server, and the second central processing unit instruction set is a basic command set used by the central processing unit of the second server to interact with and execute upper-layer applications; obtaining a first instruction that differs between the first central processing unit instruction set and the second central processing unit instruction set; translating and converting the first instruction to obtain a second instruction, wherein the second instruction is used to simulate instructions in the first central processing unit instruction set; and calling the second instruction when the application is migrated and deployed to the second server and the first instruction needs to be called when the application is running.
[0006] The present application also provides an application migration device for a server, comprising: a first acquisition unit, for acquiring an application deployed on a first server in a server cluster, wherein the first server uses a first central processing unit instruction set, and the first central processing unit instruction set is a basic command set used by the central processing unit of the first server to interact and execute with an upper-layer application; a second acquisition unit, for acquiring a second central processing unit instruction set used by a second server in the server cluster in response to an application migration request of the application, wherein the application migration request is used to request that the application be migrated and deployed to the second server, and the second central processing unit instruction set is a basic command set used by the central processing unit of the second server to interact and execute with an upper-layer application; a third acquisition unit, for acquiring a first instruction that differs between the first central processing unit instruction set and the second central processing unit instruction set; a translation unit, for translating and converting the first instruction to obtain a second instruction, wherein the second instruction is used to simulate an instruction in the first central processing unit instruction set; and a calling unit, for calling the second instruction when the application is migrated and deployed to the second server and the first instruction needs to be called when the application is running.
[0007] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned server application migration methods when executing the computer program.
[0008] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned server application migration methods are implemented.
[0009] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned server application migration methods when executed by a processor.
[0010] Through the present application, an application deployed on a first server in a server cluster is obtained, and the first server uses a first central processing unit instruction set. Further, a second central processing unit instruction set used by a second server in the server cluster is obtained. Then, a first instruction that is different between the first central processing unit instruction set and the second central processing unit instruction set is obtained. The first instruction is then translated into a second instruction, and the second instruction can simulate the instruction in the first central processing unit instruction set. When the application is migrated to the second server and needs to be called, the second instruction translated from the first instruction can be called to achieve the same effect as the first instruction, thereby eliminating the need to recompile the application before application migration. Therefore, the problem of low efficiency of application migration can be solved, thereby improving the efficiency of application migration. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0012] Figure 1 Schematic diagram of an application environment of a method for migrating an application of a server according to an embodiment of the present application;
[0013] Figure 2 is a schematic diagram of a method for migrating an application of a server according to an embodiment of the present application;
[0014] Figure 3 is a schematic diagram of a method for migrating an application of a server according to an embodiment of the present application;
[0015] Figure 4 is a schematic diagram of a method for migrating an application of a server according to an embodiment of the present application;
[0016] Figure 5 is a schematic diagram of a method for migrating an application of a server according to an embodiment of the present application;
[0017] Figure 6 is a schematic diagram of a method for migrating an application of a server according to an embodiment of the present application;
[0018] Figure 7 This is a structural block diagram of an application migration device of a server in an embodiment of the present application. DETAILED DESCRIPTION
[0019] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0020] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0021] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0022] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 This is a hardware structure diagram of a server device of a cloud platform cloud host scheduling method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. The server device may also include a transmission device 106 and an input / output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0023] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the scheduling method of the cloud platform cloud host in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories can be connected to the server device via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0024] Transmission device 106 is used to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by a communication provider of the server device. In one embodiment, transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0025] In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the application migration method of the server depends, the specific application environment architecture or specific hardware architecture is described here.
[0026] The embodiment of the present application provides a method for migrating an application of a server. The method is described in detail in conjunction with the execution process of the method for migrating an application of a server. Figure 2 This is a flow chart of the application migration method of the server implemented according to this application. Figure 2 As shown, the process includes the following steps:
[0027] S202, obtaining an application deployed on a first server in a server cluster, wherein the first server uses a first central processing unit instruction set, which is a basic command set used by a central processing unit of the first server to interact with and execute an upper-layer application;
[0028] S204, in response to an application migration request of the application, obtaining a second central processing unit instruction set used by a second server in the server cluster, wherein the application migration request is used to request migration and deployment of the application to the second server, and the second central processing unit instruction set is a basic command set used by a central processing unit of the second server to interact with and execute an upper-layer application;
[0029] S206, obtaining a first instruction that is different between the first central processing unit instruction set and the second central processing unit instruction set;
[0030] S208, translating the first instruction to obtain a second instruction, wherein the second instruction is used to simulate an instruction in the first central processing unit instruction set;
[0031] S210 , when the application is migrated and deployed to the second server and the first instruction needs to be called when the application is running, calling the second instruction.
[0032] In an optional embodiment, the server cluster may be, but is not limited to, a system consisting of multiple servers connected via a network, and may be, but is not limited to, used to provide cloud computing services with high availability, high performance, and scalability.
[0033] In an optional embodiment, the first server and the second server may be, but are not limited to, any two servers in a server cluster. The first server and the second server may have the same architecture or different architectures.
[0034] In an optional embodiment, the first central processing unit instruction set may be, but is not limited to, an instruction set relied upon by an application program running on a central processing unit (CPU) of the first server.
[0035] In an optional embodiment, an instruction may be, but is not limited to, a basic operation unit for a CPU to perform a specific task, and different CPU architectures or models may use different instructions to implement the same function.
[0036] In an optional embodiment, the second central processing unit instruction set may be, but is not limited to, an instruction set relied upon by an application program running on the central processing unit of the second server.
[0037] In an optional embodiment, the application migration request can be understood as, but not limited to, a business requirement for requesting to migrate an application deployed on a server to another server to achieve the purpose of resource optimization, load balancing, or failover.
[0038] In an optional embodiment, the first instruction may be, but is not limited to, an instruction called when an application program is running on the first server.
[0039] In an optional embodiment, the second instruction may be, but is not limited to, an instruction that needs to be called when the second server runs the migrated application.
[0040] In an optional embodiment, application programs running on a first server in a server cluster are first identified, and these application programs need to call a first central processing unit instruction set of the first server when being executed.
[0041] Furthermore, application migration requests typically originate from system operations or scheduling management, and are used to migrate an application from a first server to a second server to address resource demand changes, server maintenance, or failover situations. Upon receiving the application migration request, the system obtains a second CPU instruction set used by a geothermal server in the server cluster that is different from the first server.
[0042] Then, the system needs to compare the CPU instruction sets of the first server and the second server to identify the first instruction that the application depends on for execution on the first server but does not exist in the CPU instruction set of the second server. The first instruction may be, but is not limited to, an instruction that is not supported by the second server or does not exist in the CPU instruction set of the second server.
[0043] Next, the system translates the first instruction into an instruction that can be found in the CPU instruction set of the second server and has functionally equivalent or similar functionality, thereby ensuring that the migrated application can run normally on the second server.
[0044] Finally, after the migration is completed, when the application runs on the second server, the system will automatically call the second instruction after translation instead of the first instruction in the original first server CPU instruction set, thereby achieving smooth migration of the application.
[0045] It should be noted that by adding an instruction adaptation layer to the cloud computing system, it is possible to effectively cope with the instruction set differences in heterogeneous CPU environments, so that business applications can run on different CPU platforms without recompilation, thereby improving the application migration efficiency and deployment flexibility.
[0046] Through the embodiment of the present application, through the present application, by obtaining an application deployed on a first server in a server cluster, and the first server uses a first central processing unit instruction set. Further, obtain the second central processing unit instruction set used by the second server in the server cluster. Then obtain a first instruction that is different between the first central processing unit instruction set and the second central processing unit instruction set. Then translate the first instruction into a second instruction, and the second instruction can simulate the instruction in the first central processing unit instruction set. When the application is migrated to the second server and needs to call the first instruction, the second instruction translated and converted from the first instruction can be called to achieve the same effect as the first instruction, thereby achieving the technical purpose of not having to recompile the application before application migration, and then achieving the technical effect of improving the efficiency of application migration.
[0047] As an optional solution, translating the first instruction to obtain the second instruction includes:
[0048] According to the instruction function of the first instruction, the first instruction is translated and converted to obtain a second instruction.
[0049] It should be noted that after identifying the difference in the CPU instruction sets between the first and second servers, namely the first instruction, it is first necessary to understand the function performed by the first instruction and then search for an instruction in the second CPU instruction set of the second server that can achieve the same or similar function. By understanding the function of the first instruction, the most suitable replacement instruction can be found in the second CPU instruction set of the second server, achieving equivalent migration of the instruction, avoiding application execution errors and performance losses caused by instruction set differences, and thereby improving the stability of the second server when running the migrated application.
[0050] Through the embodiments of the present application, the first instruction is translated and converted according to the instruction function of the first instruction to obtain the second instruction. By understanding the function of the first instruction, the most suitable replacement instruction can be found in the CPU instruction set of the second server, thereby achieving the technical purpose of achieving equivalent migration of instructions, avoiding application execution errors and performance losses caused by instruction set differences, and further achieving the technical effect of improving the stability of the second server when running the migrated application.
[0051] As an optional solution, translating the first instruction according to the instruction function of the first instruction to obtain the second instruction includes:
[0052] At least one third instruction is determined from the first central processing unit instruction set, wherein the at least one third instruction is used to simulate the instruction function of the first instruction, and the second instruction includes the at least one third instruction.
[0053] In an optional embodiment, the third instruction may be, but is not limited to, an instruction selected by the system from the first central processing unit instruction set during the process of implementing instruction function emulation, and may be capable of individually or in combination of implementing the same or similar function as the first instruction. Due to differences in instruction sets across different CPU architectures, the third instruction may be one or more, and may be, but is not limited to, used in combination to achieve the purpose of functional emulation.
[0054] It should be noted that by selecting the third instruction from the first central processing unit instruction set for combination, the function of the first instruction can be flexibly simulated, which solves the problem of incomplete compatibility of the target CPU architecture instruction set, and makes it possible to migrate the application between business applications on servers with different CPU architectures without large-scale code modification or recompilation, thereby simplifying the migration process and improving migration efficiency.
[0055] To illustrate further, suppose the CPU instruction set of the first server contains the instruction "lift bucket, pour water," and the CPU instruction set of the second server contains the instruction "lift bucket, pour water, water." Combining "lift bucket" and "pour water" yields a function similar to "watering." The first instruction in both the CPU instruction set of the first server and the CPU instruction set of the second server is "watering." If the first instruction "watering" is translated into the second instruction, the second instruction includes "lift bucket, pour water," and the third instruction can be "lift bucket," "pour water," or "lift bucket, pour water."
[0056] Through embodiments of the present application, at least one third instruction is determined from a first central processing unit instruction set, wherein the at least one third instruction is used to simulate the instruction function of the first instruction, and the second instruction includes the at least one third instruction. By selecting and combining the third instructions from the second central processing unit instruction set, the technical purpose of migrating business applications between servers with different CPU architectures is achieved, thereby eliminating the need for large-scale code modifications or recompilation, simplifying the migration process, and thereby achieving the technical effect of improving migration efficiency.
[0057] As an optional solution, translating the first instruction according to the instruction function of the first instruction to obtain the second instruction includes:
[0058] In the case where there is a lack of instructions capable of simulating the instruction function of the first instruction in the first central processing unit instruction set, the first instruction is translated and converted to obtain a fourth instruction, wherein the fourth instruction is used to call an application program interface to execute the instruction function of the first instruction.
[0059] In an optional embodiment, the fourth instruction may be, but is not limited to, an instruction converted by translating the first instruction when the instruction set of the second central processing unit cannot be directly simulated by instructions, and may be, but is not limited to, implementing the function of the first instruction by calling a programming interface (API).
[0060] It should be noted that when performing application equivalent migration, if there is no instruction in the second CPU instruction set that can directly simulate the function of the first instruction, the system will use API calls to replace the execution of the first instruction, and at the same time translate the first instruction into a fourth instruction that can call the API interface. Even if the second CPU instruction set lacks instructions that directly simulate the function of the first instruction, the application can implement the function of the first instruction by calling the API, reducing compatibility issues caused by instruction set differences, and thereby improving the stability of the second server when running the migrated application.
[0061] Through the embodiments of the present application, if the first central processing unit instruction set lacks an instruction that can simulate the instruction function of the first instruction, the first instruction is translated and converted to obtain a fourth instruction, wherein the fourth instruction is used to call an application program interface to execute the instruction function of the first instruction. By translating the first instruction into the fourth instruction, the technical purpose of reducing compatibility issues caused by instruction set differences is achieved, thereby achieving the technical effect of improving the stability of the second server when running the migrated application.
[0062] As an optional solution, translating the first instruction according to the instruction function of the first instruction to obtain the second instruction includes:
[0063] When the instruction function of the first instruction meets the valid function condition, the first instruction is translated to obtain a second instruction;
[0064] As an optional solution, the method further includes:
[0065] In a case where the instruction function of the first instruction does not meet the valid function condition, the first instruction is deleted from the second central processing unit instruction set, or the first instruction is hidden from the second central processing unit instruction set.
[0066] In an optional embodiment, the valid function condition may be, but is not limited to, used to measure the importance or safety of the function executed by the first instruction. When the valid function condition is met, the function generated by calling the first instruction may be considered valid or safe.
[0067] In an optional embodiment, instruction deletion or hiding may include, but is not limited to, when the instruction function of the first instruction does not meet the valid function conditions, the system deletes or hides it from the second CPU instruction set of the second server, which means that the second server will no longer attempt to call the instruction when executing the migrated application.
[0068] It should be noted that if the first instruction meets the functional validity conditions, it is translated normally into the second instruction. However, if the first instruction does not meet the functional validity conditions, the functional effect produced by calling the first instruction will have a minor impact on the migrated application or pose a significant security risk. Therefore, if the first instruction does not meet the functional validity conditions, it is deleted or hidden, reducing the impact of the instruction that does not meet the functional validity conditions on the application migration, thereby improving the efficiency of application migration.
[0069] Through the embodiments of the present application, if the instruction function of the first instruction meets the valid function condition, the first instruction is translated and converted to obtain the second instruction; if the instruction function of the first instruction does not meet the valid function condition, the first instruction is deleted from the second central processing unit instruction set, or the first instruction is hidden from the second central processing unit instruction set. By determining whether the first instruction meets the valid function condition, the technical purpose of reducing the impact of instructions that do not meet the valid function condition on application migration is achieved, thereby achieving the technical effect of improving the efficiency of application migration.
[0070] As an optional solution, when the application is migrated and deployed to the second server and the first instruction needs to be called when the application is running, before calling the second instruction, the method further includes:
[0071] S1-1, in response to an application migration request of an application, shielding the difference between the first central processing unit instruction set and the second central processing unit instruction set for the application;
[0072] S1-2, migrate and deploy the application after masking the differences to the second server.
[0073] In an optional embodiment, instruction difference set shielding can be understood as, but not limited to, creating an abstraction layer for the application through technical means, so that when the application runs on different CPU architectures, it can ignore the differences in the instruction sets of the source architecture and the target architecture, thereby achieving smooth migration of the application across architectures.
[0074] In an optional embodiment, after receiving the application migration request, the system creates an intermediate layer and utilizes instruction virtualization technology to shield the difference between the first central processing unit instruction set and the second central processing unit instruction set for the application program.
[0075] Furthermore, after masking the difference between the first central processing unit instruction set and the second central processing unit instruction set, the system migrates the application from the first server to the second server and deploys it on the target server.
[0076] It should be noted that by shielding the differences between the first central processing unit instruction set and the second central processing unit instruction set for the application, it is achieved that even if the central processing unit architecture of the first server and the central processing unit architecture of the second server are different, the instruction set differences caused by the different architectures can be ignored, thereby ensuring the migration of the application and improving the migration efficiency of the application.
[0077] In the embodiment of the present application, S1-1, in response to an application migration request from an application, the differences between the first central processing unit instruction set and the second central processing unit instruction set are masked for the application; and the masked application is migrated and deployed to the second server. By masking the differences between the first central processing unit instruction set and the second central processing unit instruction set for the application, the technical purpose of ensuring the migration of the application is achieved, regardless of the instruction set differences caused by different architectures, thereby achieving the technical effect of improving the migration efficiency of the application.
[0078] As an optional solution, shielding the application program from the difference between the first central processing unit instruction set and the second central processing unit instruction set includes:
[0079] S2-1, obtaining an instruction intersection between a first central processing unit instruction set and a second central processing unit instruction set;
[0080] S2-2, obtaining an intersection of characteristics between the central processing unit of the first server and the central processing unit of the second server;
[0081] S2-3, building a virtual feature resource pool based on the instruction intersection and the feature intersection, where the virtual feature resource pool includes features and instructions required for application program operation;
[0082] S2-4, through instruction virtualization technology, presents features and instructions in the virtual feature resource pool to the application.
[0083] In an optional embodiment, the instruction intersection may be, but is not limited to, a set of instructions common to both CPU instruction sets, and these instructions may have, but are not limited to, the same or similar functions on different CPU architectures.
[0084] In an optional embodiment, the feature intersection may refer to, but is not limited to, a set of features shared by two CPU architectures, and may include, but is not limited to, features such as hardware virtualization support, multi-threaded processing capabilities, and cache structure. These features may be used for, but are not limited to, the running environment and performance of applications on different CPUs.
[0085] In an optional embodiment, the virtual feature resource pool may be, but is not limited to, a resource pool constructed based on an instruction intersection and a feature intersection, including features and instructions required for application program execution, and providing an abstract execution environment for the application program.
[0086] In an optional embodiment, instruction virtualization technology may be, but is not limited to, a technology for abstracting and converting instructions and features, and may be, but is not limited to, being used to enable an application to access instructions and features functionally equivalent to the source architecture when running on different CPU architectures without requiring code modification or recompilation.
[0087] In an optional embodiment, first, instructions common to the first central processing unit instruction set corresponding to the first server and the central processing unit instruction set corresponding to the second server are identified, and based on the identified common instructions, the instruction intersection between the first central processing unit instruction set and the second central processing unit instruction set is obtained.
[0088] Furthermore, common characteristics of the CPU of the first server and the CPU of the second server are obtained, and based on the obtained common characteristics, the intersection of characteristics between the CPU of the first server and the CPU of the second server is obtained.
[0089] Next, based on the obtained instruction intersection and feature intersection, the system builds a virtual feature resource pool, which contains the features and instructions required for the application to run.
[0090] Finally, through instruction virtualization technology, the system presents applications with instructions and features from a virtual feature resource pool. This means that when applications are running, they are presented with a unified set of instructions and features, unaware of differences in the actual CPU architecture. This allows them to continue running normally even after migration.
[0091] It's important to note that by building a virtual feature resource pool, applications can be provided with functionally equivalent instructions and similar features, even on different CPU architectures. This resolves application compatibility issues caused by differences in instruction sets and features between CPU architectures, and improves the stability of applications running on servers with different CPU architectures. Furthermore, instruction virtualization technology eliminates the need for additional code modifications or recompilation when running applications on CPUs of different architectures, simplifying the migration process and improving migration efficiency.
[0092] Through the embodiments of the present application, the instruction intersection between the first central processing unit instruction set and the second central processing unit instruction set is obtained; the feature intersection between the central processing unit of the first server and the central processing unit of the second server is obtained; based on the instruction intersection and the feature intersection, a virtual feature resource pool is constructed, wherein the virtual feature resource pool contains the features and instructions required for the application to run; and through the instruction virtualization technology, the features and instructions in the virtual feature resource pool are presented to the application. By constructing a virtual feature resource pool and instruction virtualization technology, it is achieved that even on different CPU architectures, functionally equivalent instructions and similar features can be provided to the application, and when the application runs on CPUs of different architectures, there is no need for additional code modification or recompilation, thereby simplifying the technical purpose of the migration process, thereby achieving the technical effect of improving the stability and migration efficiency of the application running in servers with different central processing unit architectures.
[0093] As an optional solution, before obtaining the application deployed on the first server in the server cluster, the method further includes:
[0094] S3-1, obtains multi-dimensional performance data of various CPUs of different architecture types under the same configuration;
[0095] S3-2, using the multi-dimensional performance data, obtaining a processor performance vector for each central processing unit, wherein each element in the processor performance vector represents a performance score of the central processing unit under different evaluation dimensions;
[0096] S3-3, constructing a resource pool of the server cluster based on the processor performance vector, wherein the resource pool is a collection of virtual resources that uniformly manages and schedules the central processing unit resources of all servers in the server cluster.
[0097] In an optional embodiment, the multi-dimensional performance data may be, but is not limited to, a data set obtained by evaluating the CPU under multiple performance test dimensions, and may include, but is not limited to, computing power, memory access speed, parallel processing capability, energy consumption performance, etc., and may be, but is not limited to, used to comprehensively reflect the comprehensive performance of the CPU.
[0098] In an optional embodiment, a processor performance vector may be formed based on, but not limited to, multi-dimensional performance data and may be a data structure used to describe CPU performance characteristics. Each element in the vector represents the CPU's score under a specific performance test dimension. This vector format facilitates performance comparison and analysis, improving performance analysis efficiency.
[0099] In an optional embodiment, it is first necessary to obtain multi-dimensional performance data of CPUs of different architecture types under the same hardware configuration, which can be completed by, but is not limited to, using a variety of different standard performance testing tools to ensure the objectivity of the data.
[0100] Furthermore, based on the acquired multi-dimensional performance data, the system calculates a processor performance vector for each CPU. Each element in the vector represents the CPU's score under a specific performance test dimension, comprehensively characterizing the performance characteristics of the central processing unit.
[0101] Finally, the system builds a virtual resource pool for the server cluster based on the constructed processor performance vectors. This virtual resource pool centrally manages and schedules the CPU resources of all servers in the cluster. By comparing and analyzing performance vectors, it ensures the proper allocation of CPU resources across different architectures to meet the dynamic resource requirements of business applications for equal migration.
[0102] It's important to note that by building a virtual resource pool based on processor performance vectors, the system can accurately assess the performance of CPUs of different architectures, enabling efficient resource scheduling and reducing resource waste. Furthermore, resource scheduling technology based on the virtual resource pool enables equivalent migration of business applications across different CPU architectures. This ensures that applications can access the same computing power even on servers with significantly different architectures, improving the operational stability of applications across different servers.
[0103] Through the embodiments of the present application, multi-dimensional performance data of each central processing unit of different architecture types under the same configuration is obtained; the processor performance vector of each central processing unit is obtained by using the multi-dimensional performance data, wherein each element in the processor performance vector represents the performance score of the central processing unit under different evaluation dimensions; based on the processor performance vector, a resource pool of the server cluster is constructed, wherein the resource pool is a virtual resource collection that uniformly manages and schedules the central processing unit resources of all servers in the server cluster. By constructing a virtual resource pool based on the processor performance vector and a resource scheduling technology for the virtual resource pool, the equivalent migration of business applications between different CPU architecture types is achieved, and the technical purpose of enabling applications to obtain the same computing power even in servers with obvious architectural differences is achieved, thereby achieving the technical effect of improving the running stability of application programs in different servers.
[0104] As an optional solution, a resource pool of a server cluster is constructed based on the processor performance vector, including at least one of the following:
[0105] S4-1, calculating the first norm and second norm of the processor performance vector to quantify the overall computing power of the CPU, where the first norm is the sum of the absolute values of all elements in the processor performance vector, and the second norm is the square root of the sum of the squares of all elements in the processor performance vector;
[0106] S4-2, calculating the distance between at least two processor performance vectors, and obtaining at least two central processing units that meet the similar computing power condition;
[0107] S4-3, classify each central processing unit according to the computing power characteristics corresponding to the processor performance vector.
[0108] In an optional embodiment, the first norm may be, but is not limited to, one of the common methods for measuring the size of a vector, may be, but is not limited to, the sum of the absolute values of all elements in the vector, and may be, but is not limited to, used to quantify the sum of the weighted computing power of the central processing unit.
[0109] In an optional embodiment, the second norm may be, but is not limited to, the square root of the sum of the squares of all elements in the vector.
[0110] In an optional embodiment, the computing power similarity condition may include, but is not limited to, when the computing power difference between central processing units of different architectures is within a certain threshold, it can be considered that these central processing units of different architectures have similar computing power.
[0111] In an optional embodiment, the computing power characteristics may refer to, but are not limited to, the performance of the central processing unit in different performance dimensions such as computing speed, memory bandwidth, write and write rates, etc., and may be used to describe, but are not limited to, the comprehensive performance of the central processing unit.
[0112] In an optional embodiment, the first norm and the second norm of the processor performance vector are first calculated to quantify the overall computing power of each central processing unit.
[0113] Furthermore, by calculating the distance between at least two processor performance vectors, the distance calculation may be performed using, but is not limited to, methods such as Euclidean distance and Manhattan distance to obtain central processors with similar computing power.
[0114] Finally, the CPUs are classified according to the computing power characteristics corresponding to the processor performance vectors to facilitate the management and scheduling of CPUs of the same type in the resource pool.
[0115] It should be noted that by calculating the first and second norms, not only can the overall computing power of each CPU be quantified, but its comprehensive performance in multiple dimensions can also be evaluated. Based on the calculation of computing power similarity, the system can identify CPUs with similar performance. Since CPUs with similar computing power can be treated as a resource group, they can be uniformly managed and scheduled to improve resource utilization. Classification based on computing power characteristics further refines the management of CPUs in the resource pool, allowing the system to select the most appropriate CPU resources for allocation based on specific task requirements, achieving efficient resource utilization.
[0116] Through the embodiments of the present application, the first norm and second norm of the processor performance vector are calculated to quantify the overall computing power of the central processing unit (CPU), where the first norm is the sum of the absolute values of all elements in the processor performance vector, and the second norm is the square root of the sum of the squares of all elements in the processor performance vector. The distance between at least two processor performance vectors is calculated to obtain at least two CPUs that meet the computing power similarity condition. The CPUs are classified according to the computing power characteristics corresponding to the processor performance vectors. By calculating the first norm and the second norm, the technical goal of being able to quantify the overall computing power of each CPU is achieved, thereby realizing the technical effect of efficient resource utilization.
[0117] As an optional solution, after constructing a resource pool of the server cluster based on the processor performance vector, the method further includes:
[0118] S5-1, configuring a first amount of central processing unit resources for a business application running on a first server;
[0119] S5-2, calculating the CPU computing power value of the first server under the first number of CPU resource configurations through the resource pool;
[0120] S5-3, obtaining a second amount of central processing unit resources that need to be configured for the business application on the second server according to the central processing unit computing power value;
[0121] S5-4, on the second server, configure a second amount of CPU resources for the business application.
[0122] In an optional embodiment, the CPU resources may include, but are not limited to, the number of CPU cores and frequency modulation conditions.
[0123] In an alternative embodiment, a CPU core may be, but is not limited to, an independent processing unit within a central processing unit (CPU) capable of executing multiple tasks or threads simultaneously. Each core contains complete computing resources, such as an arithmetic logic unit (ALU), a control unit (CU), registers, and cache, and can independently execute instructions and process data.
[0124] In an optional embodiment, the frequency regulation condition may refer to, but is not limited to, a dynamic frequency adjustment mechanism of a central processing unit, may include, but is not limited to, dynamic voltage adjustment and frequency adjustment, may include, but is not limited to, parameters such as performance status, energy efficiency status, and frequency step.
[0125] In an optional embodiment, a first amount of central processing unit resources is first configured for a system process running on a first server in a server cluster.
[0126] Furthermore, the CPU computing power value of the first server under the first number of CPU resource configurations is calculated through the resource pool and the CPU performance vector of the server.
[0127] Next, based on the calculated CPU computing power value, a second number of CPU resources required to be configured on the second server to provide equivalent processing power for the same system process is further calculated.
[0128] Finally, based on the calculated second number of central processing unit resources required to provide equivalent processing capability for the same system process on the second server, a second number of central processing unit resources is configured for the system process on the second server.
[0129] It's important to note that by allocating equivalent amounts of CPU resources to system processes, the system ensures that the same process running on different servers has similar processing speed and efficiency. Furthermore, the construction of resource pools and the calculation of computing power provide tools for quantifying the processing capabilities of different servers. This allows the system to dynamically adjust the amount of CPU resources allocated based on actual needs, achieving consistent performance and efficient resource utilization across servers when processing the same system process.
[0130] Through the embodiments of the present application, a first number of CPU resources is configured for a business application running on a first server; the CPU computing power value of the first server under the first number of CPU resources is calculated through a resource pool; based on the CPU computing power value, a second number of CPU resources that needs to be configured for the business application on a second server is obtained; and the second number of CPU resources is configured for the business application on the second server. By configuring an equivalent number of CPU resources for a system process, the technical purpose of enabling the system to dynamically adjust the number of CPU resources configured according to actual needs is achieved, thereby achieving the technical effect of performance consistency and efficient resource utilization when different servers process the same system process.
[0131] As an optional solution, after translating the first instruction to obtain the second instruction, the method further includes:
[0132] Apply the second instruction to the hardware simulation environment of the second server, perform a simulation test, and obtain a simulation test result.
[0133] In an optional embodiment, the hardware simulation environment may be, but is not limited to, a virtual environment built on the second server that simulates the CPU architecture characteristics of the first server. Through the hardware simulation environment, the execution effect of application instructions on the target architecture can be tested to evaluate the compatibility and performance impact of the instructions.
[0134] In an optional embodiment, the simulation test results may include, but are not limited to, test data and conclusions on instruction compatibility, security, performance impact, etc. obtained after testing specific application instructions in a hardware simulation environment.
[0135] It should be noted that during the application equivalent migration process, the system will translate and convert the first instruction identified on the first server to obtain the second instruction, and apply it to the hardware simulation environment of the second server. This can be used, but is not limited to, to test the compatibility and operating effect of the instruction on the CPU architecture of the second server. After the test is completed, the operating results of the second instruction in the hardware simulation environment of the second server are obtained as test results. The test results include information on the compatibility, execution efficiency, resource usage, etc. of the instruction, which improves the efficiency of obtaining the operating results of the second instruction on the application of the second server after the application is migrated to the second server.
[0136] Through the embodiments of the present application, the second instruction is applied to the hardware simulation environment of the second server, a simulation test is performed, and a simulation test result is obtained. Through the instruction simulation test in the hardware simulation environment, the technical purpose of being able to evaluate the compatibility of the second instruction on the target CPU architecture is achieved, thereby achieving the technical effect of improving the efficiency of obtaining the running results of the second instruction on the application of the second server after the application is migrated to the second server.
[0137] As an optional solution, the second instruction is applied to the hardware simulation environment of the second server to perform a simulation test to obtain simulation test results, including:
[0138] Apply the second instruction to a hardware simulation environment, simulate and test the behavior of the second instruction under boundary conditions, and obtain a simulation test result.
[0139] In an optional embodiment, the boundary conditions may include, but are not limited to, data overflow, limit value input, abnormal interruption, and other conditions.
[0140] It's important to note that through instruction simulation testing under boundary conditions, the system can assess the compatibility and stability of instructions on the target CPU architecture, promptly identifying and addressing potential issues under boundary conditions. Furthermore, boundary condition testing not only focuses on instruction compatibility and stability, but also assesses the impact of the second instruction on the architectural performance of the second server's CPU, thereby improving the stability of the second server when executing the second instruction.
[0141] Through the embodiments of the present application, instruction simulation testing under boundary conditions is performed, thereby achieving the technical purpose of evaluating the impact of the second instruction on the architectural performance of the central processing unit of the second server, thereby achieving the technical effect of improving the stability of the second server when executing the second instruction.
[0142] As an optional solution, when the application is migrated and deployed to the second server and the first instruction needs to be called when the application is running, during the process of calling the second instruction, the method further includes:
[0143] When an abnormal operation event triggered during the operation of the application is obtained, an alarm message is displayed, wherein the alarm message is used to prompt that the application operation is abnormal and the calling status of the second instruction.
[0144] In an optional embodiment, the abnormal operation event may be, but is not limited to, operation failure or performance abnormality caused by various error reasons during the operation of the application.
[0145] In an optional embodiment, the alarm information may be, but is not limited to, a warning message for prompting an abnormal application running state and a specific reason, and may be, but is not limited to, a warning message for prompting an abnormal application running state and a calling state of a second instruction.
[0146] It's important to note that during application execution, the system captures abnormal operation events triggered by the application in real time. Once an abnormal event is detected, an alert is immediately displayed, notifying the application of the abnormality and reporting the status of the second instruction related to the abnormal event. This provides timely feedback on the application abnormality and the specific abnormality, thereby improving the efficiency of application abnormality repair.
[0147] Through the embodiments of the present application, when an abnormal operation event is obtained, a warning message is displayed. The warning message is used to indicate the abnormal operation of the application and the calling status of the second instruction. By promptly displaying the warning message after the abnormal operation of the application, the technical purpose of providing feedback on the abnormality of the application and the specific abnormality is achieved, thereby achieving the technical effect of improving the efficiency of repairing application abnormalities.
[0148] As an optional solution, after displaying the warning information, the method further includes:
[0149] In response to the application rollback request, data of the application is restored to an original state on the first server.
[0150] In an optional embodiment, the application rollback request may be, but is not limited to, restoring the application state to the original state on the first server.
[0151] It should be noted that after receiving an abnormal operation event triggered during the operation of the application and displaying an alarm message, the system will roll back the application to its original state by issuing an application rollback request, and restore the application data to its original state on the first server, preventing the occurrence of operation errors from causing security risks to the application software, and improving the security of the application during operation after migration.
[0152] Through the embodiments of the present application, in response to an application rollback request, the application's data is restored to its original state on the first server. By rolling back the application and restoring the data to its original state on the first server, the technical purpose of preventing runtime errors from causing security risks to the application software is achieved, thereby achieving the technical effect of improving the security of the application during operation after migration.
[0153] As an optional solution, during the process of calling the second instruction, the method further includes:
[0154] S6-1, obtain real-time behavior information of the application;
[0155] S6-2, obtaining historical behavior information of the application on the first server;
[0156] S6-3, verifying the second instruction by combining the historical behavior information and the real-time behavior information.
[0157] In an optional embodiment, the historical behavior information may include, but is not limited to, the real-time operating status and performance data of the business application in the environment of the second server, and may include, but is not limited to, CPU occupancy, memory usage, instruction call frequency and duration, etc.
[0158] In an optional embodiment, historical behavior information may refer to, but is not limited to, the operating status and performance data of the business application in the environment of the first server, and may include, but is not limited to, information such as CPU occupancy, memory usage, and instruction calls during normal operation before migration.
[0159] It should be noted that the system first obtains the real-time behavior information of the business application on the target server, including CPU usage, memory usage, instruction call frequency and duration, etc. Subsequently, the system obtains the historical behavior information of the business application on the source server as a standard for verifying the consistency and compatibility of instruction behavior. Finally, the system compares and analyzes the historical behavior information with the real-time behavior information, verifies the second instruction, and ensures the correctness and behavioral consistency of the instruction on the target architecture. By combining historical and real-time behavior information for instruction verification, the system can evaluate the compatibility and behavioral consistency of the instruction on the CPU architecture of the second server, promptly discover and handle potential performance degradation or abnormal behavior, and improve the stability of the application running between servers with different architectures.
[0160] Through the embodiments of the present application, real-time behavior information of the application is obtained; historical behavior information of the application on the first server is obtained; and the second instruction is verified by combining the historical behavior information and the real-time behavior information. By combining the historical and real-time behavior information to verify the instruction, the technical purpose of being able to evaluate the compatibility and behavioral consistency of the instruction on the CPU architecture of the second server is achieved, and potential performance degradation or abnormal behavior is promptly discovered and handled, thereby achieving the technical effect of improving the stability of the application running between servers with different architectures.
[0161] As an optional solution, translating the first instruction to obtain the second instruction includes:
[0162] Dynamic binary translation is performed on the first instruction to obtain a second instruction.
[0163] In an optional embodiment, dynamic binary translation may be, but is not limited to, a technology for converting binary code of a CPU architecture of a first server into binary code of a CPU architecture of a second server when a program is running.
[0164] It's important to note that dynamic binary translation technology not only resolves instruction compatibility issues across different CPU architectures but also achieves equivalent instruction functionality and performance. This allows business applications to run smoothly on the target server without requiring code rewriting or compilation, significantly improving migration efficiency and operational success rates.
[0165] In addition, dynamic binary translation technology can also handle instruction compatibility issues between multiple different architectures, providing flexible migration support for applications and reducing operation and maintenance costs and business interruption risks caused by architectural differences.
[0166] Through the embodiment of the present application, a dynamic binary translation is performed on the first instruction to obtain the second instruction. Through the dynamic binary translation technology, the technical goal of enabling the application to run smoothly on the second server without code rewriting or compilation is achieved, thereby achieving the technical effect of improving migration efficiency and operation success rate.
[0167] As an optional solution, the above-mentioned server application migration method is applied to the application migration scenario of heterogeneous CPU servers.
[0168] In an optional embodiment, this embodiment proposes a cross-core scheduling computing power migration method. To address the problem that business applications need to be recompiled based on different instruction sets on different CPU chip servers, this embodiment uses instruction passthrough and simulation to select CPU instructions with the same function for business applications on different CPU platforms, so that business applications can be switched to different CPU platforms with the same CPU computing power without recompilation.
[0169] At the same time, this embodiment realizes horizontally comparable CPU computing power data based on the CPU computing power vector database, and flexibly adjusts the number of CPU cores allocated to the business application system when running on different CPU platforms based on this data, thereby realizing equivalent migration of the business application system.
[0170] It should be noted that the basic idea of this embodiment is as follows:
[0171] 1) Instruction passthrough and simulation method for heterogeneous processor application migration: This method builds a CPU feature resource pool based on the intersection of CPU features to implement instruction passthrough. Instruction translation-based online migration captures CPU instructions supported by the source host but not by the target host, translates and converts the virtual machine code, and implements instruction simulation.
[0172] 2) Build a standard computing power measurement method for heterogeneous processors: Use standard evaluation tools to calculate and obtain real multi-dimensional performance data of mainstream domestic and foreign CPUs with equivalent memory, hard disk, and network configurations, and form a vector database;
[0173] 3) Equivalent computing power elastic scaling method for heterogeneous processors. Based on a standard computing power vector database, the actual CPU computing power obtained by business application systems before and after migration is consistent.
[0174] In an optional embodiment, this embodiment proposes a method and device for equivalent migration of applications across heterogeneous CPU servers, adding an instruction adaptation layer compatible with multiple CPU architectures to the cloud computing system. When a business application system migrates between different CPU platforms, the instruction adaptation layer can transparently call the same CPU instructions, or call instructions with similar functions between different CPU architectures, so that upper-level user services can be migrated across CPU platforms without recompilation. At the same time, based on the standard CPU computing power vector database, the number of CPU cores allocated to the application system before and after migration can be flexibly adjusted to achieve equivalent migration of the application system.
[0175] To further illustrate, the overall plan is as follows Figure 3 As shown, CPU (central processing unit) platform A uses a standard CPU computing power vector database to perform vector evaluation to obtain that 4 CPUs are required to run the application. After the application is migrated to CPU platform B through a migration pipeline, 2 CPUs are required to run the application through the standard CPU computing power vector database. When migrating through the migration pipeline, there are two processes: instruction inheritance and instruction simulation. There is also a CPU feature resource pool, which contains instruction set 1, instruction set 2, instruction set 3, instruction set 4, and instruction set 5.
[0176] It's important to note that different CPU models have significant differences in instruction sets. Even for the same feature, different vendors may design and implement it differently. For example, hardware virtualization support: the x86 architecture implements technologies like VT and SVM, while the ARM architecture implements technologies like VE and VHE. These expose different CPU instruction sets, leading to instruction access anomalies after migrating user business systems across CPUs.
[0177] To solve this problem, this embodiment proposes an application migration method between heterogeneous processors. First, this embodiment builds a CPU feature resource pool based on the intersection of CPU features. Through instruction virtualization technologies such as CPUID, the application system is presented with the same CPU features, shielding the differences between different CPUs and realizing online migration of application systems.
[0178] Secondly, this embodiment proposes an online migration method based on instruction translation. After the hot migration completes the copy of the application system memory status and before the virtual machine is pulled up on the target end, the application system code is translated and converted, all code segments are identified from the application system memory, and CPU instructions supported by the source host but not supported by the target host are captured, and instruction translation and conversion are performed online.
[0179] To illustrate further, the optional Figure 4 As shown, there are 4 applications, and each application has 4 CPUs (central processing units). Through instruction inheritance and instruction simulation, the application can achieve online translation and conversion between different instruction sets, such as instruction set 1, instruction set 2, instruction set 3, instruction set 4, and instruction set 5.
[0180] In an optional embodiment, this embodiment proposes a standard computing power measurement solution for heterogeneous processors, which solves the following problems:
[0181] Because processors of different architectures have varying computing power, even applications using the same resource package specifications can experience performance differences when running in heterogeneous environments. The primary challenge facing the One Cloud, Multi-Core system is the heterogeneity of CPUs. ARM and x86 architecture processors from various vendors differ in instruction sets, core counts, and production processes, leading to performance differences.
[0182] This embodiment establishes a standard computing power vector database for heterogeneous processors. Using standard evaluation tools such as CoreMark, Stream, 7-Zip, GeekBench, Linpack and SPEC CPU, the real multi-dimensional performance data of mainstream CPUs at home and abroad such as Intel, AMD, Ampere, Feiteng, Kunpeng, and Haiguang under the same configuration of memory, hard disk, and network are calculated to form a CPU performance vector, in which each element of the vector represents the performance score of the CPU under a certain standard evaluation tool. Based on this vector database, a series of innovative work can be carried out, such as evaluating the computing power value of the CPU by calculating vector length calculation methods such as L1 and L2 norms, calculating the computing power similarity of different CPU models by search methods such as k-NN, and classifying different CPU models based on computing power characteristics by classification methods such as SVM.
[0183] To illustrate further, the optional Figure 5 As shown, CPU (central processing unit) model A, CPU model B, CPU model C, CPU model D, and CPU model E are analyzed and constructed using standard evaluation tool 1, standard evaluation tool 2, standard evaluation tool 3, standard evaluation tool 4, standard evaluation tool 5, and standard evaluation tool 6 to construct a standard CPU vector database, and the standard CPU vector database includes computing power vector a, computing power vector b, computing power vector c, computing power vector d, and computing power vector e.
[0184] It should be noted that due to differences in CPU technology, manufacturing processes, and design, there are significant performance gaps between different manufacturers and models of CPUs. When a business application is migrated from a higher-performance Type A CPU platform to a lower-performance Type B CPU platform, its actual performance may decline significantly, even if the application maintains the same CPU resources.
[0185] To address this issue, this embodiment proposes CPU equivalent computing power elastic scaling technology for heterogeneous processors. Based on a standard computing power vector database, when a business application is migrated from a Type A CPU platform to a Type B CPU platform, the instruction adaptation layer first calculates the computing power data required by the business application based on the Type A CPU resources actually occupied by the business application (number of cores, frequency modulation, etc.). It then calculates the Type B CPU resources required to obtain this computing power data, thereby achieving equivalent CPU resource configuration for the business application.
[0186] To illustrate further, the optional Figure 6 As shown in the figure, the application requires 4 CPUs when running on CPU (central processing unit) platform A. After equivalent computing power conversion, it is obtained that the application requires 2 CPUs when running on CPU platform B. After the application is migrated to CPU platform B through the migration pipeline, 2 CPUs are allocated to the application.
[0187] In an optional embodiment, this embodiment adds an instruction adaptation layer compatible with multiple CPU architectures to the cloud computing system. When business application systems migrate between different CPU platforms, the instruction adaptation layer can transparently call the same CPU instructions as well as instructions with similar functions between different CPU architectures, allowing upper-level user services to migrate across CPU platforms without recompilation. Based on a standard CPU computing power vector database, the number of CPU cores allocated to the application system before and after migration can be flexibly adjusted to achieve equivalent migration of application systems.
[0188] Through the embodiments of the present application, an instruction adaptation layer compatible with multiple CPU architectures is added to the cloud computing system. When business applications migrate between different CPU platforms, the instruction adaptation layer can transparently call the same CPU instructions, as well as call instructions with similar functions between different CPU architectures, allowing upper-level user services to migrate across CPU platforms without recompilation.
[0189] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0190] This embodiment also provides a server application migration device for implementing the above-mentioned embodiments and preferred implementations. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0191] Figure 7 This is a structural block diagram of a scheduling device for a cloud platform cloud host according to an embodiment of the present application, such as Figure 7 As shown, the device includes:
[0192] A first acquiring unit 702 is configured to acquire an application deployed on a first server in the server cluster, wherein the first server uses a first central processing unit instruction set, which is a basic command set used by a central processing unit of the first server to interact with and execute an upper-layer application;
[0193] A second acquiring unit 704 is configured to acquire, in response to an application migration request of the application, a second central processing unit instruction set used by a second server in the server cluster, wherein the application migration request is used to request migration and deployment of the application to the second server, and the second central processing unit instruction set is a basic command set used by a central processing unit of the second server to interact with and execute an upper-layer application;
[0194] A third acquiring unit 706 is configured to acquire a first instruction that is different between the first CPU instruction set and the second CPU instruction set;
[0195] a translation unit 708 for translating the first instruction to obtain a second instruction, wherein the second instruction is used to simulate an instruction in the first central processing unit instruction set;
[0196] The calling unit 710 is configured to call the second instruction when the application is migrated and deployed to the second server and the first instruction needs to be called when the application is running.
[0197] As an optional solution, the translation unit 708 includes: a first translation module, configured to translate the first instruction according to the instruction function of the first instruction to obtain a second instruction.
[0198] As an optional solution, the first translation module includes: a determination submodule, used to determine at least one third instruction from the first central processing unit instruction set, wherein the at least one third instruction is used to simulate the instruction function of the first instruction, and the second instruction includes at least one third instruction.
[0199] As an optional solution, the first translation module includes: a first translation sub-module, which is used to translate the first instruction to obtain a fourth instruction when there is a lack of instructions in the first central processing unit instruction set that can simulate the instruction function of the first instruction, wherein the fourth instruction is used to call an application program interface to execute the instruction function of the first instruction.
[0200] As an optional solution, the first translation module includes: a second translation sub-module, which is used to translate the first instruction to obtain a second instruction when the instruction function of the first instruction meets the valid function condition; and a deletion sub-module, which is used to delete the first instruction from the second central processing unit instruction set or hide the first instruction from the second central processing unit instruction set when the instruction function of the first instruction does not meet the valid function condition.
[0201] As an optional solution, the calling unit 710 includes: a shielding module, which is used to respond to the application migration request of the application and shield the differences between the first central processing unit instruction set and the second central processing unit instruction set for the application; and a migration module, which is used to migrate and deploy the application after shielding the differences to the second server.
[0202] As an optional solution, the shielding module includes: a first acquisition submodule, used to obtain the instruction intersection between the first central processing unit instruction set and the second central processing unit instruction set; a second acquisition submodule, used to obtain the feature intersection between the central processing unit of the first server and the central processing unit of the second server; a construction submodule, used to construct a virtual feature resource pool based on the instruction intersection and the feature intersection, wherein the virtual feature resource pool contains the features and instructions required for the application to run; and a presentation submodule, used to present the features and instructions in the virtual feature resource pool to the application through instruction virtualization technology.
[0203] As an optional solution, the first acquisition unit 702 includes: a first acquisition module, used to obtain multi-dimensional performance data of each central processing unit of different architecture types under the same configuration; a second acquisition module, used to use the multi-dimensional performance data to obtain the processor performance vector of each central processing unit, wherein each element in the processor performance vector represents the performance score of the central processing unit under different evaluation dimensions; a construction module, used to construct a resource pool of the server cluster based on the processor performance vector, wherein the resource pool is a virtual resource collection that uniformly manages and schedules the central processing unit resources of all servers in the server cluster.
[0204] As an optional solution, the construction module includes: a first calculation submodule, which is used to calculate the first norm and second norm of the processor performance vector to quantify the overall computing power of the central processing unit, wherein the first norm is the sum of the absolute values of all elements in the processor performance vector, and the second norm is the square root of the sum of the squares of all elements in the processor performance vector; a second calculation submodule, which is used to calculate the distance between at least two processor performance vectors to obtain at least two central processing units that meet the computing power similarity conditions; and a classification submodule, which is used to classify each central processing unit according to the computing power characteristics corresponding to the processor performance vector.
[0205] As an optional solution, the construction module includes: a first configuration sub-module, used to configure a first number of central processing unit resources for the business application running on the first server; a third calculation sub-module, used to calculate the central processing unit computing power value of the first server under the first number of central processing unit resources configuration through the resource pool; a third acquisition sub-module, used to obtain the second number of central processing unit resources that need to be configured for the business application on the second server based on the central processing unit computing power value; and a second configuration sub-module, used to configure the second number of central processing unit resources for the business application on the second server.
[0206] As an optional solution, the translation unit 708 includes: a testing module, which is used to apply the second instruction to the hardware simulation environment of the second server, perform simulation testing, and obtain simulation test results.
[0207] As an optional solution, the test module includes: a test sub-module, which is used to apply the second instruction to a hardware simulation environment, simulate and test the behavior of the second instruction under boundary conditions, and obtain a simulation test result.
[0208] As an optional solution, the calling unit 710 includes: a display module for displaying alarm information when an abnormal operation event triggered during the operation of the application is obtained, wherein the alarm information is used to prompt that an abnormality has occurred in the operation of the application and the calling status of the second instruction.
[0209] As an optional solution, the display module includes: a recovery submodule, configured to restore the data of the application to the original state on the first server in response to an application rollback request.
[0210] As an optional solution, the calling unit 710 includes: a third acquisition module for obtaining real-time behavior information of the application; a fourth acquisition module for obtaining historical behavior information of the application on the first server; and a verification module for verifying the second instruction in combination with the historical behavior information and the real-time behavior information.
[0211] As an optional solution, the translation unit 708 includes: a second translation module, configured to perform dynamic binary translation on the first instruction to obtain a second instruction.
[0212] For the description of the features in the embodiment corresponding to the application migration device of the server, please refer to the relevant description of the embodiment corresponding to the application migration method of the server, which will not be repeated here.
[0213] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps of any of the above-mentioned server application migration method embodiments.
[0214] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned server application migration method embodiments when running.
[0215] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0216] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned server application migration method embodiments are implemented.
[0217] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps in any of the above-mentioned server application migration method embodiments.
[0218] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0219] The above is a detailed introduction to the application migration method and device for a server provided by this application. This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the scope of protection of the claims of this application.
Claims
1. A method for migrating an application of a server, characterized in that: include: Obtaining an application deployed on a first server in a server cluster, wherein the first server uses a first central processing unit instruction set, which is a basic command set used by a central processing unit of the first server to interact with and execute an upper-layer application; In response to an application migration request of the application, obtaining a second central processing unit instruction set used by a second server in the server cluster, wherein the application migration request is used to request migration and deployment of the application to the second server, and the second central processing unit instruction set is a basic command set used by a central processing unit of the second server to interact with and execute an upper-layer application; Acquire a first instruction that is different between the first central processing unit instruction set and the second central processing unit instruction set; The first instruction is translated and converted by the instruction adaptation layer according to the instruction function of the first instruction to obtain a second instruction, wherein the second instruction is used to simulate an instruction in the instruction set of the first central processing unit; when the application is migrated and deployed to the second server and the first instruction is required to be called during the operation of the application, the second instruction is called; Translating the first instruction according to the instruction function of the first instruction to obtain a second instruction includes: determining at least one third instruction from the first central processing unit instruction set, wherein the at least one third instruction is used to simulate an instruction function of the first instruction, and the second instruction includes the at least one third instruction; In a case where the at least one third instruction is a plurality of third instructions, the plurality of third instructions are combined to simulate the first instruction.
2. The method according to claim 1, characterized in that The translating and converting the first instruction according to the instruction function of the first instruction to obtain the second instruction includes: In the absence of an instruction in the first central processing unit instruction set that can simulate the instruction function of the first instruction, the first instruction is translated and converted to obtain a fourth instruction, wherein the fourth instruction is used to call an application program interface to execute the instruction function of the first instruction.
3. The method according to claim 1, characterized in that The translating and converting the first instruction according to the instruction function of the first instruction to obtain the second instruction includes: translating and converting the first instruction to obtain the second instruction when the instruction function of the first instruction meets a valid function condition; The method further includes: if the instruction function of the first instruction does not meet the valid function condition, deleting the first instruction from the second central processing unit instruction set, or hiding the first instruction from the second central processing unit instruction set.
4. The method according to claim 1, wherein When the application is migrated and deployed to the second server, and the first instruction needs to be called when the application is running, before calling the second instruction, the method further includes: In response to an application migration request of the application, shielding the difference between the first central processing unit instruction set and the second central processing unit instruction set for the application; The application program after masking the differences is migrated and deployed to the second server.
5. The method according to claim 4, characterized in that The step of shielding the application program from differences between the first central processing unit instruction set and the second central processing unit instruction set includes: Obtaining an instruction intersection between the first central processing unit instruction set and the second central processing unit instruction set; Obtaining an intersection of characteristics between the central processing unit of the first server and the central processing unit of the second server; Building a virtual feature resource pool based on the instruction intersection and the feature intersection, wherein the virtual feature resource pool includes features and instructions required for running the application; The characteristics and instructions in the virtual characteristic resource pool are presented to the application program through instruction virtualization technology.
6. The method according to claim 1, characterized in that Before obtaining the application deployed on the first server in the server cluster, the method further includes: Obtain multi-dimensional performance data for various CPUs of different architecture types under the same configuration; Utilizing the multi-dimensional performance data, obtaining a processor performance vector of each central processing unit, wherein each element in the processor performance vector represents a performance score of the central processing unit under different evaluation dimensions; A resource pool of the server cluster is constructed according to the processor performance vector, wherein the resource pool is a virtual resource collection for uniformly managing and scheduling central processing unit resources of all servers in the server cluster.
7. The method according to claim 6, characterized in that The constructing of the resource pool of the server cluster according to the processor performance vector includes at least one of the following: Calculating a first norm and a second norm of the processor performance vector to quantify the overall computing power of the central processing unit, wherein the first norm is the sum of the absolute values of all elements in the processor performance vector, and the second norm is the square root of the sum of the squares of all elements in the processor performance vector; Calculating the distance between at least two of the processor performance vectors to obtain at least two of the central processing units that meet the computing power similarity condition; The central processing units are classified according to computing power characteristics corresponding to the processor performance vectors.
8. The method according to claim 6, characterized in that After constructing the resource pool of the server cluster according to the processor performance vector, the method further includes: Allocating a first amount of central processing unit resources for the business application running on the first server; Calculating, by means of the resource pool, a CPU computing power value of the first server under the configuration of the first number of CPU resources; Obtaining, based on the CPU computing power value, a second amount of CPU resources that need to be configured on the second server for the business application; On the second server, the second amount of central processing unit resources is configured for the business application.
9. The method according to claim 1, characterized in that After translating the first instruction according to the instruction function of the first instruction to obtain a second instruction, the method further includes: Apply the second instruction to the hardware simulation environment of the second server, perform a simulation test, and obtain a simulation test result.
10. The method according to claim 9, characterized in that The step of applying the second instruction to the hardware simulation environment of the second server to perform a simulation test and obtain a simulation test result includes: Applying the second instruction to the hardware simulation environment, simulating and testing the behavior of the second instruction under boundary conditions, and obtaining a simulation test result.
11. The method according to claim 1, wherein When the application is migrated and deployed to the second server, and the first instruction needs to be called when the application is running, during the process of calling the second instruction, the method further includes: When an abnormal operation event triggered during the operation of the application is obtained, an alarm message is displayed, wherein the alarm message is used to prompt that the operation of the application is abnormal and the calling status of the second instruction.
12. The method according to claim 11, characterized in that After displaying the warning information, the method further includes: In response to an application rollback request, the data of the application is restored to an original state on the first server.
13. The method according to any one of claims 1 to 12, characterized in that In the process of calling the second instruction, the method further includes: Obtaining real-time behavior information of the application; Obtaining historical behavior information of the application on the first server; The second instruction is verified in combination with the historical behavior information and the real-time behavior information.
14. The method according to any one of claims 1 to 12, characterized in that The step of translating the first instruction according to the instruction function of the first instruction to obtain the second instruction includes: Dynamic binary translation is performed on the first instruction to obtain the second instruction.
15. An application migration device for a server, characterized in that: include: a first acquiring unit, configured to acquire an application deployed on a first server in the server cluster, wherein the first server uses a first central processing unit instruction set, which is a basic command set used by a central processing unit of the first server to interact with and execute an upper-layer application; a second acquiring unit, configured to acquire, in response to an application migration request of the application, a second central processing unit instruction set used by a second server in the server cluster, wherein the application migration request is used to request migration and deployment of the application to the second server, and the second central processing unit instruction set is a basic command set used by a central processing unit of the second server to interact with and execute an upper-layer application; a third acquiring unit, configured to acquire a first instruction that is different from the first central processing unit instruction set and the second central processing unit instruction set; a translation unit, configured to translate the first instruction through an instruction adaptation layer according to an instruction function of the first instruction to obtain a second instruction, wherein the second instruction is configured to simulate an instruction in an instruction set of the first central processing unit; a calling unit, configured to call the second instruction when the application is migrated and deployed to the second server and the first instruction needs to be called when the application is running; The device is further used for: determining at least one third instruction from the first central processing unit instruction set, wherein the at least one third instruction is used to simulate an instruction function of the first instruction, and the second instruction includes the at least one third instruction; In a case where the at least one third instruction is a plurality of third instructions, the plurality of third instructions are combined to simulate the first instruction.
16. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the server application migration method according to any one of claims 1 to 14 when executing the computer program.
17. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the server application migration method according to any one of claims 1 to 14.
18. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the server application migration method according to any one of claims 1 to 14 are implemented.
Citation Information
Patent Citations
C / C++application migration tool from SPARC platform to K-UX platform
CN104536798A
Heterogeneous method of virtualization resource pool, readable storage medium and virtualization platform
CN113553143A
Homemade heterogeneous computing power cluster-oriented job scheduling method and system
CN118519766A
Server application architecture migration method and device and storage medium
CN119645610A