CN116360991A - Example calculation force adjusting method and device, electronic equipment and storage medium - Google Patents

Example calculation force adjusting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116360991A
CN116360991A CN202310323306.XA CN202310323306A CN116360991A CN 116360991 A CN116360991 A CN 116360991A CN 202310323306 A CN202310323306 A CN 202310323306A CN 116360991 A CN116360991 A CN 116360991A
Authority
CN
China
Prior art keywords
instance
force
calculation
physical machine
physical
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
CN202310323306.XA
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.)
Alibaba China Co Ltd
Original Assignee
Alibaba China 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 Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202310323306.XA priority Critical patent/CN116360991A/en
Publication of CN116360991A publication Critical patent/CN116360991A/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/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Feedback Control In General (AREA)

Abstract

The application discloses an example calculation force adjusting method, an example calculation force adjusting device, electronic equipment and a storage medium, wherein the method comprises the following steps: determining a computational power discount coefficient based on the specifications of the instance; determining the physical cores occupied by the instance on the target physical machine; and adjusting the operation parameters of the physical core operation instance by using the calculated discount coefficient. Because the instance runs on the physical core of the physical machine, the operation parameters of the physical core are adjusted by acquiring the calculation discount coefficient of the instance on the target physical machine through the specification of the instance, and the function of adjusting the calculation of the instance can be achieved. Because the calculation force discount coefficient is used for adjusting the calculation force obtained by the instance with the same specification on the target physical machine to be the same as the calculation force obtained by other physical machines, the calculation force discount coefficient of the instance with the same specification on the physical machines of different hardware platforms is different, thereby reducing the difference of the calculation force obtained by the instance with the same specification on the physical machines of different hardware platforms and bringing the experience of performance consistency to users.

Description

