CN114416357A - Method and device for creating container group, electronic equipment and medium - Google Patents

Method and device for creating container group, electronic equipment and medium Download PDF

Info

Publication number
CN114416357A
CN114416357A CN202210011155.XA CN202210011155A CN114416357A CN 114416357 A CN114416357 A CN 114416357A CN 202210011155 A CN202210011155 A CN 202210011155A CN 114416357 A CN114416357 A CN 114416357A
Authority
CN
China
Prior art keywords
core
candidate
determining
cores
target
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
CN202210011155.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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202210011155.XA priority Critical patent/CN114416357A/en
Publication of CN114416357A publication Critical patent/CN114416357A/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/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
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/502Proximity

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)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present disclosure provides a method and an apparatus for creating a container group, an electronic device, and a medium, which relate to the technical field of computers, and in particular to the technical field of containers, cloud computing, and cloud service. The specific implementation scheme is as follows: determining calculation force demand information of the container group to be created according to the creation request of the container group to be created; determining a target core from candidate cores in a target processor according to the calculation force value of the candidate cores and the calculation force demand information; and creating the container group to be created according to the target core. The method and the device have the advantages that the effect of guaranteeing the calculation force value of the target core and the effect of adapting to the calculation force demand information of the container group to be created are achieved, and the core scheduling accuracy during the creation of the container group is improved.

Description

