CN112346849A - Method and device for configuring CPU - Google Patents

Method and device for configuring CPU Download PDF

Info

Publication number
CN112346849A
CN112346849A CN201910734564.0A CN201910734564A CN112346849A CN 112346849 A CN112346849 A CN 112346849A CN 201910734564 A CN201910734564 A CN 201910734564A CN 112346849 A CN112346849 A CN 112346849A
Authority
CN
China
Prior art keywords
software
cpu
concurrent users
acquiring
different numbers
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910734564.0A
Other languages
Chinese (zh)
Inventor
张希成
李金诺
翁烨晖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201910734564.0A priority Critical patent/CN112346849A/en
Publication of CN112346849A publication Critical patent/CN112346849A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention provides a method and a device for configuring a CPU, relates to the technical field of computers, and is used for balancing the contradiction between the software running speed and the CPU resource waste. The method comprises the following steps: acquiring CPU resources required by software to be installed under the condition of different numbers of concurrent users; acquiring the number of concurrent users of software to be installed; predicting CPU resources required by the software to be installed according to the number of concurrent users of the software to be installed and CPU resources required by the software to be installed under the condition of different numbers of concurrent users; and configuring the CPU of the cloud equipment for installing the software to be installed according to the CPU resource required by the software to be installed. The embodiment of the invention is used for configuring the CPU of the cloud device.

Description

