A method and device for configuring CPU

By acquiring and predicting the CPU resource requirements of cloud server software under different numbers of concurrent users, the contradiction between software running speed and resource waste on cloud servers is resolved, and the rational allocation of CPU resources is achieved.

CN112346849BActive Publication Date: 2024-11-05BEIJING GRIDSUM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910734564.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-08-09
Publication Date
2024-11-05
Estimated Expiration
2039-08-09

AI Technical Summary

Technical Problem

When installing software on a cloud server, existing technologies cannot effectively balance the contradiction between software running speed and CPU resource waste, leading to problems of insufficient or wasted resources.

Method used

By obtaining the CPU resource requirements of the software to be installed under different numbers of concurrent users, and combining this with the number of concurrent users, the CPU resource requirements of the software can be predicted, and the CPU of the cloud device can be configured according to the requirements.

Benefits of technology

It achieves an adaptive match between the CPU configuration of cloud devices and software requirements, avoiding the impact on running speed and resource waste, and balancing the contradiction between software running speed and CPU resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112346849B_ABST
    Figure CN112346849B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method and device for configuring a CPU, which relates to the field of computer technology and is used to balance the contradiction between software running speed and CPU resource waste. The method includes: obtaining the CPU resources required by the software to be installed under different numbers of concurrent users; obtaining the number of concurrent users of the software to be installed; predicting the CPU resources required by the software to be installed according to the number of concurrent users of the software to be installed and the CPU resources required by the software to be installed under different numbers of concurrent users; configuring the CPU of a cloud device that installs the software to be installed according to the CPU resources required by the software to be installed. The embodiment of the present invention is used to configure the CPU of a cloud device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for configuring a central processing unit (CPU). Background Art

[0002] Elastic Compute Service (ECS) is a simple, efficient, secure, reliable, and elastically scalable computing service. With ECS, users can quickly create or release any number of cloud servers without purchasing hardware. Therefore, ECS has gradually replaced traditional servers created by physical machines and become the mainstream development target of servers.

[0003] At present, when installing stand-alone software on a cloud server, the CPU of the cloud server is generally configured according to a general template, and in order to balance the contradiction between software running speed and CPU resource waste, the CPU size in the general template is usually set to a moderate value. However, due to the differences in the running characteristics of each software and the number of concurrent users of each software, the requirements of different software for CPU resources vary greatly. For software with large CPU resource requirements, if the CPU of the cloud server is configured according to a general template, the CPU resources cannot meet the software's demand for CPU resources, and the software may run slowly after installation. For software with small CPU resource requirements, if the CPU of the cloud server is configured according to a general template, the CPU resources will be far greater than the software's demand for CPU resources, resulting in resource waste. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a method and apparatus for configuring a CPU, which is used to balance the contradiction between software running speed and CPU resource waste.

[0005] In order to achieve the above purpose, the embodiment of the present invention provides the following technical solutions:

[0006] In a first aspect, an embodiment of the present invention provides a method for configuring a CPU, comprising:

[0007] Get the CPU resources required by the software to be installed under different numbers of concurrent users;

[0008] Obtaining the number of concurrent users of the software to be installed;

[0009] Predicting the CPU resources required by the software to be installed according to the number of concurrent users of the software to be installed and the CPU resources required by the software to be installed under different numbers of concurrent users;

[0010] The CPU of the cloud device where the software to be installed is installed is configured according to the CPU resources required by the software to be installed.

[0011] As an optional implementation of the embodiment of the present invention, before obtaining the CPU resources required by the software to be installed under different numbers of concurrent users, the method further includes:

[0012] Determine, according to the running characteristics of the software to be installed, whether the CPU resources required by the software to be installed are greater than a threshold value when the number of concurrent users is a first preset value;

[0013] If the number of concurrent users is the first preset value, and the CPU resources required by the software to be installed are less than or equal to the threshold, the CPU size of the cloud device on which the software to be installed is installed is configured to be the second preset value.

[0014] As an optional implementation of the embodiment of the present invention, obtaining the CPU resources required by the software to be installed under different numbers of concurrent users includes:

[0015] Obtaining the running information of the software to be installed after installation to form a big data resource pool;

[0016] The CPU resources required by the software to be installed under different numbers of concurrent users are obtained according to the big data resource pool.

[0017] As an optional implementation of the embodiment of the present invention, obtaining the CPU resources required by the software to be installed under different numbers of concurrent users includes:

[0018] Obtaining the running information of the software to be installed in the test environment to form a big data resource pool;

[0019] The CPU resources required by the software to be installed under different numbers of concurrent users are obtained according to the big data resource pool.

[0020] As an optional implementation of the embodiment of the present invention, obtaining the CPU resources required by the software to be installed under different numbers of concurrent users includes:

[0021] Obtaining the running information of the software to be installed after installation and the running information of the software to be installed in the test environment;

[0022] Combining the running information of the software to be installed after installation and the running information of the software to be installed in the test environment, forming a big data resource pool;

[0023] The CPU resources required by the software to be installed under different numbers of concurrent users are obtained according to the big data resource pool.

[0024] As an optional implementation of the embodiment of the present invention, obtaining the number of concurrent users of the software to be installed includes:

[0025] The number of concurrent users of the software to be installed is predicted according to the number of users of the software to be installed and the running stage of the software to be installed, so as to obtain the number of concurrent users of the software to be installed.

[0026] In a second aspect, an embodiment of the present invention provides a device for configuring a CPU, comprising:

[0027] A demand acquisition unit, used to acquire the CPU resources required by the software to be installed under different numbers of concurrent users;

[0028] A quantity acquisition unit, used to acquire the number of concurrent users of the software to be installed;

[0029] A prediction unit, configured to predict the CPU resources required by the software to be installed according to the number of concurrent users of the software to be installed and the CPU resources required by the software to be installed under different numbers of concurrent users;

[0030] The configuration unit is used to configure the CPU of the cloud device where the software to be installed is installed according to the CPU resources required by the software to be installed.

[0031] As an optional implementation of the embodiment of the present invention, the device further includes:

[0032] a determining unit, configured to determine, according to the running characteristics of the software to be installed, whether the CPU resources required by the software to be installed are greater than a threshold value when the number of concurrent users is a first preset value;

[0033] The configuration unit is further configured to configure the CPU size of the cloud device on which the software to be installed is installed to a second preset value when the number of concurrent users is a first preset value and the CPU resources required by the software to be installed are less than or equal to the threshold.

[0034] As an optional implementation of the embodiment of the present invention, the demand acquisition unit is specifically used to obtain the running information of the software to be installed after installation to form a big data resource pool; and obtain the CPU resources required by the software to be installed under different numbers of concurrent users based on the big data resource pool.

[0035] As an optional implementation of the present invention, the demand acquisition unit is specifically used to obtain the running information of the software to be installed in the test environment to form a big data resource pool; and obtain the CPU resources required by the software to be installed under different numbers of concurrent users based on the big data resource pool.

[0036] As an optional implementation of an embodiment of the present invention, the demand acquisition unit is specifically used to obtain the running information of the software to be installed after installation and the running information of the software to be installed in a test environment; combining the running information of the software to be installed after installation and the running information of the software to be installed in the test environment to form a big data resource pool; and obtaining the CPU resources required by the software to be installed under different numbers of concurrent users based on the big data resource pool.

[0037] As an optional implementation of the embodiment of the present invention, the quantity acquisition unit is specifically used to predict the number of concurrent users of the software to be installed according to the number of users of the software to be installed and the running stage of the software to be installed, and acquire the number of concurrent users of the software to be installed.

[0038] In a third aspect, an embodiment of the present invention provides a device for configuring a CPU, comprising: a memory and a processor, the memory being used to store a computer program; the processor being used to execute the method for configuring a CPU described in the first aspect or any embodiment of the first aspect when calling the computer program.

[0039] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for configuring a CPU as described in the first aspect or any one of the embodiments of the first aspect.

[0040] The method for configuring a CPU provided in an embodiment of the present invention first obtains the CPU resources required by the software to be installed under different numbers of concurrent users and the number of concurrent users of the software to be installed, then predicts the CPU resources required by the software to be installed according to the number of concurrent users of the software to be installed and the CPU resources required by the software to be installed under different numbers of concurrent users, and finally configures the CPU of a cloud device on which the software to be installed is installed according to the CPU resources required by the software to be installed. Since the method for configuring a CPU provided in an embodiment of the present invention can predict the CPU resources actually required by the software to be installed and configure the CPU of the cloud device on which the software to be installed is installed based on the CPU resources actually required by the software to be installed, the CPU configured for the cloud device can be adapted to the CPU requirements of the software to be installed, and the problem of the CPU configured for the cloud device being too large or too small will not occur. Therefore, it is possible to avoid wasting CPU resources while avoiding affecting the running speed of the software to be installed. Therefore, the embodiment of the present invention can balance the contradiction between software running speed and waste of CPU resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 One of the flowcharts of the method for configuring a CPU provided in an embodiment of the present invention;

[0042] Figure 2 A second flowchart of a method for configuring a CPU provided in an embodiment of the present invention;

[0043] Figure 3 One of the structural schematic diagrams of the device for configuring a CPU provided in an embodiment of the present invention;

[0044] Figure 4 A second structural diagram of a device for configuring a CPU provided in an embodiment of the present invention;

[0045] Figure 5 A schematic diagram of the hardware structure of a device for configuring a CPU provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0047] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship; in a formula, the character " / " indicates that the previous and next associated objects are in a "division" relationship. If not specified, "multiple" in this article refers to two or more.

[0048] In order to clearly describe the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, the words "first", "second", etc. are used to distinguish between the same items or similar items with basically the same functions or effects. Those skilled in the art can understand that the words "first", "second", etc. do not limit the quantity and execution order.

[0049] In the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. In the embodiments of the present invention, unless otherwise specified, the meaning of "multiple" refers to two or more.

[0050] The execution subject of the method for configuring a CPU provided in the embodiment of the present invention may be a device for configuring a CPU. Specifically, the device for configuring a CPU may be a terminal device such as a mobile phone, a tablet computer, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a smart watch, a smart bracelet, or the device for configuring a CPU may also be other types of terminal devices, which is not limited in the embodiments of the present application.

[0051] The embodiment of the present invention provides a method for configuring a CPU. Specifically, refer to Figure 1 As shown, the method for configuring the CPU may include the following steps:

[0052] S11, obtaining CPU resources required by the software to be installed under different numbers of concurrent users.

[0053] Specifically, the number of concurrent users in the embodiment of the present invention refers to the number of users who interact with the software to be installed at the same time.

[0054] As an optional implementation of the embodiment of the present invention, the implementation of the above step S11 (obtaining the CPU resources required by the software to be installed under different numbers of concurrent users) may include the following steps a and b.

[0055] Step a: obtaining the running information of the software to be installed after installation to form a big data resource pool.

[0056] Step b: obtaining the CPU resources required by the software to be installed under different numbers of concurrent users according to the big data resource pool.

[0057] Specifically, the running information of the software to be installed after installation includes: the number of concurrent users and the CPU resources occupied when the software to be installed is running; based on multiple running information of multiple software to be installed, the corresponding relationship between different numbers of concurrent users of the software to be installed and the required CPU resources can be determined, and then the corresponding relationship between different numbers of concurrent users of the software to be installed and the required CPU resources can be combined into a big data resource pool.

[0058] As an optional implementation of the embodiment of the present invention, the implementation of the above step S11 (obtaining the CPU resources required by the software to be installed under different numbers of concurrent users) may include the following steps I and II.

[0059] Step I: Obtain the running information of the software to be installed in the test environment to form a big data resource pool.

[0060] Specifically, in a test environment, the number of concurrent users can be set arbitrarily, and the CPU resources occupied by the software to be installed under different concurrent users can be read. For example, the number of concurrent users can be set to 10, 50, 100, 150, and the CPU resources occupied by the software to be installed when the number of concurrent users is 10, 50, 100, 150 can be obtained.

[0061] Step II: obtaining the CPU resources required by the software to be installed under different numbers of concurrent users according to the big data resource pool.

[0062] Similarly, the running information of the software to be installed in the test environment includes: the number of concurrent users and the CPU resources occupied when the software to be installed is running; by obtaining the running information in multiple test environments, the corresponding relationship between the different numbers of concurrent users of the software to be installed and the required CPU resources can be determined, and then the corresponding relationship between the different numbers of concurrent users of the software to be installed and the required CPU resources can be combined into a big data resource pool.

[0063] As an optional implementation of the embodiment of the present invention, the implementation of the above step S11 (obtaining the CPU resources required by the software to be installed under different numbers of concurrent users) may include the following steps 1) and 4).

[0064] 1) Obtaining the running information of the software to be installed after installation.

[0065] 2) Obtaining the running information of the software to be installed in the test environment.

[0066] 3) Combining the running information of the software to be installed after installation and the running information of the software to be installed in the test environment, a big data resource pool is formed.

[0067] Specifically, a big data resource pool is formed by combining the running information of the software to be installed after installation and the running information of the software to be installed in a test environment, including the following situations:

[0068] 1. The operation information after installation does not include the CPU resources required by the software to be installed when the number of concurrent users is x. In the test environment, when the number of concurrent users is x, the CPU resources occupied by the software to be installed are M. Then, in the big data resource pool, the CPU resources required by the software to be installed when the number of concurrent users is x are M.

[0069] 2. The operation information after installation includes that the CPU resources occupied by the software to be installed when the number of concurrent users is y is N; the operation information in the test environment does not include the CPU resources occupied by the software to be installed when the number of concurrent users is y, so the CPU resources required by the software to be installed in the big data resource pool when the number of concurrent users is y is N.

[0070] 3. The running information of the software to be installed after installation includes that when the number of concurrent users is z, the CPU resources occupied by the software to be installed are P; in the test environment, when the number of concurrent users is z, the CPU resources occupied by the software to be installed are Q, then when the number of concurrent users of the software to be installed in the big data resource pool is y, the CPU resources required can be (P+Q) / 2, or a*P+b*Q; wherein a and b are constants greater than 0 and less than 1, and a+b=1.

[0071] 4) According to the big data resource pool, the CPU resources required by the software to be installed under different numbers of concurrent users are obtained.

[0072] S12: Obtain the number of concurrent users of the software to be installed.

[0073] That is, obtain the number of users who interact with the software to be installed at the same time.

[0074] As an optional implementation mode of the embodiment of the present invention, the above step S12 (obtaining the number of concurrent users of the software to be installed) may include:

[0075] The number of concurrent users of the software to be installed is predicted according to the number of users of the software to be installed and the running stage of the software to be installed, so as to obtain the number of concurrent users of the software to be installed.

[0076] Specifically, the number of users of the software to be installed can be provided by the enterprise or unit that will use the software to be installed. For example, if the user of the software to be installed is a certain unit, the number of employees of the unit is 300, and all employees of the unit will use the software to be installed, then the number of users of the software to be installed can be determined to be 300. Of course, the number of users of the software to be installed can also be predicted and obtained based on the applicable population of the software to be installed, etc., and the implementation method for obtaining the number of users of the software to be installed is not limited in the embodiment of the present invention.

[0077] Furthermore, the number of concurrent users may change at different stages of software operation. Therefore, when predicting the concurrent users of the software, taking the software operation stage as a reference factor can more accurately predict the number of concurrent users of the software.

[0078] It should be noted that, in some cases, the number of users of the software to be installed in the embodiments of the present invention is not equal to the number of concurrent users of the software to be installed. For example, the number of users of the software to be installed is determined to be 300 based on the number of employees in the unit who use the software to be installed. However, the unit implements a two-shift system with 150 employees in each shift. At this time, the number of concurrent users of the software to be installed should be predicted based on 150 people, which is not equal to the number of users of the software to be installed, 300.

[0079] S13: predicting the CPU resources required by the software to be installed according to the number of concurrent users of the software to be installed and the CPU resources required by the software to be installed under different numbers of concurrent users.

[0080] For example, the CPU resources required by the software to be installed in step S11 under different numbers of concurrent users are shown in Table 1 below:

[0081] Table 1

[0082] Number of concurrent users CPU Requirements 10 1 50 4 100 8 150 16 200 16 300 32 1000 64

[0083] The number of concurrent users of the software to be installed obtained in step S12 is 100, and the CPU resources required by the software to be installed are predicted to be 8 units of CPU resources.

[0084] S14: configuring the CPU of the cloud device where the software to be installed is installed according to the CPU resources required by the software to be installed.

[0085] It should be noted that, the CPU of the cloud device on which the software to be installed is installed is configured according to the CPU resources required by the software to be installed. The CPU size of the cloud device on which the software to be installed is configured to be equal to the CPU resources required by the software to be installed, or the difference between the CPU size of the cloud device on which the software to be installed is configured to be within a certain range with respect to the CPU resources required by the software to be installed.

[0086] The method for configuring a CPU provided in an embodiment of the present invention first obtains the CPU resources required by the software to be installed under different numbers of concurrent users and the number of concurrent users of the software to be installed, then predicts the CPU resources required by the software to be installed according to the number of concurrent users of the software to be installed and the CPU resources required by the software to be installed under different numbers of concurrent users, and finally configures the CPU of a cloud device on which the software to be installed is installed according to the CPU resources required by the software to be installed. Since the method for configuring a CPU provided in an embodiment of the present invention can predict the CPU resources actually required by the software to be installed and configure the CPU of the cloud device on which the software to be installed is installed based on the CPU resources actually required by the software to be installed, the CPU configured for the cloud device can be adapted to the CPU requirements of the software to be installed, and the problem of the CPU configured for the cloud device being too large or too small will not occur. Therefore, it is possible to avoid wasting CPU resources while avoiding affecting the running speed of the software to be installed. Therefore, the embodiment of the present invention can balance the contradiction between software running speed and waste of CPU resources.

[0087] As an optional implementation of the embodiment of the present invention, refer to Figure 2As shown, before the above step S11 (obtaining the CPU resources required by the software to be installed under different numbers of concurrent users), the method for configuring the CPU provided by the embodiment of the present invention further includes:

[0088] S21 . Determine, according to the running characteristics of the software to be installed, whether the CPU resources required by the software to be installed are greater than a threshold when the number of concurrent users is a first preset value.

[0089] Exemplarily, the first preset value may be 1.

[0090] Specifically, the running characteristics of the software to be installed may include: whether the software to be installed is display software or computing software, and when the software to be installed is computing software, the amount of calculation when the software to be installed performs calculations and the requirements for response speed. For example, when the software to be installed is view software, the software to be installed calls background computing programs and data through an interface, so in this case, the CPU resources required by the software to be installed are less than a threshold value. For another example, when the software to be installed is data processing software, the software to be installed needs to perform complex calculations and requires a high input / output speed, so in this case, when the number of concurrent users is the first preset value, the CPU resources required by the software to be installed are greater than the threshold value.

[0091] Exemplarily, the threshold value may be set to one thousandth or one ten-thousandth of the computing resources of one unit of CPU.

[0092] In the above step S21, if the CPU resources required by the software to be installed are less than or equal to the threshold when the concurrent users are the first preset value, execute the following step S22; if the CPU resources required by the software to be installed are greater than the threshold when the concurrent users are the first preset value, execute the above steps S11 to S14.

[0093] S22: configuring the CPU size of the cloud device on which the software to be installed is installed to a second preset value.

[0094] Specifically, the threshold and preset value in the embodiment of the present invention can be set according to the estimated number of concurrent users and the CPU resources contained in 1 unit of CPU when the CPU is configured. For example: if the estimated number of concurrent users is 500 and the CPU resources contained in 1 unit of CPU are 1024, the threshold can be set to 10 and the second preset value can be set to 1024; for another example: if the estimated number of concurrent users is 3500 and the computing resources contained in 1 unit of CPU are 2048, the threshold can be set to 5 and the second preset value can be set to 2048. That is, if 1 unit of CPU can meet the CPU demand of the software to be installed when there are the most concurrent users, the CPU of the software to be installed can be directly configured as 1 unit of CPU.

[0095] In the above embodiment, it is first determined whether the CPU resources required by the software to be installed when the number of concurrent users is a first preset value is greater than a threshold value based on the running characteristics of the software to be installed; if the CPU resources required by the software to be installed when the number of concurrent users is the first preset value is less than or equal to the threshold value, the CPU size of the cloud device on which the software to be installed is installed is directly configured to a second preset value; if the CPU resources required by the software to be installed when the number of concurrent users is the first preset value is less than or equal to the threshold value, a small amount of CPU resources can meet the CPU demand of the software to be installed when the number of concurrent users is the largest. At this time, the CPU size of the cloud device on which the software to be installed is directly configured to the second preset value, which can avoid executing steps such as obtaining the CPU resources required by the software to be installed when the number of concurrent users is different and obtaining the number of concurrent users of the software to be installed, while ensuring the running speed of the software and not wasting a lot of CPU resources, thereby simplifying the method flow of configuring the CPU.

[0096] The embodiment of the present application can divide the functional modules of the terminal device etc. according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0097] In the case of integrated units, Figure 3 A possible structural diagram of a device for configuring a CPU involved in the above embodiment is shown. The device 300 for configuring a CPU includes:

[0098] A demand acquisition unit 31 is used to acquire the CPU resources required by the software to be installed under different numbers of concurrent users;

[0099] A quantity acquisition unit 32 is used to acquire the number of concurrent users of the software to be installed;

[0100] The prediction unit 33 is used to predict the CPU resources required by the software to be installed according to the number of concurrent users of the software to be installed and the CPU resources required by the software to be installed under different numbers of concurrent users;

[0101] The configuration unit 34 is used to configure the CPU of the cloud device where the software to be installed is installed according to the CPU resources required by the software to be installed.

[0102] As an optional embodiment of the present invention, refer to Figure 4As shown, the device 300 for configuring the CPU further includes:

[0103] A determination unit 35, configured to determine, according to the running characteristics of the software to be installed, whether the CPU resources required by the software to be installed are greater than a threshold when the number of concurrent users is a first preset value;

[0104] The configuration unit 34 is further configured to configure the CPU size of the cloud device for installing the software to be installed to a second preset value when the concurrent users are the first preset value and the CPU resources required by the software to be installed are less than or equal to the threshold.

[0105] As an optional implementation method of the embodiment of the present invention, the demand acquisition unit 31 is specifically used to obtain the running information of the software to be installed after installation to form a big data resource pool; and obtain the CPU resources required by the software to be installed under different numbers of concurrent users based on the big data resource pool.

[0106] As an optional implementation method of the embodiment of the present invention, the demand acquisition unit 31 is specifically used to obtain the operation information of the software to be installed in a test environment to form a big data resource pool; and obtain the CPU resources required by the software to be installed under different numbers of concurrent users based on the big data resource pool.

[0107] As an optional implementation method of the embodiment of the present invention, the demand acquisition unit 31 is specifically used to obtain the running information of the software to be installed after installation and the running information of the software to be installed in a test environment; combine the running information of the software to be installed after installation and the running information of the software to be installed in the test environment to form a big data resource pool; obtain the CPU resources required by the software to be installed under different numbers of concurrent users based on the big data resource pool.

[0108] As an optional implementation mode of the embodiment of the present invention, the quantity acquisition unit 32 is specifically used to predict the number of concurrent users of the software to be installed according to the number of users of the software to be installed and the running stage of the software to be installed, and obtain the number of concurrent users of the software to be installed.

[0109] The device for configuring a CPU provided in an embodiment of the present invention includes: a demand acquisition unit, a quantity acquisition unit, a prediction unit and a configuration unit; wherein the demand acquisition unit can obtain the CPU resources required by the software to be installed under different numbers of concurrent users, the quantity acquisition unit can obtain the number of concurrent users of the software to be installed, the prediction unit can predict the CPU resources required by the software to be installed based on the number of concurrent users of the software to be installed and the CPU resources required by the software to be installed under different numbers of concurrent users, and the configuration unit can configure the CPU of the cloud device where the software to be installed is installed based on the CPU resources required by the software to be installed. Since the device for configuring a CPU provided in an embodiment of the present invention can predict the CPU resources actually required by the software to be installed, and configure the CPU of the cloud device where the software to be installed is installed based on the CPU resources actually required by the software to be installed, the CPU configured for the cloud device can be adapted to the CPU requirements of the software to be installed, and the problem of the CPU configured for the cloud device being too large or too small will not occur. Therefore, it is possible to avoid wasting CPU resources while avoiding affecting the running speed of the software to be installed. Therefore, the embodiment of the present invention can balance the contradiction between software running speed and CPU resource waste.

[0110] Based on the same inventive concept, an embodiment of the present invention further provides a device for configuring a CPU. Figure 5 A schematic diagram of the structure of a device for configuring a CPU according to an embodiment of the present invention is shown in FIG. Figure 5 As shown, the device for configuring a CPU provided in this embodiment includes: a memory 51 and a processor 52, the memory 51 is used to store a computer program; the processor 52 is used to execute the method for configuring a CPU described in the above method embodiment when calling the computer program.

[0111] The device for configuring a CPU provided in this embodiment can execute the method for configuring a CPU provided in the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0112] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for configuring a CPU described in the above method embodiment is implemented.

[0113] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media that include computer-usable program code.

[0114] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0115] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0116] Computer readable media include permanent and non-permanent, removable and non-removable storage media. Storage media can be implemented by any method or technology to store information, and the information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for configuring a CPU, characterized in that: include: Obtaining CPU resources required by software to be installed under different numbers of concurrent users, including: obtaining running information of the software to be installed after installation and running information of the software to be installed in a test environment; combining the running information of the software to be installed after installation and the running information of the software to be installed in a test environment to form a big data resource pool, including: the running information of the software to be installed after installation includes that the CPU resources occupied by the software to be installed when the number of concurrent users is z is P, and in the test environment, when the number of concurrent users is z, the CPU resources occupied by the software to be installed is Q, then in the big data resource pool, when the number of concurrent users of the software to be installed is y, the CPU resources required are (P+Q) / 2, or a*P+b*Q, wherein a and b are constants greater than 0 and less than 1, and a+b=1; obtaining CPU resources required by the software to be installed under different numbers of concurrent users according to the big data resource pool; Obtaining the number of concurrent users of the software to be installed; Predicting the CPU resources required by the software to be installed according to the number of concurrent users of the software to be installed and the CPU resources required by the software to be installed under different numbers of concurrent users; The CPU of the cloud device where the software to be installed is installed is configured according to the CPU resources required by the software to be installed.

2. The method according to claim 1, characterized in that Before obtaining the CPU resources required by the software to be installed under different numbers of concurrent users, the method further includes: Determining, according to the running characteristics of the software to be installed, whether the CPU resources required by the software to be installed are greater than a threshold when the number of concurrent users is a first preset value; If the CPU resources required by the software to be installed are less than or equal to the threshold when the number of concurrent users is the first preset value, the CPU size of the cloud device on which the software to be installed is installed is configured to be the second preset value.

3. The method according to claim 1, characterized in that The step of obtaining the CPU resources required by the software to be installed under different numbers of concurrent users includes: Obtaining the running information of the software to be installed after installation to form a big data resource pool; The CPU resources required by the software to be installed under different numbers of concurrent users are obtained according to the big data resource pool.

4. The method according to claim 1, characterized in that The step of obtaining the CPU resources required by the software to be installed under different numbers of concurrent users includes: Obtaining the running information of the software to be installed in the test environment to form a big data resource pool; The CPU resources required by the software to be installed under different numbers of concurrent users are obtained according to the big data resource pool.

5. The method according to claim 1, characterized in that The obtaining the number of concurrent users of the software to be installed includes: The number of concurrent users of the software to be installed is predicted according to the number of users of the software to be installed and the running stage of the software to be installed, so as to obtain the number of concurrent users of the software to be installed.

6. A device for configuring a CPU, characterized in that: include: A demand acquisition unit, used for acquiring CPU resources required by the software to be installed under different numbers of concurrent users, including: acquiring the running information of the software to be installed after installation and the running information of the software to be installed in a test environment; combining the running information of the software to be installed after installation and the running information of the software to be installed in a test environment to form a big data resource pool, including: the running information of the software to be installed after installation includes that the CPU resources occupied by the software to be installed when the number of concurrent users is z is P, and in the test environment, when the number of concurrent users is z, the CPU resources occupied by the software to be installed is Q, then in the big data resource pool, when the number of concurrent users of the software to be installed is y, the CPU resources required are (P+Q) / 2, or a*P+b*Q, wherein a and b are constants greater than 0 and less than 1, and a+b=1; acquiring the CPU resources required by the software to be installed under different numbers of concurrent users according to the big data resource pool; A quantity acquisition unit, used to acquire the number of concurrent users of the software to be installed; A prediction unit, configured to predict the CPU resources required by the software to be installed according to the number of concurrent users of the software to be installed and the CPU resources required by the software to be installed under different numbers of concurrent users; The configuration unit is used to configure the CPU of the cloud device where the software to be installed is installed according to the CPU resources required by the software to be installed.

7. The device according to claim 6, characterized in that The device also includes: a determining unit, configured to determine, according to the running characteristics of the software to be installed, whether the CPU resources required by the software to be installed are greater than a threshold value when the number of concurrent users is a first preset value; The configuration unit is further configured to configure the CPU size of the cloud device on which the software to be installed is installed to a second preset value when the number of concurrent users is a first preset value and the CPU resources required by the software to be installed are less than or equal to the threshold.

8. A device for configuring a CPU, characterized in that: include: A memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the method for configuring a CPU as described in any one of claims 1 to 5 when calling the computer program.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for configuring a CPU as claimed in any one of claims 1 to 5 is implemented.