Method and device for creating container group, electronic equipment and medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for creating a container group, an electronic device, and a medium.
Background
Kubernets is an open source application for managing containers on multiple hosts in a cloud platform, and its goal is to make container deployment applications simple and efficient. When deploying a container group in a Kubernetes working node, a core in a central processor needs to be scheduled for subsequent data processing operations.
The current core scheduling is realized by adopting a random scheduling mode.
Disclosure of Invention
The present disclosure provides a method, an apparatus, an electronic device, and a medium for improving accuracy of core scheduling at the time of creation of a container group.
According to an aspect of the present disclosure, there is provided a method of creating a container group, including:
determining calculation force demand information of the container group to be created according to the creation request of the container group to be created;
determining a target core from candidate cores in a target processor according to the calculation force value of the candidate cores and the calculation force demand information;
and creating the container group to be created according to the target core.
According to another aspect of the present disclosure, there is provided a creating apparatus of a container group, including:
the calculation force demand determining module is used for determining calculation force demand information of the container group to be created according to the creation request of the container group to be created;
the target core determining module is used for determining a target core from candidate cores in a target processor according to the calculation force value of the candidate cores and the calculation force demand information;
and the container group creating module is used for creating the container group to be created according to the target core.
According to another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of the present disclosure.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, performs the method of any one of the present disclosure.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a flow chart of a method of creating some of the disclosed container groups in accordance with an embodiment of the present disclosure;
FIG. 2A is a flow chart of another method of creating a group of containers disclosed in accordance with an embodiment of the present disclosure;
FIG. 2B is a schematic flow chart of some of the disclosed container group creation in accordance with an embodiment of the present disclosure;
FIG. 3 is a flow chart of another method of creating a group of containers disclosed in accordance with an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of some of the disclosed devices for creating container groups according to an embodiment of the present disclosure;
fig. 5 is a block diagram of an electronic device for implementing the method for creating a container group disclosed in the embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the research and development process, the applicant finds that, when a container group is deployed in a working node of Kubernetes in the industry at present, one or more cores are randomly selected in a central processor of the Kubernetes according to the number of cores applied in a deployment request, and the selected cores and the container group are bound in the working node to perform the deployment of the container group.
However, the computational power of each core in a multi-core central processing unit is not completely the same, for example, a central processing unit of an ARM architecture of a certain model has an eight-core structure including four large cores and four small cores, the main frequency of the large core is 2.8GHz, and the main frequency of the small core is 1.8GHz, which shows that the computational power of different cores may be greatly different.
Therefore, at present, the bound cores of the container group are determined by adopting a random scheduling mode, the actual situation that the computing power of each core of the central processing unit is different is not considered, and the computing power of all the central processing unit cores is the same by default. This can result in the performance of a computing task being significantly different from the expectations if the group of containers were performing a high computational task but bound to a low computational core. Conversely, if the container group performs a low-computation-effort computing task but binds to a high-computation-effort core, it will cause a waste of computing resources.
Fig. 1 is a flowchart of some methods for creating a container group disclosed in an embodiment of the present disclosure, and this embodiment may be applied to a case where a processor core to be bound for creating a container group is determined. The method of the present embodiment may be performed by the device for creating a container group disclosed in the embodiments of the present disclosure, and the device may be implemented by software and/or hardware and may be integrated on any electronic device with computing capability.
As shown in fig. 1, the method for creating a container group disclosed in this embodiment may include:
s101, determining the calculation force demand information of the container group to be created according to the creation request of the container group to be created.
Wherein, the container group to be created represents the container group that needs to be created in the Kubernetes working node. The container group, i.e. POD, is the smallest unit that can be created and deployed in kubernets, and is an application instance in kubernets, the container group includes one or more containers, and also includes resources shared by the containers such as storage resources and network resources, and the containers in the same container group are deployed in the same working node. The calculation force demand information represents the calculation capacity of the central processing unit required by the container group to be created to be capable of normally processing the calculation task, and the calculation force demand information comprises but is not limited to a demand calculation force level, a demand core number, a demand calculation force value and the like.
In one embodiment, a user evaluates and obtains computing power demand information corresponding to a computing amount according to the computing amount of a computing task borne by a container group to be created, and generates a creation request carrying the computing power demand information for the container group to be created in a client. The client sends the creation request to an application program interface service center of Kubernetes, namely an API Server, through a preset transmission mode.
And after receiving the creation request, the API Server determines a target working node from the candidate working nodes according to the current resource occupancy rates of all the candidate working nodes in the Kubernets. Optionally, the candidate working node with the lowest current resource occupancy rate is used as the target working node. The API Server forwards the create request to the target worker node.
And the Kubelet component in the target working node receives the creation request, analyzes the creation request and acquires the computing power demand information of the container group to be created, which is recorded in the field of the creation request.
The calculation force demand information of the container group to be created is determined according to the creation request of the container group to be created, so that a data foundation is laid for determining a target core according to the calculation force demand information subsequently.
S102, determining a target core from the candidate cores according to the calculation force value and the calculation force demand information of the candidate cores in the target processor.
The target processor represents a central processing unit carried by the target work node, the number of the target processors may be one or multiple, each target processor includes at least one candidate core, for example, a target processor of an ARM architecture includes eight candidate cores, which may be divided into four candidate large cores and four candidate small cores. The computation value of the candidate core represents the computation capability of the candidate core, and the specific representation form of the computation value of the candidate core includes, but is not limited to, the frequency value of the candidate core, or the number of times that the candidate core performs floating point operations in unit time, and the like.
In one embodiment, the computation values of the candidate cores in the target processor are stored in the configuration center of the API Server in advance. And the Kubelet component in the target working node accesses the configuration center, and determines a target core from the candidate cores according to the calculation force values of the candidate cores in the configuration center and the calculation force demand information obtained by analysis.
Optionally, when the computation power demand information includes a demand computation power level and a demand core number, the Kubelet component ranks each candidate core according to the computation power value of each candidate core, for example, into three levels, i.e., a high computation power level, a medium computation power level, and a low computation power level. And matching the demand computing power grade with the grades of the candidate cores, determining the candidate cores with the same grade as the demand computing power grade, and determining the target core from the candidate cores according to the quantity of the demand cores.
Optionally, when the calculation force demand information includes a demand calculation force value, the Kubelet component matches the demand calculation force value according to the calculation force value of each candidate core, and uses at least one candidate core, of which the calculation force value is greater than or equal to the demand calculation force value, as the target core.
The target core is determined from the candidate cores according to the calculation force value of the candidate core in the target processor and the calculation force demand information, so that the effect of ensuring the calculation force value of the target core to be matched with the calculation force demand information of the container group to be created is achieved.
S103, creating the container group to be created according to the target core.
In one embodiment, the Kubelet component creates a Container group to be created in the target work node by calling CRI (Container Runtime Interface), and performs scheduling binding on the successfully created Container group and the target core. And when the container group executes the calculation task, calling a target core establishing the binding relationship to perform data processing.
According to the method and the device, the calculation force demand information of the container group to be created is determined according to the creation request of the container group to be created, the target core is determined from the candidate cores according to the calculation force value and the calculation force demand information of the candidate cores in the target processor, and then the container group to be created is created according to the target core, so that the effect of ensuring the calculation force value of the target core and the effect of adapting to the calculation force demand information of the container group to be created are achieved, the core scheduling accuracy during the creation of the container group is improved, and the problem that the running performance of the container group is possibly insufficient or the calculation resources are wasted due to the fact that the core is randomly scheduled in the prior art is avoided.
Fig. 2A is a flowchart of a method for creating another container group disclosed according to an embodiment of the present disclosure, which is further optimized and expanded based on the above technical solution, and can be combined with the above optional embodiments.
As shown in fig. 2A, the method for creating a container group disclosed in this embodiment may include:
s201, determining the calculation force demand information of the container group to be created according to the creation request of the container group to be created.
S202, determining the required computing power grade and the required core number of the container group to be created according to the computing power required information, and determining the incidence relation between the computing power grade and the candidate core according to the computing power value of the candidate core.
The required computation power level indicates a level to which the computing power of the core needs to be bound to the container group to be created, such as a high computation power level, a medium computation power level, or a low computation power level. The number of required cores represents the number of binding cores required for the container group to be created.
In one embodiment, the Kubelet component in the target working node obtains the demand computing power level and the demand core number included in the computing power demand information. And accessing a configuration center in the API Server, acquiring the calculation force values of all candidate cores included in a central processing unit carried by the target working node, and determining the association relationship between the calculation force levels and the candidate cores according to the calculation force values of all the candidate cores and a preset calculation force grading rule.
For example, the central processing unit is assumed to have three candidate cores, namely a candidate core a, a candidate core B and a candidate core C, wherein the calculation value of the candidate core a is 1500, the calculation value of the candidate core B is 2500, the calculation value of the candidate core C is 3500, the preset calculation value is 1000-2000, the preset calculation value is a low calculation power grade, 2000-3000 is a medium calculation power grade, 3000-4000 is a high calculation power grade, the candidate core a belongs to the low calculation power grade, the candidate core B belongs to the medium calculation power grade, and the candidate core C belongs to the high calculation power grade.
S203, determining a target core from the candidate cores according to the demand computing power level, the demand core number and the incidence relation between the computing power level and the candidate cores.
In one embodiment, the demand computing power level and the demand core number are matched with the incidence relation between the computing power level and the candidate core, and the target core is determined from the candidate core according to the matching result.
Optionally, S203 includes the following steps a and B:
A. and matching the required computing power level with the incidence relation between the computing power level and the candidate core, and determining a first auxiliary core from the candidate core according to a matching result.
In one embodiment, the candidate kernel whose associated computing power level matches the demand computing power level is used as the first auxiliary kernel.
For example, assuming that the demand computing power level is a "high computing power level", and the candidate cores associated with the "high computing power level" include candidate core a, candidate core B, and candidate core C, the candidate core a, candidate core B, and candidate core C are taken as the first auxiliary core.
B. And determining a target core from the first auxiliary core according to the number of the demand cores.
In one embodiment, the target core is determined by randomly selecting from the first auxiliary cores according to the number of required cores.
In another embodiment, the first auxiliary core with a higher computation value is selected as the target core according to the number of the required cores and the computation value of each first auxiliary core.
The demand computing power grade and the incidence relation between the computing power grade and the candidate cores are matched, the first auxiliary core is determined from the candidate cores according to the matching result, and the target core is determined from the first auxiliary core according to the quantity of the demand cores, so that the target core which meets the demand computing power grade is automatically allocated to the container group to be created, and the core scheduling accuracy during the container group creation is improved.
And S204, creating the container group to be created according to the target core.
Fig. 2B is a schematic flowchart of some container group creation processes disclosed in the embodiment of the present disclosure, and as shown in fig. 2B, a user sends a creation request to an API Server, and the API Server determines a target working node and forwards the creation request to the target working node. And analyzing and acquiring computing power demand information by a Kubelet component of the target working node, accessing a configuration center of the API Server to determine an association relation between the computing power grade and the candidate core, and determining the target core from the candidate core according to the required computing power grade, the required core quantity and the association relation between the computing power grade and the candidate core included in the computing power demand information. And finally, establishing a container group to be established by calling the CRI, and binding the established container group with the target core.
According to the method and the device, the required computing power grade and the required core number of the container group to be created are determined according to the computing power required information, the incidence relation between the computing power grade and the candidate core is determined according to the computing power value of the candidate core, and the target core is determined from the candidate core according to the required computing power grade, the required core number and the incidence relation between the computing power grade and the candidate core, so that the target core which meets the required computing power grade and the required core number is automatically allocated to the container group to be created, and the core scheduling accuracy during the container group creation is improved.
On the basis of the above embodiment, the method further includes:
the Kubelet component regularly detects the container group and the target core which have established the binding relationship, and determines whether the required computing power level of the container group is matched with the computing power level associated with the target core and whether the required core number of the container group is matched with the number of the target core. If not, the reconstruction of the container group and the rebinding of the target core are actively triggered.
Fig. 3 is a flowchart of a method for creating another container group disclosed according to an embodiment of the present disclosure, which is further optimized and expanded based on the above technical solution, and can be combined with the above optional embodiments.
As shown in fig. 3, the method for creating a container group disclosed in this embodiment may include:
s301, determining the calculation force demand information of the container group to be created according to the creation request of the container group to be created.
S302, determining a demand calculation force value of the container group to be created according to the calculation force demand information.
The required computation force value represents the computation capability value of the core required by the to-be-created container group to be capable of normally processing the computation task, and the concrete representation form includes but is not limited to the frequency value of the required core, or the number of times of floating point operations performed by the required core in unit time, and the like.
In one embodiment, the Kubelet component in the target working node analyzes the acquired computing power demand information, and determines a demand computing power value included in the computing power demand information.
S303, comparing the required computation force value with the computation force value of the candidate core, and determining the target core from the candidate cores according to the comparison result.
In one implementation mode, the Kubelet component compares the value of the required computation force value with the computation force values of all candidate cores to determine whether the computation force value of any candidate core can meet the required computation force value, and if so, one candidate core is preferentially selected as a target core; if not, determining whether the combined computation force value of any candidate core combination can meet the required computation force value, and if so, taking all candidate cores in the candidate core combinations as target cores.
Optionally, S303 includes the following steps a1, B1, and C1:
and A1, under the condition that the calculation force value of each candidate core is smaller than the demand calculation force value, combining at least two candidate cores to determine a candidate core group, and determining the combined calculation force value of each candidate core group.
In an embodiment, if the computation force values of the candidate cores are all smaller than the required computation force value, combining the at least two candidate cores to obtain candidate core groups of all possible combination modes, and taking the sum of the computation force values of the candidate cores in each candidate core group as the combined computation force value of the corresponding candidate core group.
Illustratively, assume that the target processor includes candidate core A, candidate core B, and candidate core C. And combining at least two candidate cores to obtain four candidate core groups (candidate core A, candidate core B), (candidate core A, candidate core C), (candidate core B, candidate core C) and (candidate core A, candidate core B, candidate core C) on the assumption that the calculation force value of each candidate core is smaller than the demand calculation force value.
Assuming that the computation values of the candidate core a, the candidate core B, and the candidate core C are 1000, 2000, and 3000, respectively, the combined computation value of the candidate core group (candidate core a, candidate core B) is 3000, the combined computation value of the candidate core group (candidate core a, candidate core C) is 4000, the combined computation value of the candidate core group (candidate core B, candidate core C) is 5000, and the combined computation value of the candidate core group (candidate core a, candidate core B, candidate core C) is 6000.
And B1, taking the candidate core group with the combined calculation force value larger than or equal to the demand calculation force value as an auxiliary core group.
In one embodiment, the combined force value of each candidate core group is compared with the required force value in terms of magnitude, and the candidate core group with the combined force value greater than or equal to the required force value is used as the auxiliary core group.
For example, assuming that the candidate core group includes a candidate core group 1, a candidate core group 2, and a candidate core group 3, assuming that the demand calculation value is 5000, the combination calculation value of the candidate core group 1 is 3000, the combination calculation value of the candidate core group 2 is 5000, and the combination calculation value of the candidate core group 3 is 6000, the candidate core group 2 and the candidate core group 3 are taken as the auxiliary core group.
And C1, determining a first computing force difference value between the combined computing force value and the demand computing force value of each auxiliary core group, and determining a target core from the auxiliary core groups according to the number of candidate cores included in each auxiliary core group and the first computing force difference value.
In one embodiment, the combined computation force value and the demand computation force value of each auxiliary core group are subjected to difference operation, a first computation force difference value between the combined computation force value and the demand computation force value of each auxiliary core group is determined, and a target core is determined from the auxiliary core groups according to the first computation force difference value and the number of candidate cores included in each auxiliary core group.
The method comprises the steps of determining a candidate core group by combining at least two candidate cores under the condition that the calculation force value of each candidate core is smaller than a demand calculation force value, determining the combined calculation force value of each candidate core group, taking the candidate core group with the combined calculation force value larger than or equal to the demand calculation force value as an auxiliary core group, further determining a first calculation force difference value between the combined calculation force value and the demand calculation force value of each auxiliary core group, and determining a target core from the auxiliary core groups according to the number of the candidate cores and the first calculation force difference value included in each auxiliary core group.
Optionally, step C1 includes the following steps C11 and C12:
and C11, taking the auxiliary core group with the least number of candidate cores and the least first calculation force difference as the target core group.
In one embodiment, the combined computation force value and the demand computation force value of each auxiliary core group are subjected to difference operation, a first computation force difference value between the combined computation force value and the demand computation force value of each auxiliary core group is determined, and the number of candidate cores included in each auxiliary core group is determined. And screening the auxiliary core group by taking the candidate core number and the first computing force difference as two screening conditions, and selecting the auxiliary core group with the minimum candidate core number and the minimum first computing force difference as a target core group.
Specifically, the first screening may be performed according to the number of candidate cores, and then the second screening may be performed according to the first calculation difference, and finally the target core group is obtained through screening; and the first screening can be carried out according to the first calculated force difference, the second screening can be carried out according to the number of the candidate cores, and finally the target core group is obtained through screening. The execution order of the two screening conditions is not limited in this embodiment.
And C12, taking the candidate core included in the target core group as the target core.
For example, assuming that the target core group includes candidate core a, candidate core B, and candidate core C, candidate core a, candidate core B, and candidate core C are taken as target cores.
By taking the auxiliary core group with the minimum number of candidate cores and the minimum first calculation force difference as the target core group and taking the candidate cores included in the target core group as the target cores, the effect of meeting the calculation force value required by the container group to be created is achieved on the premise of calling the candidate cores with the small number and occupying less calculation resources.
Optionally, S303 further includes the following steps a2 and B2:
and A2, in the case that the calculation force value of at least one candidate core is larger than or equal to the demand calculation force value, using the at least one candidate core as a second auxiliary core.
In one embodiment, if the computation force value of at least one candidate core is greater than or equal to the demand computation force value, the candidate cores are taken as the second auxiliary core.
For example, assuming that the computation value of the demand is 5000, and the computation values corresponding to the candidate core a, the candidate core B, and the candidate core C are 4000, 5000, and 6000, respectively, the candidate core B and the candidate core C are used as the second auxiliary core.
And B2, determining the target core from the second auxiliary cores according to the second computing force difference value between the computing force value of each second auxiliary core and the demand computing force value.
In one embodiment, the calculation force value and the demand calculation force value of each second auxiliary core are subjected to difference operation, a second calculation force difference value between the calculation force value and the demand calculation force value of each second auxiliary core is determined, and the second auxiliary core with the smallest second calculation force difference value is used as the target core.
By taking at least one candidate core as a second auxiliary core under the condition that the calculation force value of at least one candidate core is larger than or equal to the demand calculation force value, and determining the target core from the second auxiliary core according to the second calculation force difference value between the calculation force value of each second auxiliary core and the demand calculation force value, the effect that one candidate core capable of meeting the demand calculation force value is preferentially selected as the target core is achieved, and excessive waste of calculation resources is avoided.
And S304, creating the container group to be created according to the target core. A
According to the method and the device, the demand calculation force value of the container group to be created is determined according to the calculation force demand information, the demand calculation force value is compared with the calculation force value of the candidate cores, the target core is determined from the candidate cores according to the comparison result, the target core which meets the demand calculation force value is automatically allocated to the container group to be created, and the core scheduling accuracy during the container group creation is improved.
Fig. 4 is a schematic structural diagram of some container group creation apparatuses disclosed in the embodiments of the present disclosure, which may be applied to the case of determining the bound processor cores to be bound for creating a container group. The device of the embodiment can be implemented by software and/or hardware, and can be integrated on any electronic equipment with computing capability.
As shown in fig. 4, the container group creation apparatus 40 disclosed in the present embodiment may include a calculation force requirement determination module 41, a target core determination module 42, and a container group creation modeling module 43, where:
a calculation power requirement determining module 41, configured to determine calculation power requirement information of the container group to be created according to the creation request of the container group to be created;
a target core determining module 42, configured to determine a target core from candidate cores according to the computation force value and the computation force demand information of the candidate cores in the target processor;
and a container group creating module 43, configured to create a container group to be created according to the target core.
Optionally, the target core determining module 42 is specifically configured to:
determining the required calculation power grade and the required core number of the container group to be created according to the calculation power required information, and determining the incidence relation between the calculation power grade and the candidate core according to the calculation power value of the candidate core;
and determining a target core from the candidate cores according to the demand computing power level, the demand core number and the incidence relation between the computing power level and the candidate cores.
Optionally, the target core determining module 42 is further specifically configured to:
matching the required computing power grade with the incidence relation between the computing power grade and the candidate core, and determining a first auxiliary core from the candidate core according to a matching result;
and determining a target core from the first auxiliary core according to the number of the demand cores.
Optionally, the target core determining module 42 is specifically configured to:
determining a required calculation force value of the container group to be created according to the calculation force demand information;
and comparing the required computation force value with the computation force values of the candidate cores, and determining the target core from the candidate cores according to the comparison result.
Optionally, the target core determining module 42 is further specifically configured to:
under the condition that the calculation force value of each candidate core is smaller than the required calculation force value, combining at least two candidate cores to determine a candidate core group, and determining the combined calculation force value of each candidate core group;
taking the candidate core group with the combined calculation force value larger than or equal to the demand calculation force value as an auxiliary core group;
and determining a first calculation force difference value between the combined calculation force value and the demand calculation force value of each auxiliary core group, and determining a target core from the auxiliary core groups according to the number of candidate cores included in each auxiliary core group and the first calculation force difference value.
Optionally, the target core determining module 42 is further specifically configured to:
taking the auxiliary core group with the minimum number of candidate cores and the minimum first calculation force difference as a target core group;
the candidate cores included in the target core group are taken as target cores.
Optionally, the target core determining module 42 is further specifically configured to:
taking at least one candidate core as a second auxiliary core under the condition that the calculation force value of at least one candidate core is greater than or equal to the demand calculation force value;
and determining the target core from the second auxiliary cores according to a second calculation force difference value between the calculation force value and the demand calculation force value of each second auxiliary core.
The container group creation device 40 disclosed in the embodiment of the present disclosure may perform the container group creation method disclosed in the embodiment of the present disclosure, and has functional modules and advantageous effects corresponding to the execution method. Reference may be made to the description in the method embodiments of the present disclosure for details that are not explicitly described in this embodiment.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 5 illustrates a schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the apparatus 500 comprises a computing unit 501 which may perform various appropriate actions and processes in accordance with a computer program stored in a Read Only Memory (ROM)502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The calculation unit 501, the ROM 502, and the RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in the device 500 are connected to the I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, or the like; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508, such as a magnetic disk, optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 501 may be a variety of general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 501 executes the respective methods and processes described above, such as the creation method of the container group. For example, in some embodiments, the method of creating the container group may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 500 via the ROM 502 and/or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the method of creating a container group described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the method of creating the group of containers in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), blockchain networks, and the internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (17)

1. A method of creating a container group, comprising:
determining calculation force demand information of the container group to be created according to the creation request of the container group to be created;
determining a target core from candidate cores in a target processor according to the calculation force value of the candidate cores and the calculation force demand information;
and creating the container group to be created according to the target core.
2. The method of claim 1, wherein determining a target core from candidate cores in a target processor according to computing power information of the candidate cores and the computing power requirement information comprises:
determining the required calculation power grade and the required core number of the container group to be created according to the calculation power required information, and determining the incidence relation between the calculation power grade and the candidate core according to the calculation power value of the candidate core;
and determining a target core from the candidate cores according to the demand computing power level, the demand core number and the incidence relation between the computing power level and the candidate cores.
3. The method of claim 2, wherein the determining a target core from the candidate cores according to the demand computing power level, the demand core number and the correlation between the computing power level and the candidate cores comprises:
matching the required computing power grade with the incidence relation between the computing power grade and the candidate cores, and determining a first auxiliary core from the candidate cores according to a matching result;
determining a target core from the first auxiliary core according to the number of demand cores.
4. The method of claim 1, wherein the determining a target core from among candidate cores in a target processor according to an effort value of the candidate cores and the effort requirement information comprises:
determining a required calculation force value of the container group to be created according to the calculation force demand information;
and comparing the required computation force value with the computation force values of the candidate cores, and determining a target core from the candidate cores according to a comparison result.
5. The method of claim 4, wherein the comparing the demand computation value with the computation values of the candidate cores and determining a target core from the candidate cores according to the comparison result comprises:
under the condition that the calculation force value of each candidate core is smaller than the demand calculation force value, combining at least two candidate cores to determine a candidate core group, and determining the combined calculation force value of each candidate core group;
taking the candidate core group with the combined calculation force value larger than or equal to the demand calculation force value as an auxiliary core group;
and determining a first calculation force difference value between the combined calculation force value and the demand calculation force value of each auxiliary core group, and determining a target core from the auxiliary core groups according to the number of candidate cores included in each auxiliary core group and the first calculation force difference value.
6. The method of claim 5, wherein the determining a target kernel from the auxiliary kernel groups according to the number of candidate kernels included in each of the auxiliary kernel groups and the first computation power difference value comprises:
taking the auxiliary core group with the minimum candidate core number and the minimum first calculation difference value as a target core group;
and taking the candidate core included in the target core group as a target core.
7. The method of claim 4, wherein the comparing the demand computation value with the computation values of the candidate cores and determining a target core from the candidate cores according to the comparison result comprises:
taking at least one candidate core as a second auxiliary core under the condition that the calculation force value of the at least one candidate core is greater than or equal to the demand calculation force value;
and determining a target core from the second auxiliary cores according to a second calculation force difference value between the calculation force value of each second auxiliary core and the demand calculation force value.
8. An apparatus for creating a container group, comprising:
the calculation force demand determining module is used for determining calculation force demand information of the container group to be created according to the creation request of the container group to be created;
the target core determining module is used for determining a target core from candidate cores in a target processor according to the calculation force value of the candidate cores and the calculation force demand information;
and the container group creating module is used for creating the container group to be created according to the target core.
9. The apparatus of claim 8, wherein the target core determination module is specifically configured to:
determining the required calculation power grade and the required core number of the container group to be created according to the calculation power required information, and determining the incidence relation between the calculation power grade and the candidate core according to the calculation power value of the candidate core;
and determining a target core from the candidate cores according to the demand computing power level, the demand core number and the incidence relation between the computing power level and the candidate cores.
10. The apparatus of claim 9, wherein the target core determination module is further specifically configured to:
matching the required computing power grade with the incidence relation between the computing power grade and the candidate cores, and determining a first auxiliary core from the candidate cores according to a matching result;
determining a target core from the first auxiliary core according to the number of demand cores.
11. The apparatus of claim 8, wherein the target core determination module is specifically configured to:
determining a required calculation force value of the container group to be created according to the calculation force demand information;
and comparing the required computation force value with the computation force values of the candidate cores, and determining a target core from the candidate cores according to a comparison result.
12. The apparatus of claim 11, wherein the target kernel determination module is further specifically configured to:
under the condition that the calculation force value of each candidate core is smaller than the demand calculation force value, combining at least two candidate cores to determine a candidate core group, and determining the combined calculation force value of each candidate core group;
taking the candidate core group with the combined calculation force value larger than or equal to the demand calculation force value as an auxiliary core group;
and determining a first calculation force difference value between the combined calculation force value and the demand calculation force value of each auxiliary core group, and determining a target core from the auxiliary core groups according to the number of candidate cores included in each auxiliary core group and the first calculation force difference value.
13. The apparatus of claim 12, wherein the target core determination module is further specifically configured to:
taking the auxiliary core group with the minimum candidate core number and the minimum first calculation difference value as a target core group;
and taking the candidate core included in the target core group as a target core.
14. The apparatus of claim 11, wherein the target kernel determination module is further specifically configured to:
taking at least one candidate core as a second auxiliary core under the condition that the calculation force value of the at least one candidate core is greater than or equal to the demand calculation force value;
and determining a target core from the second auxiliary cores according to a second calculation force difference value between the calculation force value of each second auxiliary core and the demand calculation force value.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-7.
17. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-7.
CN202210011155.XA 2022-01-06 2022-01-06 Method and device for creating container group, electronic equipment and medium Pending CN114416357A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210011155.XA CN114416357A (en) 2022-01-06 2022-01-06 Method and device for creating container group, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210011155.XA CN114416357A (en) 2022-01-06 2022-01-06 Method and device for creating container group, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN114416357A true CN114416357A (en) 2022-04-29

Family

ID=81270803

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210011155.XA Pending CN114416357A (en) 2022-01-06 2022-01-06 Method and device for creating container group, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN114416357A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024017285A1 (en) * 2022-07-19 2024-01-25 中兴通讯股份有限公司 Cpu core allocation methods and system, device, and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024017285A1 (en) * 2022-07-19 2024-01-25 中兴通讯股份有限公司 Cpu core allocation methods and system, device, and storage medium

Similar Documents

Publication Publication Date Title
CN113377520A (en) Resource scheduling method, device, equipment and storage medium
CN113641457A (en) Container creation method, device, apparatus, medium, and program product
CN114911598A (en) Task scheduling method, device, equipment and storage medium
CN115658311A (en) Resource scheduling method, device, equipment and medium
CN113986497B (en) Queue scheduling method, device and system based on multi-tenant technology
CN114924745A (en) Operation method and device of deep learning compiler and electronic equipment
CN113032093B (en) Distributed computing method, device and platform
CN114416357A (en) Method and device for creating container group, electronic equipment and medium
CN113360266A (en) Task processing method and device
CN112817660A (en) Method, device, equipment and storage medium for expanding small program capacity
CN113032092B (en) Distributed computing method, device and platform
CN114386577A (en) Method, apparatus, and storage medium for executing deep learning model
CN114090247A (en) Method, device, equipment and storage medium for processing data
CN117519996B (en) Data processing method, device, equipment and storage medium
CN115379000B (en) Service platform capacity expansion method and device, electronic equipment and storage medium
CN114816758B (en) Resource allocation method and device
CN113946414A (en) Task processing method and device and electronic equipment
CN115495312B (en) Service request processing method and device
CN116801001A (en) Video stream processing method and device, electronic equipment and storage medium
CN117873731A (en) Execution method, device, chip, equipment and storage medium of computing task
CN116541224A (en) Performance test method, device, electronic equipment and readable storage medium
CN115640112A (en) Resource scheduling method, device, equipment and medium based on label
CN115442432A (en) Control method, device, equipment and storage medium
CN116594737A (en) Processor resource allocation method and device, storage medium and electronic equipment
CN115390992A (en) Virtual machine creating method, device, equipment and storage medium

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