Method and device for configuring CPU
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for configuring a Central Processing Unit (CPU).
Background
An ECS (electronic computer Service) is a simple, efficient, safe, reliable, and flexible computing Service, and a user can quickly create or release any number of cloud servers without purchasing hardware through the ECS, so the ECS has gradually replaced a traditional server created by a physical machine, and becomes a mainstream development object of the server.
At present, when installing stand-alone software on a cloud server, a CPU of the cloud server is generally configured according to a universal template, and in order to balance a contradiction between a software running speed and CPU resource waste, the size of the CPU in the universal template is generally set to a moderate value. However, due to the difference between the operating characteristics of each piece of software and the number of concurrent users of each piece of software, the demands of different pieces of software on CPU resources are very different, for a piece of software with a high demand on CPU resources, if the CPU of the cloud server is configured according to the universal template, the CPU resources cannot meet the demands of the software on CPU resources, and thus the problem of a low operating speed after software installation may occur, and for a piece of software with a low demand on CPU resources, if the CPU of the cloud server is configured according to the universal template, the CPU resources are much larger than the demands of the software on CPU resources, and further resource waste is caused.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for configuring a CPU, so as to balance the contradiction between the software running speed and the CPU resource waste.
In order to achieve the above object, the embodiments of the present invention provide the following technical solutions:
in a first aspect, an embodiment of the present invention provides a method for configuring a CPU, including:
acquiring CPU resources required by software to be installed under the condition of different numbers of concurrent users;
acquiring 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 the concurrent users of the software to be installed and the CPU resources required by the software to be installed under the condition of different numbers of the concurrent users;
and configuring the CPU of the cloud equipment for installing the software to be installed according to the CPU resource required by the software to be installed.
As an optional implementation manner in the embodiment of the present invention, before obtaining CPU resources required by software to be installed under the condition of different numbers of concurrent users, the method further includes:
determining whether the CPU resource required by the software to be installed is greater than a threshold value under the condition that the concurrent user is a first preset value according to the operating characteristics of the software to be installed;
and if the concurrent user is the first preset value, when the CPU resource required by the software to be installed is less than or equal to the threshold value, configuring the size of the CPU of the cloud equipment for installing the software to be installed into a second preset value.
As an optional implementation manner of the embodiment of the present invention, the acquiring CPU resources required by software to be installed under the condition of different numbers of concurrent users includes:
acquiring the operation information of the software to be installed after installation to form a big data resource pool;
and acquiring CPU resources required by the software to be installed under the condition of different numbers of concurrent users according to the big data resource pool.
As an optional implementation manner of the embodiment of the present invention, the acquiring CPU resources required by software to be installed under the condition of different numbers of concurrent users includes:
acquiring running information of the software to be installed in a test environment to form a big data resource pool;
and acquiring CPU resources required by the software to be installed under the condition of different numbers of concurrent users according to the big data resource pool.
As an optional implementation manner of the embodiment of the present invention, the acquiring CPU resources required by software to be installed under the condition of different numbers of concurrent users includes:
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 the test environment to form a big data resource pool;
and acquiring CPU resources required by the software to be installed under the condition of different numbers of concurrent users according to the big data resource pool.
As an optional implementation manner of the embodiment of the present invention, the acquiring the number of concurrent users of the to-be-installed software includes:
and predicting the quantity of the concurrent users of the software to be installed according to the quantity of the users of the software to be installed and the operation stage of the software to be installed, and acquiring the quantity of the concurrent users of the software to be installed.
In a second aspect, an embodiment of the present invention provides an apparatus for configuring a CPU, including:
the system comprises a demand acquisition unit, a request processing unit and a processing unit, wherein the demand acquisition unit is used for acquiring CPU resources required by software to be installed under the condition of different numbers of concurrent users;
the quantity acquisition unit is used for acquiring the quantity of concurrent users of the software to be installed;
the predicting unit is used for predicting the CPU resource required by the software to be installed according to the number of the concurrent users of the software to be installed and the CPU resource required by the software to be installed under the condition of different numbers of the concurrent users;
and the configuration unit is used for configuring the CPU of the cloud equipment for installing the software to be installed according to the CPU resource required by the software to be installed.
As an optional implementation manner of the embodiment of the present invention, the apparatus further includes:
the determining unit is used for determining whether the CPU resource required by the software to be installed is greater than a threshold value under the condition that a concurrent user is a first preset value according to the operating characteristics of the software to be installed;
the configuration unit is further configured to configure, when the concurrent user is a first preset value, and when the CPU resource required by the software to be installed is less than or equal to the threshold, the size of the CPU of the cloud device on which the software to be installed is a second preset value.
As an optional implementation manner of the embodiment of the present invention, the requirement obtaining unit is specifically configured to obtain operation information of the software to be installed after installation, so as to form a big data resource pool; and acquiring CPU resources required by the software to be installed under the condition of different numbers of concurrent users according to the big data resource pool.
As an optional implementation manner of the embodiment of the present invention, the requirement obtaining unit is specifically configured to obtain operation information of the software to be installed in a test environment, so as to form a big data resource pool; and acquiring CPU resources required by the software to be installed under the condition of different numbers of concurrent users according to the big data resource pool.
As an optional implementation manner of the embodiment of the present invention, the requirement obtaining unit is specifically configured to obtain operation information of the to-be-installed software after installation and operation information of the to-be-installed software 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 acquiring CPU resources required by the software to be installed under the condition of different numbers of concurrent users according to the big data resource pool.
As an optional implementation manner of the embodiment of the present invention, the number obtaining unit is specifically configured 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.
In a third aspect, an embodiment of the present invention provides an apparatus for configuring a CPU, including: a memory for storing a computer program and a processor; the processor is configured to execute the method for configuring a CPU according to the first aspect or any embodiment of the first aspect when the computer program is called.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for configuring a CPU according to the first aspect or any embodiment of the first aspect.
The method for configuring the CPU provided by the embodiment of the invention comprises the steps of firstly obtaining the CPU resources required by the software to be installed under the condition of different numbers of concurrent users and the number of the concurrent users of the software to be installed, then predicting the CPU resources required by the software to be installed according to the number of the concurrent users of the software to be installed and the CPU resources required by the software to be installed under the condition of different numbers of the concurrent users, and finally configuring the CPU of the cloud device for installing the software to be installed according to the CPU resources required by the software to be installed. The problem that the CPU configured for the cloud device is too large or too small can not occur, so that the running speed of the software to be installed can be prevented from being influenced, and the waste of CPU resources can be avoided, and therefore the contradiction between the running speed of the software and the waste of the CPU resources can be balanced.
Drawings
Fig. 1 is a schematic flowchart of a method for configuring a CPU according to an embodiment of the present invention;
FIG. 2 is a second flowchart illustrating a method for configuring a CPU according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an apparatus for configuring a CPU according to an embodiment of the present invention;
FIG. 4 is a second schematic structural diagram of an apparatus for configuring a CPU according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a hardware structure of an apparatus for configuring a CPU according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship; in the formula, the character "/" indicates that the preceding and following related objects are in a relationship of "division". The term "plurality" herein means two or more, unless otherwise specified.
For the convenience of clearly describing the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, the terms "first" and "second" are used to distinguish the same items or similar items with basically the same functions or actions, and those skilled in the art can understand that the terms "first" and "second" are not limited to the quantity and execution order.
In the embodiments of the present invention, words such as "exemplary" or "for example" are used to mean serving as examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion. In the embodiments of the present invention, the meaning of "a plurality" means two or more unless otherwise specified.
The execution main body of the method for configuring the CPU provided in the embodiment of the present invention may be a device for configuring the CPU, and the specific device for configuring the CPU may be a terminal device such as a mobile phone, a tablet computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), a smart watch, and a smart band, or the device for configuring the CPU may also be another type of terminal device, which is not limited in the embodiment of the present application.
An embodiment of the present invention provides a method for configuring a CPU, and specifically, referring to fig. 1, the method for configuring a CPU may include the following steps:
and S11, acquiring CPU resources required by the software to be installed under the condition of different numbers of concurrent users.
Specifically, the number of concurrent users in the embodiment of the present invention refers to the number of users interacting with the software to be installed at the same time.
As an optional implementation manner of the embodiment of the present invention, the implementation manner of the step S11 (obtaining the CPU resources required by the software to be installed in the case of different numbers of concurrent users) may be to include the following step a and step b.
Step a, obtaining the operation information of the software to be installed after installation to form a big data resource pool.
And b, acquiring CPU resources required by the software to be installed under the condition of different numbers of concurrent users according to the big data resource pool.
Specifically, the running information of the software to be installed after installation includes: the number of concurrent users and the occupied CPU resource of the software to be installed during running; the corresponding relation between the number of different concurrent users of the software to be installed and the required CPU resource can be determined according to the multi-time running information of the plurality of pieces of software to be installed, and then the corresponding relation between the number of different concurrent users of the software to be installed and the required CPU resource is combined into a big data resource pool.
As an optional implementation manner of the embodiment of the present invention, the implementation manner of the step S11 (obtaining the CPU resources required by the software to be installed in the case of different numbers of concurrent users) may be as follows.
And step I, acquiring the running information of the software to be installed in the test environment to form a big data resource pool.
Specifically, in the test environment, the number of concurrent users can be set arbitrarily, and further, the CPU resources occupied by the software to be installed under the conditions of different concurrent users are read. For example: the number of concurrent users can be set to 10, 50, 100, 150, so as to obtain the CPU resources occupied by the software to be installed when the number of concurrent users is 10, 50, 100, 150.
And II, acquiring CPU resources required by the software to be installed under the condition of different numbers of concurrent users according to the big data resource pool.
Similarly, the running information of the software to be installed in the test environment includes: the number of concurrent users and the occupied CPU resource of the software to be installed during running; the corresponding relation between the number of different concurrent users of the software to be installed and the required CPU resource can be determined by acquiring the running information under a plurality of test environments, and then the corresponding relation between the number of different concurrent users of the software to be installed and the required CPU resource is combined into a big data resource pool.
As an optional implementation manner of the embodiment of the present invention, the implementation manner of step S11 (obtaining the CPU resources required by the software to be installed in the case of different numbers of concurrent users) may be to include the following steps 1) and 4).
1) And acquiring the operation information of the software to be installed after installation.
2) And acquiring the running information of the software to be installed in the test environment.
3) And 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.
Specifically, 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, including the following conditions:
firstly, the installed running information does not include CPU resources required by the software to be installed when the number of concurrent users is x; in a test environment, when the number of concurrent users is x, the CPU resource occupied by the software to be installed is M, and the CPU resource required by the software to be installed in the big data resource pool when the number of concurrent users is x is M.
Secondly, the installed running information comprises N CPU resources occupied by the software to be installed when the number of concurrent users is y; and if the running information under the test environment does not include the CPU resources occupied by the software to be installed when the number of the concurrent users is y, the CPU resources required by the software to be installed when the number of the concurrent users is y in the big data resource pool are N.
Thirdly, the running information of the software to be installed after installation comprises P CPU resources occupied by the software to be installed when the number of concurrent users is z; under a test environment, when the number of concurrent users is z, the CPU resource occupied by the software to be installed is Q, and the CPU resource required when the number of concurrent users of the software to be installed is y in the big data resource pool 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 is 1.
4) And acquiring CPU resources required by the software to be installed under the condition of different numbers of concurrent users according to the big data resource pool.
And S12, acquiring the number of concurrent users of the software to be installed.
I.e. the number of users interacting simultaneously with the software to be installed is obtained.
As an alternative embodiment of the present invention, the step S12 (obtaining the number of concurrent users of the software to be installed) may include:
and predicting the quantity of the concurrent users of the software to be installed according to the quantity of the users of the software to be installed and the operation stage of the software to be installed, and acquiring the quantity of the concurrent users of the software to be installed.
Specifically, the number of users of the software to be installed may be provided by an enterprise or an entity that will use the software to be installed, for example: the number of the users of the software to be installed can be determined to be 300 at the moment when the user of the software to be installed is a certain unit, the number of the employees of the unit is 300, and all the employees of the unit need to use the software to be installed. Of course, the number of users of the software to be installed may also be obtained by prediction according to the applicable population of the software to be installed, and the implementation manner of obtaining the number of users of the software to be installed is not limited in the embodiment of the present invention.
Furthermore, the number of concurrent users of the software may change in different operation stages, so that when the concurrent users of the software are predicted, the number of concurrent users of the software can be predicted more accurately by using the operation stage of the software as one of the reference factors.
It should be noted that, in some cases, the number of users of the software to be installed in the embodiment of the present invention is not equal to the number of concurrent users of the software to be installed, for example: the number of the users for installing the software is determined to be 300 by the number of employees of the unit using the software to be installed, but the unit implements a two-shift system, the number of the users on two shifts is 150 respectively, and at the moment, the number of the concurrent users for installing the software is predicted on the basis of 150 persons and is not equal to the number of the users for installing the software, which is 300.
S13, predicting the CPU resource required by the software to be installed according to the number of the concurrent users of the software to be installed and the CPU resource required by the software to be installed under the condition of different numbers of the concurrent users.
For example: the CPU resources required by the software to be installed in the step S11 under the condition of different numbers of concurrent users are obtained as shown in table 1 below:
TABLE 1
Number of concurrent users CPU requirements
10 1
50 4
100 8
150 16
200 16
300 32
1000 64
If the number of concurrent users of the to-be-installed software obtained in step S12 is 100, it is predicted that the CPU resource required by the to-be-installed software is a CPU resource of 8 units.
S14, configuring the CPU of the cloud equipment for installing the software to be installed according to the CPU resource required by the software to be installed.
It should be noted that, the CPU of the cloud device for installing the software to be installed is configured according to the CPU resource required by the software to be installed, the size of the CPU of the cloud device for installing the software to be installed may be equal to the CPU resource required by the software to be installed, or the difference between the size of the CPU of the cloud device for installing the software to be installed and the CPU resource required by the software to be installed may be within a certain range.
The method for configuring the CPU provided by the embodiment of the invention comprises the steps of firstly obtaining the CPU resources required by the software to be installed under the condition of different numbers of concurrent users and the number of the concurrent users of the software to be installed, then predicting the CPU resources required by the software to be installed according to the number of the concurrent users of the software to be installed and the CPU resources required by the software to be installed under the condition of different numbers of the concurrent users, and finally configuring the CPU of the cloud device for installing the software to be installed according to the CPU resources required by the software to be installed. The problem that the CPU configured for the cloud device is too large or too small can not occur, so that the running speed of the software to be installed can be prevented from being influenced, and the waste of CPU resources can be avoided, and therefore the contradiction between the running speed of the software and the waste of the CPU resources can be balanced.
As an optional implementation manner of the embodiment of the present invention, referring to fig. 2, before step S11 (obtaining CPU resources required by software to be installed in the case of different numbers of concurrent users), the method for configuring a CPU according to the embodiment of the present invention further includes:
s21, determining whether the CPU resource required by the software to be installed is greater than a threshold value under the condition that the number of concurrent users is a first preset value according to the operating characteristics of the software to be installed.
Illustratively, the first preset value may be 1.
Specifically, the operating characteristics of the software to be installed may specifically include: whether the software to be installed is demonstration type software or calculation type software, and when the software to be installed is calculation type software, the calculation amount and the response speed of the software to be installed during calculation. For example: in the case that the software to be installed is view-type software, the software to be installed calls a background calculation program and data through an interface, so that in this case, the CPU resource required by the software to be installed is smaller than a threshold, for example: in the case that the software to be installed is data processing software, the software to be installed needs to perform complex calculation and is required to have high input/output speed, so that in this case, when the concurrent user is the first preset value, the CPU resource required by the software to be installed is greater than the threshold.
For example, the threshold may be one thousandth or one ten thousandth of the computing resources of the CPU set to 1 unit.
In the step S21, if the CPU resource required by the software to be installed is less than or equal to the threshold value when the concurrent user is the first preset value, then the following step S22 is executed; and if the CPU resource required by the software to be installed is greater than the threshold value under the condition that the concurrent user is the first preset value, executing the steps S11 to S14.
And S22, configuring the size of the CPU of the cloud equipment provided with the software to be installed to a second preset value.
Specifically, the threshold and the preset value in the embodiment of the present invention may be set according to the estimated number of concurrent users and the CPU resource included in 1 unit of CPU when performing CPU configuration. For example: the estimated number of concurrent users is 500, and if the CPU resource contained in 1 unit of CPU is 1024, the threshold value can be set to 10, and the second preset value can be set to 1024; for another example: the estimated number of concurrent users is 3500, and if the computing resources of 1 unit of CPU are 2048, the threshold value may be set to 5, and the second preset value may be set to 2048. That is, if 1 unit of CPU can meet the requirement of the software to be installed on the CPU when the number of concurrent users is the largest, the CPU of the software to be installed can be directly configured as the CPU of 1 unit.
In the above embodiment, it is first determined, according to the operating characteristics of the software to be installed, whether the CPU resource required by the software to be installed is greater than a threshold value when the concurrent user is a first preset value, and if the CPU resource required by the software to be installed is less than or equal to the threshold value when the concurrent user is the first preset value, the size of the CPU of the cloud device on which the software to be installed is directly configured to be a second preset value; if the CPU resource required by the software to be installed is smaller than or equal to the threshold value when the concurrent user is the first preset value, a small amount of CPU resource can meet the requirement of the software to be installed on the CPU when the concurrent user is the most, the size of the CPU of the cloud device of the software to be installed is directly configured to be the second preset value, on the basis of ensuring the running speed of the software and not wasting a large amount of CPU resource, the steps of acquiring the CPU resource required by the software to be installed under the condition of different amounts of concurrent users, acquiring the amount of the concurrent users of the software to be installed and the like can be avoided, and further the method flow for configuring the CPU is simplified.
According to the method, the terminal device and the like can be divided into the functional modules. For example, the functional blocks may be divided for the respective functions, or two or more functions may be integrated into one block. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation.
In the case of using an integrated unit, fig. 3 shows a schematic diagram of a possible structure of the apparatus for configuring a CPU in the above embodiment, where the apparatus 300 for configuring a CPU includes:
a requirement obtaining unit 31, configured to obtain CPU resources required by the software to be installed under the condition of different numbers of concurrent users;
a number obtaining unit 32, configured to obtain the number of concurrent users of the software to be installed;
the predicting unit 33 is configured to predict the CPU resource required by the software to be installed according to the number of concurrent users of the software to be installed and the CPU resource required by the software to be installed in the case of different numbers of concurrent users;
and the configuration unit 34 is configured to configure the CPU of the cloud device for installing the software to be installed according to the CPU resource required by the software to be installed.
As an alternative implementation manner of the embodiment of the present invention, referring to fig. 4, the apparatus 300 for configuring a CPU further includes:
the determining unit 35 is configured to determine, according to the operating characteristic of the to-be-installed software, whether a CPU resource required by the to-be-installed software is greater than a threshold value when a concurrent user is a first preset value;
the configuration unit 34 is further configured to configure, when the concurrent user is a first preset value, and when the CPU resource required by the software to be installed is less than or equal to the threshold, the size of the CPU of the cloud device on which the software to be installed is a second preset value.
As an optional implementation manner of the embodiment of the present invention, the requirement obtaining unit 31 is specifically configured to obtain operation information of the software to be installed after installation, so as to form a big data resource pool; and acquiring CPU resources required by the software to be installed under the condition of different numbers of concurrent users according to the big data resource pool.
As an optional implementation manner of the embodiment of the present invention, the requirement obtaining unit 31 is specifically configured to obtain operation information of the software to be installed in a test environment, so as to form a big data resource pool; and acquiring CPU resources required by the software to be installed under the condition of different numbers of concurrent users according to the big data resource pool.
As an optional implementation manner of the embodiment of the present invention, the requirement obtaining unit 31 is specifically configured to obtain operation information of the to-be-installed software after installation and operation information of the to-be-installed software 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 acquiring CPU resources required by the software to be installed under the condition of different numbers of concurrent users according to the big data resource pool.
As an optional implementation manner of the embodiment of the present invention, the number obtaining unit 32 is specifically configured 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.
The device for configuring the CPU provided by the embodiment of the invention comprises: the device comprises a demand acquisition unit, a quantity acquisition unit, a prediction unit and a configuration unit; the device for configuring the CPU can predict the CPU resource actually required by the software to be installed and configure the CPU of the cloud device for installing the software to be installed on the basis of the CPU resource actually required by the software to be installed, so that the CPU configured for the cloud device can be adapted to the requirement of the software to be installed on the CPU, the problem that the CPU configured for the cloud device is too large or too small can not occur, so that the running speed of the software to be installed can be prevented from being influenced, and the waste of CPU resources can be avoided, and therefore the contradiction between the running speed of the software and the waste of the CPU resources can be balanced.
Based on the same inventive concept, the embodiment of the invention also provides a device for configuring the CPU. Fig. 5 is a schematic structural diagram of a device for configuring a CPU according to an embodiment of the present invention, and as shown in fig. 5, the device for configuring a CPU according to the embodiment includes: a memory 51 and a processor 52, the memory 51 being for storing computer programs; the processor 52 is configured to execute the method for configuring the CPU according to the above-described method embodiment when the computer program is called.
The apparatus for configuring a CPU provided in this embodiment may execute the method for configuring a CPU provided in the foregoing method embodiment, and the implementation principle and the technical effect are similar, which are not described herein again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the method for configuring a CPU according to the above-mentioned method embodiment.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied in the medium.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer readable media include both permanent and non-permanent, removable and non-removable storage media. Storage media may implement information storage by any method or technology, and the information may be computer-readable instructions, data structures, modules of a program, 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 disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method of configuring a CPU, comprising:
acquiring CPU resources required by software to be installed under the condition of different numbers of concurrent users;
acquiring 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 the concurrent users of the software to be installed and the CPU resources required by the software to be installed under the condition of different numbers of the concurrent users;
and configuring the CPU of the cloud equipment for installing the software to be installed according to the CPU resource required by the software to be installed.
2. The method according to claim 1, wherein before acquiring the CPU resources required by the software to be installed in different numbers of concurrent users, the method further comprises:
determining whether the CPU resource required by the software to be installed is greater than a threshold value when the number of concurrent users is a first preset value according to the operating characteristics of the software to be installed;
if the number of concurrent users is smaller than or equal to the threshold value, the size of the CPU of the cloud device for installing the software to be installed is configured to be a second preset value.
3. The method according to claim 1, wherein the obtaining of the CPU resources required by the software to be installed in the case of different numbers of concurrent users comprises:
acquiring the operation information of the software to be installed after installation to form a big data resource pool;
and acquiring CPU resources required by the software to be installed under the condition of different numbers of concurrent users according to the big data resource pool.
4. The method according to claim 1, wherein the obtaining of the CPU resources required by the software to be installed in the case of different numbers of concurrent users comprises:
acquiring running information of the software to be installed in a test environment to form a big data resource pool;
and acquiring CPU resources required by the software to be installed under the condition of different numbers of concurrent users according to the big data resource pool.
5. The method according to claim 1, wherein the obtaining of the CPU resources required by the software to be installed in the case of different numbers of concurrent users comprises:
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 the test environment to form a big data resource pool;
and acquiring CPU resources required by the software to be installed under the condition of different numbers of concurrent users according to the big data resource pool.
6. The method according to claim 1, wherein the obtaining the number of concurrent users of the software to be installed comprises:
and predicting the quantity of the concurrent users of the software to be installed according to the quantity of the users of the software to be installed and the operation stage of the software to be installed, and acquiring the quantity of the concurrent users of the software to be installed.
7. An apparatus for configuring a CPU, comprising:
the system comprises a demand acquisition unit, a request processing unit and a processing unit, wherein the demand acquisition unit is used for acquiring CPU resources required by software to be installed under the condition of different numbers of concurrent users;
the quantity acquisition unit is used for acquiring the quantity of concurrent users of the software to be installed;
the predicting unit is used for predicting the CPU resource required by the software to be installed according to the number of the concurrent users of the software to be installed and the CPU resource required by the software to be installed under the condition of different numbers of the concurrent users;
and the configuration unit is used for configuring the CPU of the cloud equipment for installing the software to be installed according to the CPU resource required by the software to be installed.
8. The apparatus of claim 6, further comprising:
the determining unit is used for determining whether the CPU resource required by the software to be installed is greater than a threshold value under the condition that a concurrent user is a first preset value according to the operating characteristics of the software to be installed;
the configuration unit is further configured to configure the size of the CPU of the cloud device on which the software to be installed is installed to a second preset value when the concurrent user is the first preset value and the CPU resource required by the software to be installed is less than or equal to the threshold value.
9. An apparatus for configuring a CPU, comprising: a memory for storing a computer program and a processor; the processor is adapted to execute the method of configuring a CPU according to any one of claims 1-6 when invoking the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of configuring a CPU according to any one of claims 1 to 6.
CN201910734564.0A 2019-08-09 2019-08-09 Method and device for configuring CPU Pending CN112346849A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910734564.0A CN112346849A (en) 2019-08-09 2019-08-09 Method and device for configuring CPU

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910734564.0A CN112346849A (en) 2019-08-09 2019-08-09 Method and device for configuring CPU