Example calculation force adjusting method and device, electronic equipment and storage medium
Technical Field
The application relates to the technical field of cloud computing, in particular to an example computing force adjusting method, an example computing force adjusting device, electronic equipment and a storage medium.
Background
The cloud service instance, i.e. the instance of the cloud server, is an independent computing unit virtualized in the cloud computing resource and comprises a vCPU (virtual Central Processing Unit, virtual processor), a memory, an operating system, a network, a disk and other basic computing components, and a user can select and change the specification configuration of the instance by himself, so that the computing power obtained by the instances with different specifications on a physical machine is different.
With the continuous updating iteration of the physical machine, as the bottom hardware platforms of different generation physical machines have differences, the instances with the same specification can obtain different calculation forces on the different generation physical machines, so that the running performance of the instances with the same specification on the different generation physical machines has differences, and bad experience is brought to users.
Disclosure of Invention
The present application aims to provide an example computing power adjusting method, an example computing power adjusting device, an electronic device and a storage medium, which are aimed at the defects of the prior art, and the aim is achieved through the following technical schemes.
A first aspect of the present application proposes a method for adjusting an example computing force, the method comprising:
determining, based on a specification of an instance, a computational power discount coefficient for the instance, the computational power discount coefficient for adjusting a computational power obtained by the instance of the specification on the target physical machine to be the same as a computational power obtained on other physical machines, the target physical machine being different from hardware platforms of the other physical machines;
determining a physical core occupied by the instance on the target physical machine;
and adjusting the operation parameters of the physical core for operating the instance by using the calculated force discount coefficient.
A second aspect of the present application proposes an example calculation force adjustment device, characterized in that it comprises:
a coefficient determination module for determining a computational power discount coefficient of an instance based on a specification of the instance, the computational power discount coefficient being used for adjusting a computational power obtained by the instance of the specification on the target physical machine to be the same as a computational power obtained on other physical machines, the target physical machine being different from a hardware platform of the other physical machines;
the physical core determining module is used for determining the physical core occupied by the instance on the target physical machine;
and the parameter adjustment module is used for adjusting the operation parameters of the physical core for operating the instance by using the calculated force discount coefficient.
A third aspect of the present application proposes an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, said processor executing said program to carry out the steps of the method according to the first aspect described above.
A fourth aspect of the present application proposes a computer readable storage medium having stored thereon a computer program, the program being executed by a processor to implement the steps of the method as described in the first aspect above.
Based on the example computing force adjusting method and device described in the first aspect and the second aspect, the present application has at least the following beneficial effects or advantages:
the calculation force discount coefficient of the instance is obtained based on the specification of the instance, and the instance runs on the physical core of the physical machine, so that the calculation force of the instance on the target physical machine can be obtained by adjusting the running parameters of the physical core occupied by the instance on the target physical machine through the calculation force discount coefficient. And because the calculation force discount coefficient is used for adjusting the calculation force obtained by the instance with the same specification on the target physical machine to be the same as the calculation force obtained by other physical machines, the calculation force discount coefficient of the instance with the same specification on the physical machines of different hardware platforms is different, so that the difference of calculation force obtained by the instance with the same specification on the physical machines of different hardware platforms can be reduced, the difference of the running performance of the instance with the same specification on the physical machines of different hardware platforms is reduced, and the experience of performance consistency is brought to users.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
FIG. 1 is a flow chart illustrating an embodiment of a method of adjusting an example computing force, according to an example embodiment;
FIG. 2 is a flow chart illustrating the establishment of a rebate table for a target physical machine, according to an exemplary embodiment;
FIG. 3 is a particular flow diagram illustrating an example computational force adjustment according to an example embodiment;
FIG. 4 is a particular flow diagram illustrating another example computing force adjustment, according to an example embodiment;
FIG. 5 is a schematic diagram of an example force adjustment device according to an example embodiment;
fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an exemplary embodiment;
fig. 7 is a schematic diagram illustrating a structure of a storage medium according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first message may also be referred to as a second message, and similarly, a second message may also be referred to as a first message, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
FIG. 1 is a flowchart of an example computing force adjustment method embodiment, according to an example embodiment, including the steps of:
step 101: a computing power discount coefficient of the instance is determined based on the specification of the instance, the computing power discount coefficient being used to adjust computing power obtained by the instance of the specification on the target physical machine to be the same as computing power obtained on other physical machines, and the target physical machine being different from hardware platforms of the other physical machines.
The instance can be an instance of a cloud server, which can be understood as a virtual machine, so that the purposes of building a website, deploying an application, testing codes and the like can be achieved, and a user can select instance configuration according to actual requirements. The hardware platform, namely the hardware micro-architecture design, is evolved into physical machines of different hardware micro-architecture designs along with continuous updating and iteration of the physical machines, the hardware micro-architecture design comprises the designs of the number of physical cores on a physical CPU, the running frequency of the physical cores, the cache size and the like, and the hardware micro-architecture design is remarkable in that although the target physical machine is different from the hardware platform of other physical machines, the instruction set used by the physical CPU of the target physical machine is consistent with the instruction set used by the physical CPU of the other physical machines, and the instruction set comprises a simplified instruction set and a complex instruction set.
In an exemplary scenario, the target physical machine may be to obtain the computational force discount coefficient of the instance according to the specification of the instance when the instance is created, so as to adjust the computational force obtained by the instance in the subsequent instance running.
In another exemplary scenario, the target physical machine may be to obtain the computational discount coefficient of the instance according to the specification of the migrated instance when the instance migration task is received, so as to adjust the computational power obtained by the instance in the subsequent instance running.
In this embodiment, the specification of an instance includes configurations of vCPU and memory, and the like, and different instance specifications provide different computing capabilities, for example, for an instance of 2C4G specification, it means that the running of the instance requires 2 vCPU and 4G memory space.
In an alternative embodiment, the computing power discount coefficient corresponding to the target specification family can be searched in the computing power discount table by determining the target specification family to which the specification of the example belongs and acquiring a pre-established computing power discount table of the target physical machine.
The power calculation discount table records the mapping relation between each specification family and the power calculation discount coefficient in different specification families supported by the target physical machine, the power calculation discount coefficients corresponding to different specification families are different, and the power calculation discount coefficients corresponding to the same specification family on the physical machines of different hardware platforms are also different.
Generally, according to the use scenario, the specification groups can be divided into multiple instance specification groups, and according to the configurations such as vCPU and memory, one instance specification group is further divided into multiple instance specifications, so that according to the instance specifications, the specification group to which the instance specification group belongs can be obtained.
Optionally, when the target physical machine is online, a corresponding computing power discount table may be configured for the target physical machine, or the target physical machine may acquire the corresponding computing power discount table from a specific machine and store the computing power discount table locally.
It should be noted that, for specific implementation of the calculation discount table establishment process of the target physical machine, reference may be made to the related description in the following embodiments, which is not described in detail herein.
Step 102: the physical cores occupied by the instance on the target physical machine are determined.
The target physical machine allocates corresponding physical cores to run the instance according to the specification of the instance, so that the instance occupies at least one physical core on the target physical machine, and a vCPU scheduler on the physical core schedules a corresponding number of vCPUs to execute the instance according to the specification of the instance.
Step 103: and adjusting the operation parameters of the physical core for operating the instance by using the calculated discount coefficient.
Wherein, a physical core, i.e. a CPU core, may have 1 or more physical cores, and each physical core schedules a vCPU to run a program by a vCPU scheduler according to a certain scheduling period.
In this embodiment, when the physical core runs the instance, the operating parameters of the physical core are different, so that the computing power obtained by the instance is different, and therefore, the purpose of adjusting the computing power obtained by the instance can be achieved by adjusting the operating parameters of the physical core running the instance by using the computing power discount coefficient.
Alternatively, the operating parameters of the physical cores may include the operating time, operating frequency, etc. allocated for the vCPU.
It should be noted that, for the specific implementation of step 103, reference may be made to the following description of the embodiments, which is not described in detail herein.
Thus, the example calculation force adjustment flow shown in fig. 1 is completed, and the calculation force discount coefficient of the example is obtained based on the specification of the example, and the example runs on the physical core of the physical machine, so that the operation parameter of the physical core occupied by the example on the target physical machine can be adjusted through the calculation force discount coefficient, and the effect of obtaining calculation force on the target physical machine by the example can be adjusted. And because the calculation force discount coefficient is used for adjusting the calculation force obtained by the instance with the same specification on the target physical machine to be the same as the calculation force obtained by other physical machines, the calculation force discount coefficient of the instance with the same specification on the physical machines of different hardware platforms is different, thereby reducing the difference of calculation force obtained by the instance with the same specification on the physical machines of different hardware platforms, reducing the difference of the running performance of the instance with the same specification on the physical machines of different hardware platforms, and bringing the experience of performance consistency to users.
Based on the embodiment shown in fig. 1, fig. 2 is a flowchart for establishing a computing power discount table of a target physical machine according to an exemplary embodiment, where the establishing process includes the following steps:
step 201: and determining a specification family supported by the target physical machine.
The specification families supported by the target physical machine refer to which specification families exist in the examples which can be operated by the hardware platform of the target physical machine.
Step 202: and determining a corresponding computational power discount coefficient of the specification family, wherein the computational power discount coefficient is used for adjusting the computational power obtained on a target physical machine by an instance belonging to the specification family to be the same as the computational power obtained on a reference physical machine, and the reference physical machine is the machine with the weakest hardware platform performance in the physical machines supporting the specification family.
The least powerful machine that the hardware platform performs on is the least available computing power on that machine for those specification family instances.
Alternatively, the reference physical machine may be a single physical core machine that supports these specification families.
Specifically, since there are a plurality of specification families supported by the target physical machine, it is necessary to determine a corresponding calculation discount coefficient for each specification family.
In this embodiment, the value range of the calculated force discount coefficient is between 0 and 1. When the value of the calculation force discount coefficient is 0, the calculation force obtained by the example is represented as 0, and when the value of the calculation force discount coefficient is 1, the calculation force obtained by the example is represented as the calculation force obtained without adjusting the calculation force.
It can be appreciated that, because the computing power obtained by the example on the reference physical machine is the lowest relative to the computing power obtained on the other physical machines, the computing power discount coefficients corresponding to each specification family on the reference physical machine may all take a value of 1, which means that no computing power adjustment is required, and for physical machines with higher hardware platform performance, the computing power discount coefficients take a value that is correspondingly smaller.
In an actual application scene, the physical machines of different hardware platforms are usually distinguished by adopting model algebra, and the higher the model algebra of the physical machine is, the stronger the performance of the hardware platform is, so that the corresponding calculated discount coefficient of the same specification family on the physical machine of a higher-generation model is smaller than the corresponding calculated discount coefficient on the physical machine of a lower-generation model.
For example, as shown in table 1, the corresponding discount coefficient of the specification family a on the physical machines of different model algebra, it can be seen from table 1 that the discount coefficient of the physical machine of the lowest model 5 generation takes a value of 1, and the discount coefficient of the physical machine of the higher generation is smaller, that is, the discount coefficient of the physical machine of the 7 generation is 0.6, which is smaller than the discount coefficient of the physical machine of the 6 generation.
Figure BDA0004152851470000051
TABLE 1
In an alternative embodiment, the computational power discount coefficient for each specification family may be adjusted in a recursive iterative manner such that the computational power obtained on the target physical machine by the instance of that specification family differs as little as possible from the computational power obtained on the reference physical machine.
The adjustment process of the calculated discount coefficient for each specification family includes:
firstly, acquiring a first calculation force and a second calculation force respectively acquired on a target physical machine and a reference physical machine by an example belonging to the specification family;
then, under the condition that the difference value between the first computing force and the second computing force is larger than a threshold value, adjusting the current computing force discount coefficient of the target physical machine based on the first computing force and the second computing force;
and then, adjusting the operation parameters of the physical cores occupied by the examples belonging to the specification family in the target physical machine by using the current calculation discount coefficient, acquiring the first calculation force and the second calculation force respectively acquired by the examples belonging to the specification family on the adjusted target physical machine and the reference physical machine, returning to the step of adjusting the current calculation discount coefficient of the target physical machine based on the first calculation force and the second calculation force for cyclic execution when the difference value of the first calculation force and the second calculation force is larger than a threshold value, stopping cyclic operation when the difference value of the first calculation force and the second calculation force is smaller than the threshold value, and taking the final current calculation discount coefficient as the calculation discount coefficient corresponding to the specification family.
Wherein the threshold is a preset minimum value of a calculation force difference, and the adjustment of the calculation force discount coefficient can be stopped as long as the difference between the first calculation force obtained by the example on the target physical machine and the second calculation force obtained by the example on the reference physical machine is smaller than the threshold.
In an alternative embodiment, for the obtaining process of the first computing power and the second computing power, since the computing power of the instance is implemented in multiple aspects, for example, the network bandwidth size, the disk IO performance, the working frequency of the CPU, the micro architecture, the memory, etc., the computing of the computing power of the instance needs to consider multiple aspects, in this embodiment of the present application, the computing power obtained by the instance is measured by executing a computing power test program in the operating environment of the instance, where the computing power test program automatically obtains various parameters in the operating environment of the instance to perform computing, and outputs a score, where the score is the implementation of the computing power of the instance.
Specifically, the force test program may employ a benchmarking tool.
Based on this, the first computational force may be obtained by running a computational force test program in an instance created on the target physical machine that belongs to the specification family, and the second computational force may be obtained by running a computational force test program in an instance created on the reference physical machine that belongs to the specification family.
In order to ensure the consistency of calculation force tests, the target physical machine and the reference physical machine are created with the same specification of examples, and the number and topology of physical cores occupied by the examples are kept consistent as much as possible.
In an alternative embodiment, for the process of adjusting the current computational force discount coefficient based on the first computational force and the second computational force, the adjustment step may be determined according to a difference between the first computational force and the second computational force, the current computational force discount coefficient may be decreased by the adjustment step if the first computational force is greater than the second computational force, and the current computational force discount coefficient may be increased by the adjustment step if the first computational force is less than the second computational force.
The difference value and the adjustment step length are in positive correlation, so that when the comparison of the first calculation force and the second calculation force difference is large, the adjustment of the calculation force discount coefficient is large, and when the comparison of the first calculation force and the second calculation force difference is small, the adjustment of the calculation force discount coefficient is small, and the convergence speed of the calculation force discount coefficient can be increased.
Step 203: and storing the mapping relation between the specification family and the calculated discount coefficient in a calculated discount table of the target physical machine.
Thus, the establishment flow of the calculation force discount table shown in the figure 2 is completed, for the specification family supported by the target physical machine, the calculation force obtained by the example of the specification family on the target physical machine is compared with the calculation force obtained by the example of the specification family on the reference physical machine to determine the calculation force discount coefficient corresponding to the specification family, so that the difference between the calculation force obtained by the example of the specification family on the target physical machine and the calculation force obtained by the example of the specification family on the reference physical machine is reduced as much as possible, the effect that the calculation forces obtained by the example of the specification family on the physical machines of different hardware platforms are consistent can be ensured, and the purpose of calculation force normalization is achieved.
Based on the embodiments shown in fig. 1 to 2, fig. 3 is a specific flowchart illustrating an example calculation force adjustment according to an exemplary embodiment, where the purpose of adjusting the working time allocated by the physical core to the vCPU to achieve the example calculation force adjustment is taken as an example, and specifically includes the following steps:
step 301: and determining a physical core occupied by the instance to operate the virtual processor to be scheduled of the instance, and acquiring the operation time length allocated to the virtual processor by the physical core in a single scheduling period.
The virtual processor is a vCPU, and the physical core schedules the vCPU to run the instance through the vCPU scheduler according to the instance specification in each scheduling period, for example, for the instance of 2C4G, the vCPU scheduler needs to schedule 2 vcpus to run the instance.
In general, in a single scheduling period, a physical core will allocate a certain operation time length to a vCPU scheduled by a vCPU scheduler as an operation time of an instance, where the operation time length is smaller than the scheduling period of the physical core, and the longer the operation time length, the more calculation power the instance obtains.
Step 302: and taking the product of the calculated force discount coefficient and the running time as the actual running time of the physical core for running the instance in a single scheduling period.
In this embodiment, since the value range of the calculated force discount coefficient is between 0 and 1, the product of the calculated force discount coefficient and the operation duration is taken as the actual operation duration of the example, and is necessarily smaller than or equal to the initially allocated operation duration, thereby achieving the purpose of calculating force adjustment.
It should be noted that examples deployed on physical machines are generally of three types: the burst type instance, the exclusive type instance and the shared type instance can not monopolize the physical core for the shared type instance and the burst type instance, and the idle time of the physical core can fight other instances in the process of adjusting the computing force of the instance.
Based on this, after step 302 is executed, if the instance type of the instance is the preset type, the remaining duration of the running duration relative to the actual running duration may be determined, and the remaining duration may be allocated to the physical core to run other instances, so that under the condition of improving the user experience, the computing resource of the physical machine may be fully utilized.
For example, assuming that the running time of the physical core allocated to the vCPU is T and the discount coefficient is alpha, the actual running time of the vCPU is: alpha T, the time that the physical core is idle for is (1-alpha) T, and the physical core can allocate these idle times to the vCPU running other instances.
The example calculation power adjustment flow shown in fig. 3 is completed, and the initial operation time length of the virtual processor scheduled by the physical core operation example is obtained, and the value range of the calculation power discount coefficient is between 0 and 1, so that the product of the calculation power discount coefficient and the initial operation time length is taken as the actual operation time length of the example, and the actual operation time length is necessarily smaller than or equal to the initial operation time length, thereby achieving the purpose of example calculation power adjustment.
Based on the embodiments shown in fig. 1 to 2, fig. 4 is a specific flowchart illustrating another example calculation power adjustment according to an exemplary embodiment, and specifically includes the following steps for adjusting an operating frequency of a physical core to achieve an example calculation power adjustment purpose:
step 401: the operating frequency of the physical core is determined.
The operation frequency of the physical core is the main frequency of the physical core, which characterizes the calculation capability that the physical core can provide, and the higher the operation frequency is, the higher the calculation capability is provided, so that if the highest operation frequency that the physical core can reach is used, the greater the calculation power obtained by the instance on the physical core is.
Step 402: the product between the calculated force discount coefficient and the operating frequency is taken as the actual operating frequency of the physical core.
The example calculation power adjustment flow shown in fig. 4 is completed, and the operation frequency of the physical core is determined, and the product of the calculation power discount coefficient and the operation frequency is taken as the actual operation frequency of the physical core operation example and is necessarily smaller than or equal to the original operation frequency because the value range of the calculation power discount coefficient is between 0 and 1, so that the purpose of example calculation power adjustment is achieved.
Corresponding to the embodiment of the foregoing example calculation force adjustment method, the present application also provides an embodiment of the example calculation force adjustment device.
Fig. 5 is a schematic structural diagram of an example computing force adjusting device according to an exemplary embodiment of the present application, where the device is configured to perform the example computing force adjusting method provided in any one of the foregoing embodiments, and as shown in fig. 5, the example computing force adjusting device includes:
a coefficient determining module 510, configured to determine, based on a specification of an instance, a computational power discount coefficient of the instance, where the computational power discount coefficient is used to adjust a computational power obtained by the instance of the specification on the target physical machine to be the same as a computational power obtained on another physical machine, and the target physical machine is different from a hardware platform of the other physical machine;
a physical core determining module 520, configured to determine a physical core occupied by the instance on the target physical machine;
a parameter adjustment module 530, configured to adjust an operation parameter of the physical core for operating the instance by using the discount coefficient.
The implementation process of the functions and roles of each unit in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present application. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The embodiment of the application also provides an electronic device corresponding to the method for adjusting the calculation force of the example provided by the previous embodiment, so as to execute the method for adjusting the calculation force of the example.
Fig. 6 is a hardware configuration diagram of an electronic device according to an exemplary embodiment of the present application, where the electronic device includes: a communication interface 601, a processor 602, a memory 603 and a bus 604; wherein the communication interface 601, the processor 602 and the memory 603 perform communication with each other via a bus 604. The processor 602 may perform the example computing force adjustment method described above by reading and executing machine executable instructions in the memory 603 corresponding to the control logic of the example computing force adjustment method, the details of which are described in the above embodiments and are not further detailed herein.
The memory 603 referred to in this application may be any electronic, magnetic, optical, or other physical storage device that may contain stored information, such as executable instructions, data, or the like. In particular, the memory 603 may be RAM (Random Access Memory ), flash memory, a storage drive (e.g., hard drive), any type of storage disk (e.g., optical disk, DVD, etc.), or a similar storage medium, or a combination thereof. The communication connection between the system network element and at least one other network element is achieved through at least one communication interface 601 (which may be wired or wireless), the internet, a wide area network, a local network, a metropolitan area network, etc. may be used.
Bus 604 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. The memory 603 is configured to store a program, and the processor 602 executes the program after receiving an execution instruction.
The processor 602 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuitry in hardware or instructions in software in the processor 602. The processor 602 may be a general purpose processor including a network processor (Network Processor, NP), digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor.
The electronic device provided by the embodiment of the application and the method for adjusting the calculation force of the example provided by the embodiment of the application are the same in the invention conception, and have the same beneficial effects as the method adopted, operated or realized by the electronic device.
The present application further provides a computer readable storage medium corresponding to the example computing power adjustment method provided in the foregoing embodiment, and referring to fig. 7, the computer readable storage medium is shown as an optical disc 30, on which a computer program (i.e. a program product) is stored, where the computer program, when executed by a processor, performs the example computing power adjustment method provided in any of the foregoing embodiments.
It should be noted that examples of the computer readable storage medium may also include, but are not limited to, a phase change memory (PRAM), a Static Random Access Memory (SRAM), a Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a flash memory, or other optical or magnetic storage medium, which will not be described in detail herein.
The computer readable storage medium provided by the above embodiments of the present application and the method for adjusting the computing power of the examples provided by the embodiments of the present application are the same inventive concept, and have the same advantages as the method adopted, operated or implemented by the application program stored therein.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing description of the preferred embodiments of the present invention is not intended to limit the invention to the precise form disclosed, and any modifications, equivalents, improvements and alternatives falling within the spirit and principles of the present invention are intended to be included within the scope of the present invention.

Claims (12)

1. A method of adjusting an example computing force, the method comprising:
determining, based on a specification of an instance, a computational power discount coefficient for the instance, the computational power discount coefficient being used to adjust a computational power obtained by the instance of the specification on a target physical machine to be the same as computational power obtained on other physical machines, the target physical machine being different from hardware platforms of the other physical machines;
determining a physical core occupied by the instance on the target physical machine;
and adjusting the operation parameters of the physical core for operating the instance by using the calculated force discount coefficient.
2. The method of claim 1, wherein the determining the computational power discount coefficient for the instance based on the instance-based specification comprises:
determining a target specification family to which the specification of the instance belongs;
acquiring a pre-established calculation power discount table of the target physical machine, wherein the calculation power discount table records the mapping relation between different specification families and calculation power discount coefficients;
and searching a computing power discount coefficient corresponding to the target specification family in the computing power discount table.
3. The method of claim 2, wherein prior to the obtaining the pre-established computing power discount table for the target physical machine, the method further comprises:
determining a specification family supported by the target physical machine;
determining a computational power discount coefficient corresponding to the specification family, wherein the computational power discount coefficient is used for adjusting the computational power obtained on the target physical machine by an instance belonging to the specification family to be the same as the computational power obtained on the reference physical machine, and the reference physical machine is a machine with the weakest hardware platform performance in the physical machines supporting the specification family;
and storing the mapping relation between the specification family and the calculated discount coefficient in a calculated discount table of the target physical machine.
4. The method of claim 3, wherein the determining the corresponding computational power discount coefficient for the family of specifications comprises:
acquiring a first calculation force and a second calculation force respectively acquired on the target physical machine and the reference physical machine by an instance belonging to the specification family;
adjusting a current computing force discount coefficient of the target physical machine based on the first computing force and the second computing force when a difference between the first computing force and the second computing force is greater than a threshold;
adjusting the operation parameters of the physical cores occupied by the examples belonging to the specification family in the target physical machine by utilizing the current calculation discount coefficient;
and then acquiring a first calculation force and a second calculation force which are respectively acquired by the example belonging to the specification family on the adjusted target physical machine and the reference physical machine, returning to the step of adjusting the current calculation force discount coefficient of the target physical machine based on the first calculation force and the second calculation force to be circularly executed under the condition that the difference value of the first calculation force and the second calculation force is larger than a threshold value, and stopping the circulation operation under the condition that the difference value of the first calculation force and the second calculation force is smaller than the threshold value, and taking the final current calculation force discount coefficient as the calculation force discount coefficient corresponding to the specification family.
5. The method of claim 4, wherein the first computing force is obtained by running a computing force test program in an instance created on the target physical machine that belongs to the specification family;
the second computing force is obtained by running a computing force test program in an instance created on the reference physical machine that belongs to the specification family.
6. The method of claim 4, wherein the adjusting the current computing power discount coefficient of the target physical machine based on the first computing power and the second computing power comprises:
determining an adjustment step according to the difference between the first computing force and the second computing force;
reducing the current calculation force discount coefficient by the adjustment step length according to the fact that the first calculation force is larger than the second calculation force;
and increasing the current calculation force discount coefficient by the adjustment step length according to the fact that the first calculation force is smaller than the second calculation force.
7. The method of any of claims 1-6, wherein said adjusting an operating parameter of said physical core to operate said instance using said rebate coefficient comprises:
determining a virtual processor to be scheduled for the physical core to operate the instance, and acquiring the operation time length allocated to the virtual processor by the physical core in a single scheduling period;
and taking the product of the calculated force discount coefficient and the running time as the actual running time of the physical core running the instance in a single scheduling period.
8. The method of claim 7, wherein after taking the product of the calculated force discount coefficient and the run-time as an actual run-time for the physical core to run the instance, the method further comprises:
determining the residual time length of the operation time length relative to the actual operation time length according to the instance type of the instance as a preset type;
and distributing the residual duration to the physical core to run other examples.
9. The method of any of claims 1-6, wherein said adjusting an operating parameter of said physical core to operate said instance using said rebate coefficient comprises:
determining the operating frequency of the physical core;
and taking the product of the calculated force discount coefficient and the operating frequency as the actual operating frequency of the physical core.
10. An example computing force adjustment device, the device comprising:
a coefficient determination module for determining a computational power discount coefficient of an instance based on a specification of the instance, the computational power discount coefficient being used for adjusting a computational power obtained by the instance of the specification on the target physical machine to be the same as a computational power obtained on other physical machines, the target physical machine being different from a hardware platform of the other physical machines;
the physical core determining module is used for determining the physical core occupied by the instance on the target physical machine;
and the parameter adjustment module is used for adjusting the operation parameters of the physical core for operating the instance by using the calculated force discount coefficient.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor executes the program to implement the steps of the method according to any one of claims 1-9.
12. A computer readable storage medium having stored thereon a computer program, wherein the program is executed by a processor to implement the steps of the method of any of claims 1-9.
CN202310323306.XA 2023-03-29 2023-03-29 Example calculation force adjusting method and device, electronic equipment and storage medium Pending CN116360991A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310323306.XA CN116360991A (en) 2023-03-29 2023-03-29 Example calculation force adjusting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310323306.XA CN116360991A (en) 2023-03-29 2023-03-29 Example calculation force adjusting method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116360991A true CN116360991A (en) 2023-06-30

Family

ID=86941475

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310323306.XA Pending CN116360991A (en) 2023-03-29 2023-03-29 Example calculation force adjusting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116360991A (en)

Similar Documents

Publication Publication Date Title
CN106776005B (en) Resource management system and method for containerized application
US7992151B2 (en) Methods and apparatuses for core allocations
US20130247061A1 (en) Method and apparatus for the scheduling of computing tasks
US9571567B2 (en) Methods and systems to manage computer resources in elastic multi-tenant cloud computing systems
JP7020616B2 (en) Methods and systems for resource scheduling
CN110221915B (en) Node scheduling method and device
CN112204524A (en) Embedded scheduling of hardware resources for hardware acceleration
CN107341115B (en) Virtual machine memory access method and system and electronic equipment
US11113093B2 (en) Interference-aware scheduling service for virtual GPU enabled systems
EP2437168A2 (en) Method and device for balancing load of multiprocessor system
US20110209157A1 (en) Resource allocation method, program, and resource allocation apparatus
US11876731B2 (en) System and methods for sharing memory subsystem resources among datacenter applications
CN108205469B (en) MapReduce-based resource allocation method and server
WO2016040699A1 (en) Computing instance launch time
US20180176148A1 (en) Method of dynamic resource allocation for public clouds
CN115827253B (en) Chip resource calculation power distribution method, device, equipment and storage medium
CN110297743B (en) Load testing method and device and storage medium
CN112650478A (en) Dynamic construction method, system and equipment for embedded software development platform
US20110218795A1 (en) Simulator of multi-core system employing reconfigurable processor cores and method of simulating multi-core system employing reconfigurable processor cores
US9104490B2 (en) Methods, systems and apparatuses for processor selection in multi-processor systems
US11954419B2 (en) Dynamic allocation of computing resources for electronic design automation operations
CN107463332B (en) File segmentation method and device
JP2011192049A (en) Virtual machine system, automatic migration method, and automatic migration program
CN116360991A (en) Example calculation force adjusting method and device, electronic equipment and storage medium
CN111338803A (en) Thread processing 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