Method for adjusting CPU configuration based on server migration and related device

By calculating the performance evaluation score ratio before and after the server migration, and adjusting the CPU configuration of the server after the migration, the performance problems caused by the differences in CPU architecture after the server migration are solved, and the server performance adaptation and optimization are achieved.

CN119847747APending Publication Date: 2025-04-18太保科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411923148.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-18

Smart Images

  • Figure CN119847747A_ABST
    Figure CN119847747A_ABST
Patent Text Reader

Abstract

The invention discloses a CPU configuration adjusting method based on server migration and a related device. In the method, a first performance evaluation score of a to-be-migrated server in a target scene is acquired, and a second performance evaluation score of a migrated server in the target scene is acquired; calculating to obtain a first ratio of the second performance evaluation score to the first performance evaluation score; and based on the first configuration and the first ratio of the CPU carried by the server to be migrated, adjusting the second configuration of the CPU carried by the migrated server. Thus, the first configuration of the CPU carried by the to-be-migrated server is taken as a standard, the second configuration of the CPU carried by the migrated server can be adjusted in a targeted manner, the adjusted second configuration of the CPU can be more adaptive to the migrated server in a target scene, the performance of the server is adaptive, and the migration efficiency of the server is improved. And the situation of performance insufficiency or performance waste is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the computer field, and in particular to a method for adjusting CPU configuration based on server migration and related devices. Background Art

[0002] With the rapid development of information technology, in order to improve the autonomy and controllability of business and upgrade servers, applications, data and services on a server, such as server A, can be migrated to another server, such as server B. However, this server migration process may result in insufficient performance or performance waste of server B due to configuration differences between server A and server B, for example, different central processing unit (CPU) architectures.

[0003] Therefore, how to adjust the CPU configuration after server migration to avoid insufficient server performance or performance waste has become a problem that needs to be solved urgently. Summary of the invention

[0004] In view of this, an embodiment of the present application provides a method for adjusting the CPU configuration based on server migration and a related device method, the purpose of which is to accurately adjust the CPU configuration after server migration to adapt the server performance and reduce the occurrence of insufficient performance or performance waste.

[0005] In a first aspect, an embodiment of the present application provides a method for adjusting CPU configuration based on server migration, the method comprising:

[0006] Obtaining a first performance evaluation score of the server to be migrated in a target scenario, and obtaining a second performance evaluation score of the server after migration in the target scenario; the central processing unit CPU carried by the server to be migrated has a first configuration, and the CPU carried by the server after migration has a second configuration;

[0007] Calculating a first ratio of the second performance evaluation score to the first performance evaluation score;

[0008] Based on the first configuration of the CPU of the server to be migrated and the first ratio, the second configuration of the CPU of the server after migration is adjusted.

[0009] In a possible implementation, the target scenario includes a physical machine scenario, and obtaining a first performance evaluation score of the server to be migrated in the target scenario, and obtaining a second performance evaluation score of the server after migration in the target scenario, includes:

[0010] In the physical machine scenario, an integer performance test is performed on both the server to be migrated and the server after migration to obtain a first score corresponding to the server to be migrated and a second score corresponding to the server after migration;

[0011] In the physical machine scenario, a floating point performance test is performed on both the server to be migrated and the server after migration to obtain a third score corresponding to the server to be migrated and a fourth score corresponding to the server after migration;

[0012] Based on the first score and the third score, a first performance evaluation score of the server to be migrated in the physical machine scenario is calculated;

[0013] A second performance evaluation score of the server to be migrated in the physical machine scenario is calculated based on the second score and the fourth score.

[0014] In a possible implementation, the first configuration is that a CPU of the server to be migrated is configured with a first number of physical cores, and the second configuration is that a CPU of the server after migration is configured with a second number of physical cores; and adjusting the second configuration of the CPU of the server after migration based on the first configuration of the CPU of the server to be migrated and the first ratio includes:

[0015] A second ratio of the first number of physical cores to the first ratio is calculated,

[0016] If the second ratio is an integer, adjusting the second number of physical cores of the CPU of the migrated server to the second ratio;

[0017] If the second ratio is a decimal, the second number of physical cores of the CPU on the migrated server is adjusted to an integer obtained by rounding down the second ratio.

[0018] In a possible implementation, the target scenario includes a virtualization scenario, and both the server to be migrated and the server after migration are configured with virtual machines; virtualized virtual CPUs in the CPUs respectively mounted on the server to be migrated and the server after migration are allocated to their own virtual machines; and obtaining a first performance evaluation score of the server to be migrated in the target scenario, and obtaining a second performance evaluation score of the server after migration in the target scenario, includes:

[0019] In the virtualization scenario, an integer performance test is performed on both the server to be migrated and the server after migration to obtain a fifth score corresponding to each virtual CPU of the server to be migrated and a sixth score corresponding to each virtual CPU of the server after migration;

[0020] In the virtualization scenario, a floating point performance test is performed on both the server to be migrated and the server after migration to obtain a seventh score corresponding to each virtual CPU of the server to be migrated and an eighth score corresponding to each virtual CPU of the server after migration;

[0021] Based on the fifth score and the seventh score, a first performance evaluation score of the server to be migrated in the virtualization scenario is calculated;

[0022] A second performance evaluation score of the server to be migrated in the virtualization scenario is calculated based on the sixth score and the eighth score.

[0023] In a possible implementation, the first configuration is that the CPU of the server to be migrated is configured with a first number of virtual machines, and the second configuration is that the CPU of the server after migration is configured with a second number of virtual machines; and adjusting the second configuration of the CPU of the server after migration based on the first configuration of the CPU of the server to be migrated and the first ratio includes:

[0024] Calculate and obtain the product of the first number of virtual machines and the first ratio,

[0025] If the product is an integer, the number of second virtual machines of the CPU carried by the migrated server is adjusted to the product;

[0026] If the product is a decimal, the number of second virtual machines of the CPU carried by the migrated server is adjusted to an integer obtained by rounding down the product.

[0027] In a possible implementation, the target scenario includes a data processing scenario, and obtaining a first performance evaluation score of the server to be migrated in the target scenario, and obtaining a second performance evaluation score of the server after migration in the target scenario, includes:

[0028] In the data processing scenario, for different user amounts, the transaction processing performance test is performed on the server to be migrated and the server after migration, respectively, to obtain the scores of the server to be migrated under the different user amounts, and to obtain the scores of the server after migration under the different user amounts;

[0029] Performing weighted calculation based on the weights corresponding to the different user amounts and the scores corresponding to the to-be-migrated server under the different user amounts, to obtain a first performance evaluation score of the to-be-migrated server under the data processing scenario;

[0030] A weighted calculation is performed based on the weights corresponding to the different amounts of users and the scores corresponding to the migrated server under the different amounts of users, so as to obtain a second performance evaluation score of the migrated server under the data processing scenario.

[0031] In a possible implementation, the first configuration is that a CPU of the server to be migrated is configured with a first number of virtual cores, and the second configuration is that a CPU of the server after migration is configured with a second number of virtual cores; and adjusting the second configuration of the CPU of the server after migration based on the first configuration of the CPU of the server to be migrated and the first ratio includes:

[0032] A third ratio of the first number of virtual cores to the first ratio is calculated,

[0033] If the third ratio is an integer and the third ratio is greater than or equal to a preset value, the second number of virtual cores of the CPU on the migrated server is adjusted to the third ratio; the preset value is used to indicate the minimum number of virtual cores configured for the CPU;

[0034] If the third ratio is a decimal and the third ratio is greater than or equal to the preset value, the number of second virtual cores of the CPU on the migrated server is adjusted to an integer obtained by rounding down the third ratio.

[0035] In a second aspect, an embodiment of the present application provides a device for adjusting CPU configuration based on server migration, the device comprising:

[0036] A score acquisition module, used to acquire a first performance evaluation score of the server to be migrated in a target scenario, and to acquire a second performance evaluation score of the server after migration in the target scenario; the central processing unit CPU carried by the server to be migrated has a first configuration, and the CPU carried by the server after migration has a second configuration;

[0037] a ratio calculation module, configured to calculate a first ratio between the second performance evaluation score and the first performance evaluation score;

[0038] The configuration adjustment module is used to adjust the second configuration of the CPU carried by the server after migration based on the first configuration of the CPU carried by the server to be migrated and the first ratio.

[0039] In a third aspect, an embodiment of the present application provides a CPU configuration adjustment device based on server migration, the device comprising a memory and a processor:

[0040] The memory is used to store a computer program and transmit the computer program to the processor;

[0041] The processor is used to execute the computer program so that the device executes the CPU configuration adjustment method based on server migration described in the first aspect.

[0042] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed, the device executing the computer program implements the method for adjusting the CPU configuration based on server migration as described in the first aspect above.

[0043] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0044] An embodiment of the present application provides a method for adjusting CPU configuration based on server migration and a related device. In the method, a first performance evaluation score of the server to be migrated in a target scenario is obtained, and a second performance evaluation score of the server after migration in the target scenario is obtained; the central processing unit CPU of the server to be migrated has a first configuration, and the CPU of the server after migration has a second configuration; a first ratio of the second performance evaluation score to the first performance evaluation score is calculated; based on the first configuration of the CPU of the server to be migrated and the first ratio, the second configuration of the CPU of the server after migration is adjusted.

[0045] It can be seen that the method evaluates the performance of the server to be migrated and the server after migration in the same target scenario respectively. Compared with the second configuration of the CPU carried by the server after migration, the first configuration of the CPU carried by the server to be migrated is more suitable. Therefore, for the same target scenario, the ratio between the second performance evaluation score and the first performance evaluation score corresponding to the two respectively can indicate the comparison of the actual performance of the two in the target scenario. Taking the first configuration of the CPU carried by the server to be migrated as the standard, the second configuration of the CPU carried by the server after migration can be adjusted in a targeted manner, so that in the target scenario, the adjusted second configuration of the CPU is more compatible with the server after migration, thereby making the server performance compatible and reducing the occurrence of insufficient performance or performance waste. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying creative work.

[0047] Figure 1A flowchart of a method for adjusting CPU configuration based on server migration provided in an embodiment of the present application;

[0048] Figure 2 A schematic diagram of a specific method for adjusting CPU configuration based on server migration provided in an embodiment of the present application;

[0049] Figure 3 A schematic diagram of an interface showing a successful installation of SPEC CPU 2017 provided in an embodiment of the present application;

[0050] Figure 4 A schematic diagram of a test result provided in an embodiment of the present application;

[0051] Figure 5 A schematic diagram of a performance evaluation score provided in an embodiment of the present application;

[0052] Figure 6 A schematic diagram of the structure of a device for adjusting CPU configuration based on server migration provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0054] Currently, due to differences in server configurations, such as different central processing unit (CPU) architectures of two servers, server migration may result in insufficient performance or waste of performance of the server after migration.

[0055] Based on this, in order to solve the above problems, the embodiment of the present application provides a method for adjusting the CPU configuration based on server migration and a related device method. In this method, a first performance evaluation score of the server to be migrated in the target scenario is obtained, and a second performance evaluation score of the server after migration in the target scenario is obtained; the central processing unit CPU of the server to be migrated has a first configuration, and the CPU of the server after migration has a second configuration; a first ratio of the second performance evaluation score to the first performance evaluation score is calculated; based on the first configuration of the CPU of the server to be migrated and the first ratio, the second configuration of the CPU of the server after migration is adjusted.

[0056] In this way, the method evaluates the performance of the server to be migrated and the server after migration in the same target scenario respectively. Compared with the second configuration of the CPU carried by the server after migration, the first configuration of the CPU carried by the server to be migrated is more suitable. Therefore, for the same target scenario, the ratio between the second performance evaluation score and the first performance evaluation score corresponding to the two respectively can indicate the comparison of the actual performance of the two in the target scenario. Taking the first configuration of the CPU carried by the server to be migrated as the standard, the second configuration of the CPU carried by the server after migration can be adjusted in a targeted manner, so that in the target scenario, the adjusted second configuration of the CPU is more compatible with the server after migration, thereby making the server performance compatible and reducing the occurrence of insufficient performance or performance waste.

[0057] It should be noted that the execution subject of the CPU configuration adjustment method based on server migration provided by the present invention can be a data processing device such as a terminal device or a server. Among them, the terminal device can be an electronic device such as a smart phone, a computer, a tablet computer, etc. The server can be an independent server, a cluster server or a cloud server, etc. This application does not specifically limit the terminal device or server mentioned above.

[0058] The specific implementation of the CPU configuration adjustment method based on server migration and related devices in the embodiments of the present application are described in detail below with reference to the accompanying drawings through embodiments.

[0059] See also Figure 1 , which is a flow chart of a CPU configuration adjustment method based on server migration provided in an embodiment of the present application, combined with Figure 1 As shown, it may specifically include:

[0060] S101: Obtain a first performance evaluation score of a server to be migrated in a target scenario, and obtain a second performance evaluation score of a migrated server in the target scenario.

[0061] The CPU of the server to be migrated has a first configuration, and the CPU of the server after migration has a second configuration.

[0062] Exemplarily, the server to be migrated may be an x86 system server, and the server after migration may be a domestic server. This application does not limit this. The CPUs of the server to be migrated and the server after migration may have different configurations.

[0063] In some embodiments, the CPU has a first configuration, and the CPU has a second configuration. The two CPUs may have different architectures, or the two CPUs may have the same architecture but different configurations under the same architecture. This application does not limit this.

[0064] Exemplarily, the server to be migrated is an x86 server, and the first configuration of its CPU is a configuration under the x86 architecture. The server after migration is a domestic server, and the second configuration of its CPU is a configuration under the Advanced RISC Machine (ARM) architecture.

[0065] In another exemplary embodiment, the server to be migrated is a domestic server, and the first configuration of the CPU it carries is a configuration under the ARM architecture, in which the CPU is a first model; the server after migration is also a domestic server, and the second configuration of the CPU it carries is another configuration under the ARM architecture, in which the CPU is a second model. It should be noted that the different CPU models are only an example of different configurations, and other contents in the configuration may also be different, and this application does not limit this.

[0066] In some embodiments, the target scenario may be a physical machine scenario, a virtualization scenario, a data processing scenario, etc., which is not limited in this application.

[0067] S102: Calculate and obtain a first ratio of the second performance evaluation score to the first performance evaluation score.

[0068] The first ratio may represent a comparison between the performance of the migrated server and the server to be migrated.

[0069] S103: Based on the first configuration of the CPU of the server to be migrated and the first ratio, adjust the second configuration of the CPU of the server after migration.

[0070] Next, the following describes how to adjust the CPU configuration based on server migration in different target scenarios.

[0071] In one possible implementation, the target scenario includes a physical machine scenario, and S101 may include: in the physical machine scenario, performing integer performance tests on both the server to be migrated and the server after migration to obtain a first score corresponding to the server to be migrated and a second score corresponding to the server after migration; then, in the physical machine scenario, performing floating-point performance tests on both the server to be migrated and the server after migration to obtain a third score corresponding to the server to be migrated and a fourth score corresponding to the server after migration; then, based on the first score and the third score, calculating a first performance evaluation score of the server to be migrated in the physical machine scenario; finally, based on the second score and the fourth score, calculating a second performance evaluation score of the server to be migrated in the physical machine scenario.

[0072] The first score and the second score may be referred to as scores INTscore obtained by testing the integer operation performance indicator spec_int, and the third score and the fourth score may be referred to as scores FPscore obtained by testing the floating-point operation performance indicator spec_fprate.

[0073] In some embodiments, multiple integer performance tests may be performed on the server to be migrated to obtain multiple scores, and then the average of the multiple scores is calculated to obtain the first score. Similarly, multiple floating point performance tests may be performed on the server to be migrated to obtain multiple scores, and then the average of the multiple scores is calculated to obtain the second score. For example, the multiple times may be three times, and this application does not limit this. It should be noted that the second score and the fourth score of the server after migration are obtained in the same way, which will not be repeated here.

[0074] In some embodiments, a first performance evaluation score can be obtained by weighted calculation based on the first score and the third score. For example, the weight of the first score is 30%, and the weight of the second score is 70%. The product of the first score and the corresponding weight is first calculated, and then the product of the second score and the corresponding weight is calculated, and then the two products are added to obtain the first performance evaluation score. This application does not limit this. It should be noted that the second performance evaluation score of the server after migration is obtained in the same way, which will not be repeated here.

[0075] In a possible implementation of the present application, in the physical machine scenario, the first configuration is that the CPU of the server to be migrated is configured with a first physical number of cores, and the second configuration is that the CPU of the server after migration is configured with a second physical number of cores; accordingly, S103 may specifically include: calculating a second ratio of the first physical number of cores and the first ratio, and if the second ratio is an integer, adjusting the second physical number of cores of the CPU of the server after migration to the second ratio; if the second ratio is a decimal, adjusting the second physical number of cores of the CPU of the server after migration to the integer rounded down of the second ratio.

[0076] For example, assuming that the first number of physical cores is 6 and the second number of physical cores is 8, the first ratio obtained based on the ratio of the second performance evaluation score to the first performance evaluation score is 1.5, indicating that the performance of the server is wasted after migration. The second ratio obtained by calculating the ratio of the first number of physical cores to the first ratio is 4, and the second physical core number of the CPU on the server after migration can be adjusted to 4.

[0077] As another example, assuming that the first ratio is 1.4 and other conditions are the same, the second ratio can be calculated to be 4.23, and the second number of physical cores can also be adjusted to 4.

[0078] In a possible implementation of the present application, the target scenario includes a virtualization scenario, the server to be migrated and the server after migration are both configured with virtual machines; the virtualized virtual CPUs in the CPUs respectively mounted on the server to be migrated and the server after migration are allocated to their own virtual machines. The virtual CPU is a virtual CPU, which can be referred to as vCPU for short.

[0079] Accordingly, S101 may include: in the virtualization scenario, first performing an integer performance test on the server to be migrated and the server after migration to obtain a fifth score corresponding to each vCPU of the server to be migrated and a sixth score corresponding to each vCPU of the server after migration; then, in the virtualization scenario, performing a floating-point performance test on the server to be migrated and the server after migration to obtain a seventh score corresponding to each vCPU of the server to be migrated and an eighth score corresponding to each vCPU of the server after migration; then, based on the fifth score and the seventh score, calculating the first performance evaluation score of the server to be migrated in the virtualization scenario; finally, based on the sixth score and the eighth score, calculating the second performance evaluation score of the server to be migrated in the virtualization scenario.

[0080] Among them, a virtual machine can be allocated one vCPU or multiple vCPUs. In the subsequent examples, for ease of understanding, an example in which a virtual machine is allocated 4 vCPUs is used for illustrative explanation. This application does not limit the number of vCPUs allocated to a virtual machine.

[0081] A server can be configured with one or more virtual machines. In the following examples, for ease of understanding, an exemplary description is given based on the following conditions: the server to be migrated is configured with one virtual machine, which can be called a single virtual machine. After migration, the server is configured with eight virtual machines, which can be called a fully configured virtual machine.

[0082] In some embodiments, after performing an integer performance test on the server to be migrated, a score is obtained, and the ratio of the score to the number of vCPUs of the server to be migrated can be calculated, and the ratio is used as the fifth score corresponding to each vCPU of the server to be migrated, which can be called VCOREintscore. Based on the above example, the server to be migrated is a single virtual machine, and each virtual machine is allocated 4 vCPUs, then the number of vCPUs of the server to be migrated is 4, and the score can be divided by 4.

[0083] The same is true for the server after migration. Based on the above example, the server to be migrated is a fully configured virtual machine, each virtual machine is allocated 4 vCPUs, then the number of vCPUs of the server to be migrated is 32. By dividing the score by 32, you can get the sixth score corresponding to each vCPU of the server after migration, which can be called INTscores.

[0084] It should be noted that the score obtained after performing the integer performance test on the server to be migrated as described above may also be the average of the scores obtained after performing multiple integer performance tests on the server to be migrated, and the same is true for the server after migration, and may also be the average of the scores obtained after performing multiple integer performance tests on the server after migration. The multiple times may be 3 or 6 times, and this application does not limit this.

[0085] It should be further explained that the floating point performance test is performed on the server to be migrated to obtain the seventh score corresponding to each virtual CPU of the server to be migrated, and the process of obtaining the seventh score is the same as the process of obtaining the fifth score described above. Similarly, the floating point performance test is performed on the server after migration to obtain the eighth score corresponding to each virtual CPU of the server after migration, and the process of obtaining the eighth score is the same as the process of obtaining the sixth score described above, which will not be repeated.

[0086] The seventh score may be called VCOREfpscore, the eighth score may be called FPscores, and the ratio of the fifth score to the sixth score, or the ratio of the seventh score to the eighth score, may be called the number of hyperthreads.

[0087] In some embodiments, integer performance tests can be performed on servers to be migrated that are configured with different numbers of virtual machines to obtain the fifth scores corresponding to each virtual CPU of the server to be migrated under the different numbers of virtual machines. The calculation process of each fifth score is the same as the process of obtaining the fifth score of the server to be migrated with a single virtual machine described above.

[0088] Correspondingly, floating-point performance tests can be performed on the servers to be migrated that are configured with different numbers of virtual machines to obtain the seventh scores corresponding to each virtual CPU of the server to be migrated under the different numbers of virtual machines. The calculation process of each seventh score is the same as the process of obtaining the seventh score of the server to be migrated with a single virtual machine introduced above.

[0089] Then, for the fifth score and the seventh score corresponding to the server to be migrated configured with each number of virtual machines, the comprehensive score corresponding to the server to be migrated configured with the number of virtual machines can be calculated. Exemplarily, the comprehensive score can be obtained by weighted calculation based on the fifth score and the seventh score. Exemplarily, the weight of the fifth score is 30%, and the weight of the seventh score is 70%, which is not limited in this application.

[0090] The servers to be migrated that are configured with different numbers of virtual machines each correspond to a comprehensive score, and the average of these comprehensive scores can be calculated as the first performance evaluation score of the server to be migrated in the virtualization scenario.

[0091] In addition, in some embodiments, after calculating the average of these comprehensive scores, the comprehensive scores that differ from the average by more than plus or minus 10% may be excluded, and then the average of the remaining comprehensive scores may be calculated as the first performance evaluation score. It should be noted that the difference of more than 10% is only an example, and the difference may also be more than 5% or more than 15%, and this application does not limit this.

[0092] It should be noted that the calculation process of the comprehensive scores corresponding to the migrated servers configured with different numbers of virtual machines is the same as the calculation process of the comprehensive scores corresponding to the servers to be migrated introduced above, and the way in which the second performance evaluation score is calculated based on the corresponding comprehensive scores is the same as the way in which the first performance evaluation score is calculated based on the corresponding comprehensive scores, and they will not be repeated here.

[0093] For example, the fifth scores corresponding to the servers to be migrated configured with one virtual machine, four virtual machines and eight virtual machines are x1, x2 and x3 respectively, and the seventh scores corresponding to the servers to be migrated configured with one virtual machine, four virtual machines and eight virtual machines are y1, y2 and y3 respectively. The weight of the fifth score is 30%, and the weight of the seventh score is 70%. Then, the comprehensive scores corresponding to the servers to be migrated configured with different numbers of virtual machines can be calculated as (x1×30%+y1×70%), (x2×30%+y2×70%) and (x3×30%+y3×70%). Then, the average of the three comprehensive scores can be calculated as the first performance evaluation score.

[0094] In addition, based on this example, after calculating the mean of the three comprehensive scores, the comprehensive scores that differ from the mean by more than plus or minus 10% can be excluded. Assuming that (x1×30%+y1×70%) is excluded, the mean of (x2×30%+y2×70%) and (x3×30%+y3×70%) can be calculated as the second performance evaluation score.

[0095] Among them, the first performance evaluation score and the second performance evaluation score can be referred to as VCOREscore_final.

[0096] It should be understood that in a virtualization scenario, the adjustment of the second configuration of the CPU equipped on the server after migration takes into account the number of vCPUs and the over-resolution ratio. In practical applications, the original vCPU configuration can be kept unchanged, and the second configuration of the CPU can be adjusted by the over-resolution ratio. According to the first performance evaluation score and the second performance evaluation score obtained above, the ratio of the second performance evaluation score to the first performance evaluation score can be calculated to obtain a first ratio as the ratio of their over-resolution ratios.

[0097] Exemplarily, assuming that the over-allocation ratio is 1.533 (that is, the first ratio is 1.533), for example, it can be rounded down to 1.5, assuming that the number of virtualized vCPUs (which can be called allocated vCPUs) in the CPU of the server to be migrated is 128, and the number of vCPUs that can be allocated to the server after migration is 192 (see Table 2 below).

[0098] In actual use, different over-resolution ratios are used according to different environments, as shown in Table 1. Among them, the ratio of CPU2 over-resolution to CPU1 over-resolution is 1.5. CPU2 over-resolution can be calculated based on the multiplication of CPU1 over-resolution and over-resolution ratio, and the result can be rounded down. For example, if the over-resolution ratio is 1.5, the CPU1 over-resolution is 2, and the multiplication of the two is 3, the CPU2 over-resolution can be 3. For another example, if the over-resolution ratio is 1.5, the CPU1 over-resolution is 3, and the multiplication of the two is 4.5, the CPU2 over-resolution can be rounded down to 4.

[0099] Table 1

[0100]

[0101]

[0102] In addition, in some embodiments, the use of data processing performance data in a data processing scenario can obtain performance ratios under different CPU configurations according to the first performance evaluation score and the second performance evaluation score, that is, (CPU1 Dscore / CPU1 threads) / (CPU2 Dscore / CPU2 number of threads), get the ratio of single threads, and convert the logical instance configuration according to the ratio of single threads. Among them, CPU1 is the server after migration, CPU2 is the server to be migrated, and CPU1 Dscore Refers to the second performance evaluation score, CPU2 Dscore Refers to the first performance evaluation score.

[0103] In a possible implementation of the present application, in the virtualization scenario, the first configuration is that the CPU of the server to be migrated is configured with a first number of virtual machines, and the second configuration is that the CPU of the server after migration is configured with a second number of virtual machines; accordingly, S103 may specifically include: first calculate the product of the first number of virtual machines and the first ratio, if the product is an integer, adjust the second number of virtual machines of the CPU of the server after migration to the product; if the product is a decimal, adjust the second number of virtual machines of the CPU of the server after migration to the integer rounded down of the product.

[0104] Exemplarily, assuming that the number of first virtual machines is 64, the number of second virtual machines is 64, and the number of vCPUs of the server to be migrated and the server after migration is the same, assuming that the first ratio based on the ratio of the second performance evaluation score to the first performance evaluation score is 1.5, indicating that the performance of the server after migration is wasted. To ensure consistent experience for front-end users, the virtual machine specifications do not need to be adjusted, but the total number of allocatable virtual machines can be adjusted. The performance of the server after migration is wasted, indicating that more vCPUs are allocated to each virtual machine in the server after migration. In this case, the number of virtual machines can be increased so that the vCPU allocated to each virtual machine is reduced. Therefore, the product of the first number of virtual machines and the first ratio can be calculated to be 96, and then the number of the second virtual machines of the CPU on the server after migration is adjusted to 96.

[0105] As an example, see Table 2, which exemplarily introduces the adjustment of the number of second virtual machines under different numbers of vCPUs. Among them, 1C refers to one vCPU, and the same applies to 2C, 4C and 8C, which will not be repeated.

[0106] Table 2

[0107]

[0108]

[0109] In a possible implementation of the present application, the target scenario may include a data processing scenario. Accordingly, S101 may specifically include: in the data processing scenario, first, for different user volumes, respectively, perform transaction processing performance tests on the server to be migrated and the server after migration, to obtain the scores of the server to be migrated under the different user volumes, and obtain the scores of the server after migration under the different user volumes; then, perform weighted calculation based on the weights corresponding to the different user volumes and the scores corresponding to the server to be migrated under the different user volumes, to obtain a first performance evaluation score of the server to be migrated in the data processing scenario; and also perform weighted calculation based on the weights corresponding to the different user volumes and the scores corresponding to the server after migration under the different user volumes, to obtain a second performance evaluation score of the server after migration in the data processing scenario.

[0110] The user volume refers to the number of users, which can be 1 user or multiple users.

[0111] For example, in a data processing scenario, the first performance evaluation score and the second performance evaluation score may be referred to as CPU Dscore , the score corresponding to a single user (also known as the single-core capability test value) can be defined as CPU Dcorescore , the multiple users can be 64 users, 128 users, 256 users and 512 users respectively, and the corresponding scores (also known as TPCC test values ​​under different concurrency) can be defined as CPU DTPCC64score 、CPU DTPCC128score 、CPU DTPCC256score and CPU DTPCC512score , where TPCC refers to the Transaction Processing Performance Council-Benchmark C.

[0112] Assuming that the weight corresponding to a single user is 60%, and the weight corresponding to 64 users, 128 users, 256 users, and 512 users is 10%, then the first performance evaluation score CPU Dscore =CPU Dcor escore ×60%+CPU DTPCC64score ×10% + CPU DTPCC128score ×10% + CPU DTPCC256score ×10% + CPU DTPCC512score ×10%, the second performance evaluation score is the same and will not be repeated here.

[0113] In a possible implementation of the present application, in the data processing scenario, the first configuration is that the CPU of the server to be migrated is configured with a first number of virtual cores, and the second configuration is that the CPU of the server after migration is configured with a second number of virtual cores; accordingly, S103 may include: calculating a third ratio of the first number of virtual cores and the first ratio, if the third ratio is an integer and the third ratio is greater than or equal to a preset value, adjusting the second number of virtual cores of the CPU of the server after migration to the third ratio; the preset value is used to indicate the minimum number of virtual cores configured for the CPU; if the third ratio is a decimal and the third ratio is greater than or equal to the preset value, adjusting the second number of virtual cores of the CPU of the server after migration to an integer rounded down from the third ratio.

[0114] For example, assuming that the first number of virtual cores is 6 and the second number of virtual cores is 8, the first ratio obtained based on the ratio of the second performance evaluation score to the first performance evaluation score is 1.5, indicating that the performance of the server is wasted after migration. The third ratio calculated by the ratio of the first number of virtual cores to the first ratio is 4, and the second number of virtual cores of the CPU on the server after migration can be adjusted to 4.

[0115] Furthermore, in some embodiments, assuming that the third ratio is smaller than a preset value and the second number of virtual cores is larger than a preset value, the second number of virtual cores may be adjusted to the preset value.

[0116] Exemplarily, assuming that the first number of virtual cores is 4, the second number of virtual cores is 8, the preset value is 4, and other conditions are the same, the third ratio can be calculated to be 2.67, which is less than the preset value 4, and the second number of virtual cores 8 is greater than the preset value 4, then the second number of virtual cores can be adjusted to the preset value 4.

[0117] As an example, please refer to Table 3, which exemplarily introduces the adjustment of the second number of virtual cores.

[0118] Table 3

[0119] The first virtual core number of the server to be migrated The adjusted number of second virtual cores of the server after migration 4 4 6 4 8 6 10 8 12 8 16 12 20 14 24 16

[0120] It should be noted that in the above-described embodiment of adjusting the second configuration of the CPU on the server after migration, the adjustment of the number of physical cores, the number of virtual machines, and the number of virtual cores of the CPU is only an example, and the CPU's main frequency, etc. can also be adjusted, and this application does not limit this.

[0121] As an example, see Figure 2, the figure is a schematic diagram of a specific CPU configuration adjustment method based on server migration provided in an embodiment of the present application. First, prepare the server to be migrated and the server after migration, configure the server to be migrated and the server after migration, the CPU configurations of the two are different, and the other configurations are the same; for the server to be migrated, perform integer performance test and floating-point performance test in the physical machine scenario to obtain the first score and the third score, perform integer performance test and floating-point performance test in the virtualization scenario to obtain the fifth score and the seventh score, perform transaction processing performance test for different user amounts in the data processing scenario, and obtain the scores corresponding to the different user amounts; similarly, for the server after migration, perform integer performance test and floating-point performance test in the physical machine scenario to obtain the second score and the fourth score, perform integer performance test and floating-point performance test in the virtualization scenario to obtain the sixth score and the eighth score, perform transaction processing performance test for different user amounts in the data processing scenario, and obtain the scores corresponding to the different user amounts.

[0122] Then, in different target scenarios, the second configuration of the CPU of the migrated server is adjusted according to the first performance evaluation score and the second performance evaluation score obtained based on the scores. For details, please refer to the introduction of the above embodiment, which will not be repeated here.

[0123] Next, we will introduce the preparations for performance evaluation of the servers to be migrated and the servers after migration in the target scenario.

[0124] In some embodiments, the server to be migrated and the server after migration may differ only in the configuration of the CPU, and other configurations may be completely consistent.

[0125] It should be noted that the following configuration introductions are for the server to be migrated and the server after migration.

[0126] For example, the hardware Basic Input Output System (BIOS) is configured, the Power Policy (Power Policy) is configured as Performance mode (Performance), the CPU Prefetching Configuration (Prefetching Configuration) is configured as Enabled (Enabled), the Non-Uniform Memory Access (NUM A) is configured as Enabled (Enable), the same version of the domestic operating system (Operating System, OS) is installed, the OS turns off the firewall and Security-Enhanced Linux (Security-Enhanced Linux, seLinux), and for some multi-NUMA architecture CPUs, core binding is required. For example, modify the parameters copies (referring to the number of identical test instances running in parallel) and the parameter thread (referring to the number of threads used by a single test instance) and the corresponding core binding parameter bind in the Standard Performance Evaluation Corporation (Spec) configuration file.

[0127] In the physical machine scenario, you can install the same version of GNU compiler collection (gcc), GNU C standard library (glibc), standard C (stdc) and other components, install SPEC CPU 2017 tools, mount the downloaded cpu2017-1.0.5.iso installation file to the server, and execute install.sh to install it. For an example, see Figure 3 , which is a schematic diagram of an interface showing a successful installation of SPEC CPU 2017 provided in an embodiment of the present application.

[0128] In the virtualization scenario, you can install the same version of the Library for interfacing with different virtualization technologies (Libvirt) and the Quick Emulator (Qemu) component. You can test two scenarios: one is to create a 4C (that is, 4 vCPUs) 8G (8GB of memory) virtual machine (that is, a single virtual machine); the other is to create multiple (number of virtual machines = total number of vCPUs / 4) 4C8G virtual machines with a fully configured virtual machine. That is to say, if the server has 32 vCPUs, you can create 32÷4=8 such virtual machines. Install the SPEC CPU2017 tool in the same way as above.

[0129] In the data processing scenario, you can also install the same version of gcc, glibc, stdc and other components, and you can also install the same version of the Benchmark SQL (BMSQL) tool.

[0130] Next, a method of obtaining a first performance evaluation score and a second performance evaluation score after the performance evaluation of the server to be migrated and the server after migration in the target scenario is introduced.

[0131] In the physical machine scenario, enter the spec directory, use the command line tool runcpu to use the relevant spec configuration file, perform the integer performance test fpint and the floating-point performance test fprate, respectively, and record the test results in the *inrate*.txt and *fprate*.txt files in the result directory, that is, the scores obtained by performing the integer performance test and the floating-point performance test. For example, the scores may be the first score, the second score, the third score, and the fourth score introduced above, or the first score, the second score, the third score, and the fourth score may be obtained based on the scores obtained by the integer performance test and the floating-point performance test. Please refer to the introduction of the above embodiment and will not be repeated here.

[0132] In the virtualization scenario, first create the first virtual machine, install components related to spec 2017 in the virtual machine, enter the virtual machine, configure large page memory, turn off transparent large pages, bind the virtual machine to a fixed core, turn off the firewall and seLinux, deploy spec 2017 tools in the virtual machine, perform performance testing, and record performance data; after completion, perform a full-configuration virtual machine test, deploy a full-configuration (Vcpu total / 4) virtual machine, configure each virtual machine as above, start the spec test at the same time, and record performance data, that is, the scores obtained by performing integer performance tests and floating-point performance tests. The fifth score to the eighth score can be calculated based on this score later. Please refer to the introduction of the above embodiment, which will not be repeated here.

[0133] In the data processing scenario, single-core computing and high-concurrency (that is, different numbers of users) computing are tested. First, the single-core capability (that is, one user) is tested by looping insert statements and recording the CPU execution time. Second, the CPU performance at high concurrency is tested through the BMSQL tool. The hugepage is set to enable, and the database connection string, user name, running time and other information are configured. The concurrent users are set to TPCC64, TPCC128, TPCC256 and TPCC512, respectively, to indicate different numbers of users. The configuration file . / runBenchmark.sh is started, and the TPMC test data in the data directory is recorded; then the test is compiled and tested.

[0134] After the test is completed, go to / home / spec2017 / result / to view the completed test result file. The test result file includes the test results, such as Figure 4 As shown, Figure 4 A schematic diagram of a test result provided in an embodiment of the present application, the test result is the score of the server to be migrated under the different user amounts, and the score of the server after migration under the different user amounts. It should be noted that Figure 4 The path of the score is shown in Figure 1, but the score is not displayed.

[0135] like Figure 5 As shown, Figure 5 A schematic diagram of a performance evaluation score provided in an embodiment of the present application can be referred to as the result of SPEC CPU 2017 Rate Int base, that is, the first performance evaluation score of the server to be migrated or the second performance evaluation score of the server after migration.

[0136] It should be noted that Figure 4 and Figure 5 For illustration only, this application does not limit the path of the test result file, nor does it limit the storage path of the first performance evaluation score and the second performance evaluation score.

[0137] The above are some specific implementations of the CPU configuration adjustment method based on server migration provided by the embodiment of the present application. Based on this, the present application also provides a corresponding CPU configuration adjustment device based on server migration. The following will introduce the CPU configuration adjustment device based on server migration provided by the embodiment of the present application from the perspective of functional modularization.

[0138] See also Figure 6 , which is a schematic diagram of the structure of a CPU configuration adjustment device based on server migration provided in an embodiment of the present application. The CPU configuration adjustment device based on server migration 600 may include:

[0139] The score acquisition module 610 is used to acquire a first performance evaluation score of the server to be migrated in a target scenario, and acquire a second performance evaluation score of the server after migration in the target scenario; the central processing unit CPU of the server to be migrated has a first configuration, and the CPU of the server after migration has a second configuration;

[0140] A ratio calculation module 620, configured to calculate a first ratio between the second performance evaluation score and the first performance evaluation score;

[0141] The configuration adjustment module 630 is used to adjust the second configuration of the CPU installed in the server after migration based on the first configuration of the CPU installed in the server to be migrated and the first ratio.

[0142] As an implementation manner, the target scene includes a physical machine scene, and the score acquisition module 610 may specifically include:

[0143] A first testing unit is used to perform an integer performance test on both the server to be migrated and the server after migration in the physical machine scenario to obtain a first score corresponding to the server to be migrated and a second score corresponding to the server after migration;

[0144] A second testing unit is used to perform a floating point performance test on both the server to be migrated and the server after migration in the physical machine scenario to obtain a third score corresponding to the server to be migrated and a fourth score corresponding to the server after migration;

[0145] A first score calculation unit, configured to calculate a first performance evaluation score of the server to be migrated in the physical machine scenario based on the first score and the third score;

[0146] The second score calculation unit is used to calculate a second performance evaluation score of the server to be migrated in the physical machine scenario based on the second score and the fourth score.

[0147] As an implementation manner, the first configuration is that the CPU of the server to be migrated is configured with a first number of physical cores, and the second configuration is that the CPU of the server after migration is configured with a second number of physical cores; the configuration adjustment module 630 may specifically include:

[0148] a first ratio calculation unit, configured to calculate a second ratio of the first number of physical cores to the first ratio;

[0149] A first core number adjustment unit, configured to adjust the second physical core number of the CPU of the post-migration server to the second ratio if the second ratio is an integer;

[0150] The second core number adjustment unit is used to adjust the second physical core number of the CPU installed in the migrated server to an integer obtained by rounding down the second ratio if the second ratio is a decimal.

[0151] As an implementation manner, the target scenario includes a virtualization scenario, the server to be migrated and the server after migration are both configured with virtual machines; the virtualized virtual CPUs in the CPUs respectively mounted on the server to be migrated and the server after migration are allocated to their own virtual machines; the score acquisition module 610 may specifically include:

[0152] A third testing unit is used to perform integer performance tests on the server to be migrated and the server after migration in the virtualization scenario to obtain a fifth score corresponding to each virtual CPU of the server to be migrated and a sixth score corresponding to each virtual CPU of the server after migration;

[0153] a fourth testing unit, configured to perform a floating-point performance test on both the server to be migrated and the server after migration in the virtualization scenario, to obtain a seventh score corresponding to each virtual CPU of the server to be migrated and an eighth score corresponding to each virtual CPU of the server after migration;

[0154] A third score calculation unit, configured to calculate a first performance evaluation score of the server to be migrated in the virtualization scenario based on the fifth score and the seventh score;

[0155] The fourth score calculation unit is configured to calculate a second performance evaluation score of the server to be migrated in the virtualization scenario based on the sixth score and the eighth score.

[0156] As an implementation manner, the first configuration is that the CPU of the server to be migrated is configured with a first number of virtual machines, and the second configuration is that the CPU of the server after migration is configured with a second number of virtual machines; the configuration adjustment module 630 includes:

[0157] a product calculation unit, configured to calculate the product of the first number of virtual machines and the first ratio,

[0158] A third core number adjustment unit, configured to adjust the number of second virtual machines of the CPU carried by the migrated server to the product if the product is an integer;

[0159] The fourth core number adjustment unit is used to adjust the number of second virtual machines of the CPU carried by the migrated server to an integer obtained by rounding down the product if the product is a decimal.

[0160] As an implementation manner, the target scenario includes a data processing scenario, and the score acquisition module 610 may specifically include:

[0161] A fifth testing unit is used to perform transaction processing performance tests on the server to be migrated and the server after migration respectively for different user amounts in the data processing scenario, and obtain scores of the server to be migrated respectively under the different user amounts, and obtain scores of the server after migration respectively under the different user amounts;

[0162] A first weighted calculation unit, configured to perform weighted calculation based on the weights corresponding to the different amounts of users and the scores corresponding to the servers to be migrated under the different amounts of users, to obtain a first performance evaluation score of the servers to be migrated under the data processing scenario;

[0163] The second weighted calculation unit is used to perform weighted calculation based on the weights corresponding to the different user amounts and the scores corresponding to the migrated server under the different user amounts, so as to obtain a second performance evaluation score of the migrated server under the data processing scenario.

[0164] As an implementation manner, the first configuration is that the CPU of the server to be migrated is configured with a first number of virtual cores, and the second configuration is that the CPU of the server after migration is configured with a second number of virtual cores; the configuration adjustment module 630 may specifically include:

[0165] a second ratio calculation unit, configured to calculate a third ratio of the first number of virtual cores and the first ratio;

[0166] a fifth core number adjustment unit, configured to adjust the second virtual core number of the CPU mounted on the migrated server to the third ratio if the third ratio is an integer and the third ratio is greater than or equal to a preset value; the preset value is used to indicate the minimum number of virtual cores configured for the CPU;

[0167] The sixth core number adjustment unit is used to adjust the second virtual core number of the CPU equipped with the migrated server to an integer rounded down from the third ratio if the third ratio is a decimal and the third ratio is greater than or equal to the preset value.

[0168] The embodiments of the present application also provide a corresponding CPU configuration adjustment device based on server migration and a computer-readable storage medium for implementing the solution provided in the embodiments of the present application.

[0169] Among them, the CPU configuration adjustment device based on server migration includes a memory and a processor, the memory is used to store a computer program, and the processor is used to execute the computer program so that the device executes the CPU configuration adjustment method based on server migration described in any embodiment of the present application.

[0170] The computer-readable storage medium stores a computer program. When the computer program is executed, a device executing the computer program implements the method for adjusting CPU configuration based on server migration as described in any embodiment of the present application.

[0171] The "first" and "second" in the names such as "first" and "second" (if any) mentioned in the embodiments of the present application are only used as name identifiers and do not represent the first or second in order.

[0172] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a readable storage medium, such as a read-only memory (ROM) / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.

[0173] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is merely schematic, in which the unit described as a separate component may or may not be physically separated, and the component prompted as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.

[0174] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for adjusting CPU configuration based on server migration, characterized in that: The method comprises: Obtaining a first performance evaluation score of the server to be migrated in a target scenario, and obtaining a second performance evaluation score of the server after migration in the target scenario; the central processing unit CPU carried by the server to be migrated has a first configuration, and the CPU carried by the server after migration has a second configuration; Calculating a first ratio of the second performance evaluation score to the first performance evaluation score; Based on the first configuration of the CPU of the server to be migrated and the first ratio, the second configuration of the CPU of the server after migration is adjusted.

2. The method according to claim 1, characterized in that The target scenario includes a physical machine scenario, and obtaining a first performance evaluation score of the server to be migrated in the target scenario, and obtaining a second performance evaluation score of the server after migration in the target scenario, includes: In the physical machine scenario, an integer performance test is performed on both the server to be migrated and the server after migration to obtain a first score corresponding to the server to be migrated and a second score corresponding to the server after migration; In the physical machine scenario, a floating point performance test is performed on both the server to be migrated and the server after migration to obtain a third score corresponding to the server to be migrated and a fourth score corresponding to the server after migration; Based on the first score and the third score, a first performance evaluation score of the server to be migrated in the physical machine scenario is calculated; A second performance evaluation score of the server to be migrated in the physical machine scenario is calculated based on the second score and the fourth score.

3. The method according to claim 2, characterized in that The first configuration is that the CPU of the server to be migrated is configured with a first number of physical cores, and the second configuration is that the CPU of the server after migration is configured with a second number of physical cores; and adjusting the second configuration of the CPU of the server after migration based on the first configuration of the CPU of the server to be migrated and the first ratio includes: A second ratio of the first number of physical cores to the first ratio is calculated, If the second ratio is an integer, adjusting the second number of physical cores of the CPU of the migrated server to the second ratio; If the second ratio is a decimal, the second number of physical cores of the CPU on the migrated server is adjusted to an integer obtained by rounding down the second ratio.

4. The method according to claim 1, characterized in that: The target scenario includes a virtualization scenario, and both the server to be migrated and the server after migration are configured with virtual machines; virtualized virtual CPUs in the CPUs respectively mounted on the server to be migrated and the server after migration are allocated to their own virtual machines; and obtaining a first performance evaluation score of the server to be migrated in the target scenario, and obtaining a second performance evaluation score of the server after migration in the target scenario, includes: In the virtualization scenario, an integer performance test is performed on both the server to be migrated and the server after migration to obtain a fifth score corresponding to each virtual CPU of the server to be migrated and a sixth score corresponding to each virtual CPU of the server after migration; In the virtualization scenario, a floating point performance test is performed on both the server to be migrated and the server after migration to obtain a seventh score corresponding to each virtual CPU of the server to be migrated and an eighth score corresponding to each virtual CPU of the server after migration; Based on the fifth score and the seventh score, a first performance evaluation score of the server to be migrated in the virtualization scenario is calculated; A second performance evaluation score of the server to be migrated in the virtualization scenario is calculated based on the sixth score and the eighth score.

5. The method according to claim 4, characterized in that The first configuration is that the CPU of the server to be migrated is configured with a first number of virtual machines, and the second configuration is that the CPU of the server after migration is configured with a second number of virtual machines; The adjusting the second configuration of the CPU carried by the server after migration based on the first configuration of the CPU carried by the server to be migrated and the first ratio includes: Calculate and obtain the product of the first number of virtual machines and the first ratio, If the product is an integer, the number of second virtual machines of the CPU carried by the migrated server is adjusted to the product; If the product is a decimal, the number of second virtual machines of the CPU carried by the migrated server is adjusted to an integer obtained by rounding down the product.

6. The method according to claim 1, characterized in that The target scenario includes a data processing scenario, and obtaining a first performance evaluation score of the server to be migrated in the target scenario, and obtaining a second performance evaluation score of the server after migration in the target scenario, includes: In the data processing scenario, for different user amounts, the transaction processing performance test is performed on the server to be migrated and the server after migration, respectively, to obtain the scores of the server to be migrated under the different user amounts, and to obtain the scores of the server after migration under the different user amounts; Performing weighted calculation based on the weights corresponding to the different user amounts and the scores corresponding to the to-be-migrated server under the different user amounts, to obtain a first performance evaluation score of the to-be-migrated server under the data processing scenario; A weighted calculation is performed based on the weights corresponding to the different amounts of users and the scores corresponding to the migrated server under the different amounts of users, so as to obtain a second performance evaluation score of the migrated server under the data processing scenario.

7. The method according to claim 6, characterized in that The first configuration is that the CPU of the server to be migrated is configured with a first number of virtual cores, and the second configuration is that the CPU of the server after migration is configured with a second number of virtual cores; and adjusting the second configuration of the CPU of the server after migration based on the first configuration of the CPU of the server to be migrated and the first ratio includes: A third ratio of the first number of virtual cores to the first ratio is calculated, If the third ratio is an integer and the third ratio is greater than or equal to a preset value, the second number of virtual cores of the CPU on the migrated server is adjusted to the third ratio; the preset value is used to indicate the minimum number of virtual cores configured for the CPU; If the third ratio is a decimal and the third ratio is greater than or equal to the preset value, the number of second virtual cores of the CPU on the migrated server is adjusted to an integer obtained by rounding down the third ratio.

8. A CPU configuration adjustment device based on server migration, characterized in that: The device comprises: A score acquisition module, used to acquire a first performance evaluation score of the server to be migrated in a target scenario, and to acquire a second performance evaluation score of the server after migration in the target scenario; the central processing unit CPU carried by the server to be migrated has a first configuration, and the CPU carried by the server after migration has a second configuration; a ratio calculation module, configured to calculate a first ratio between the second performance evaluation score and the first performance evaluation score; The configuration adjustment module is used to adjust the second configuration of the CPU carried by the server after migration based on the first configuration of the CPU carried by the server to be migrated and the first ratio.

9. A CPU configuration adjustment device based on server migration, characterized in that: The device comprises a memory and a processor: The memory is used to store a computer program and transmit the computer program to the processor; The processor is used to execute the computer program so that the device performs the steps of the method for adjusting CPU configuration based on server migration as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program. When the computer program is executed, a device executing the computer program implements the steps of the method for adjusting CPU configuration based on server migration as described in any one of claims 1 to 7.