Publications (1)

Publication Number Publication Date
CN112346849A true CN112346849A (en) 2021-02-09

Family

ID=74367706

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910734564.0A Pending CN112346849A (en) 2019-08-09 2019-08-09 Method and device for configuring CPU

Country Status (1)

Country Link
CN (1) CN112346849A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113609027A (en) * 2021-08-31 2021-11-05 北京百度网讯科技有限公司 ARM cloud server testing method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488538A (en) * 2013-09-02 2014-01-01 用友软件股份有限公司 Application extension device and application extension method in cloud computing system
CN103544103A (en) * 2013-09-02 2014-01-29 烟台中科网络技术研究所 Method and system for test, simulation and concurrence of software performance
CN104283946A (en) * 2014-09-26 2015-01-14 东北大学 Resource self-adaptive adjusting system and method of multiple virtual machines under single physical machine
CN107066314A (en) * 2017-05-24 2017-08-18 成都四象联创科技有限公司 Software reconfiguration method based on Open Framework
EP3401787A1 (en) * 2017-05-11 2018-11-14 Accenture Global Solutions Limited Analyzing resource utilization of a cloud computing resource in a cloud computing environment
CN109412829A (en) * 2018-08-30 2019-03-01 华为技术有限公司 A kind of prediction technique and equipment of resource distribution

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488538A (en) * 2013-09-02 2014-01-01 用友软件股份有限公司 Application extension device and application extension method in cloud computing system
CN103544103A (en) * 2013-09-02 2014-01-29 烟台中科网络技术研究所 Method and system for test, simulation and concurrence of software performance
CN104283946A (en) * 2014-09-26 2015-01-14 东北大学 Resource self-adaptive adjusting system and method of multiple virtual machines under single physical machine
EP3401787A1 (en) * 2017-05-11 2018-11-14 Accenture Global Solutions Limited Analyzing resource utilization of a cloud computing resource in a cloud computing environment
CN107066314A (en) * 2017-05-24 2017-08-18 成都四象联创科技有限公司 Software reconfiguration method based on Open Framework
CN109412829A (en) * 2018-08-30 2019-03-01 华为技术有限公司 A kind of prediction technique and equipment of resource distribution

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘婧珏;: "基于SaaS的云平台物理资源监控与调度***研究", 呼伦贝尔学院学报, no. 05, 30 October 2018 (2018-10-30) *
肖明清;杨召;薛辉辉;唐希浪;邓俊;: "云计算及其在测试领域的应用探索", 空军工程大学学报(自然科学版), no. 01, 25 February 2015 (2015-02-25) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113609027A (en) * 2021-08-31 2021-11-05 北京百度网讯科技有限公司 ARM cloud server testing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106899666B (en) Data processing method and device for service identification
CN110008018A (en) A kind of batch tasks processing method, device and equipment
CN109343793B (en) Data migration method and device
CN108243032B (en) Method, device and equipment for acquiring service level information
CN111552945B (en) Resource processing method, device and equipment
CN113535721A (en) Data writing method and device
CN111324533A (en) A/B test method and device and electronic equipment
CN110245978B (en) Method and device for evaluating and selecting policies in policy group
CN113760516A (en) Elastic expansion method, device, equipment and medium in multi-cloud environment
CN106293890B (en) A kind of method and device for business processing based on complexity
CN112346849A (en) Method and device for configuring CPU
US20200142822A1 (en) Multi-tenant cloud elastic garbage collector
CN111949297B (en) Block chain intelligent contract upgrading method and device and electronic equipment
CN117130979A (en) Service resource migration method and device and electronic equipment
CN107392408B (en) Credit score prompt information output method and device
CN108470242B (en) Risk management and control method, device and server
CN112346850B (en) Method and device for configuring memory
CN112346649A (en) Method and device for configuring disk
CN111158940B (en) Method and device for docking and dynamically loading different devices in field of Internet of things
CN115442262A (en) Resource evaluation method and device, electronic equipment and storage medium
CN109345300B (en) Data statistical method and device
CN109656805B (en) Method and device for generating code link for business analysis and business server
US11762751B2 (en) System-level tunable parameter identification
CN111090516B (en) Request distribution method, device and equipment
CN109615234B (en) Resource change condition determining method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination