Container group creation method and device, electronic equipment and medium

By selecting the appropriate core for container group binding based on computing power requirements in Kubernetes, the problem of insufficient performance or resource waste caused by random scheduling is solved, and more efficient core scheduling is achieved.

CN114416357BActive Publication Date: 2026-05-01BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING BAIDU NETCOM SCI & TECH CO LTD
Filing Date
2022-01-06
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

The current technology uses random scheduling as the core scheduling method for container groups in Kubernetes, which does not take into account the differences in computing power of each core of the central processing unit, resulting in insufficient performance of container groups or waste of computing resources.

Method used

By determining the computing power requirements of the container group to be created, and based on the computing power values ​​of the candidate cores in the target processor, a suitable target core is selected from the candidate cores and bound to it, thereby achieving precise core scheduling.

Benefits of technology

It improves the accuracy of core scheduling when creating container groups, avoiding problems such as insufficient performance or waste of computing resources in container group operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114416357B_ABST
    Figure CN114416357B_ABST
Patent Text Reader

Abstract

The present disclosure provides a container group creation method and device, electronic equipment and medium, relates to the technical field of computers, and particularly relates to the technical field of containers, cloud computing and cloud services. The specific implementation scheme is: according to a creation request for a to-be-created container group, determining computing power requirement information of the to-be-created container group; according to a computing power value of a candidate core in a target processor and the computing power requirement information, determining a target core from the candidate core; and creating the to-be-created container group according to the target core. The present disclosure achieves the effect of ensuring that the computing power value of the target core is adapted to the computing power requirement information of the to-be-created container group, and improves the accuracy of core scheduling when creating a container group.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more particularly to the field of container, cloud computing and cloud service technology, and especially to a method, apparatus, electronic device and medium for creating container groups. Background Technology

[0002] Kubernetes is an open-source application used to manage containerized applications across multiple hosts in a cloud platform. Kubernetes aims to make deploying containerized applications simple and efficient. When deploying a container group on a Kubernetes worker node, cores in the central processing unit are scheduled to perform subsequent data processing operations.

[0003] Currently, the core scheduling is implemented using random scheduling. Summary of the Invention

[0004] This disclosure provides a method, apparatus, electronic device, and medium for improving the accuracy of core scheduling during container group creation.

[0005] According to one aspect of this disclosure, a method for creating a container group is provided, comprising:

[0006] Based on the creation request for the container group to be created, determine the computing power requirement information of the container group to be created;

[0007] The target core is determined from the candidate cores based on the computing power value of the candidate cores in the target processor and the computing power requirement information;

[0008] The container group to be created is created based on the target core.

[0009] According to another aspect of this disclosure, an apparatus for creating a group of containers is provided, comprising:

[0010] The computing power requirement determination module is used to determine the computing power requirement information of the container group to be created based on the creation request of the container group to be created;

[0011] The target core determination module is used to determine the target core from the candidate cores based on the computing power value of the candidate cores in the target processor and the computing power requirement information;

[0012] The container group creation module is used to create the container group to be created based on the target core.

[0013] According to another aspect of this disclosure, an electronic device is provided, comprising:

[0014] At least one processor; and

[0015] A memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform any method described in this disclosure.

[0017] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform any of the methods described in this disclosure.

[0018] According to another aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, represents the method described in any one of the present disclosures.

[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0020] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0021] Figure 1 This is a flowchart of some methods for creating container groups according to embodiments of this disclosure;

[0022] Figure 2A This is a flowchart of another method for creating container groups disclosed in embodiments of this disclosure;

[0023] Figure 2B This is a schematic diagram of the process for creating some container groups according to embodiments of this disclosure;

[0024] Figure 3 This is a flowchart of another method for creating container groups disclosed in embodiments of this disclosure;

[0025] Figure 4 This is a schematic diagram of the structure of some container group creation apparatus disclosed in the embodiments of this disclosure;

[0026] Figure 5 This is a block diagram of an electronic device used to implement the container group creation method disclosed in the embodiments of this disclosure. Detailed Implementation

[0027] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0028] During the research and development process, the applicant discovered that when deploying container groups on Kubernetes worker nodes, the industry typically selects one or more cores from the Kubernetes central processing unit based on the number of cores requested in the deployment request, and then binds the selected cores to the container group on the worker node for container group deployment.

[0029] However, the computing power of each core in a multi-core CPU is not exactly the same. For example, a certain ARM architecture CPU has an eight-core structure, including four large cores and four small cores. The large cores have a main frequency of 2.8GHz, and the small cores have a main frequency of 1.8GHz. It can be seen that the computing power of different cores may vary greatly.

[0030] Therefore, the current method of random scheduling to determine the cores bound to a container group does not take into account the actual situation where the computing power of each CPU core is different; it assumes that all CPU cores have the same computing power. This leads to a situation where if a container group performs a high-computing task but is bound to a low-computing core, the performance of the task will be significantly different from expectations. Conversely, if a container group performs a low-computing task but is bound to a high-computing core, it will result in a waste of computing resources.

[0031] Figure 1 This is a flowchart illustrating some methods for creating container groups according to embodiments of this disclosure. This embodiment can be applied to situations where the processor cores to be bound to the container group to be created are determined. The methods of this embodiment can be executed by the container group creation apparatus disclosed in this disclosure. The apparatus can be implemented in software and / or hardware and can be integrated into any computing-capable electronic device.

[0032] like Figure 1 As shown, the method for creating a container group disclosed in this embodiment may include:

[0033] S101. Based on the creation request for the container group to be created, determine the computing power requirement information of the container group to be created.

[0034] The "Container Group to be Created" refers to the container group that needs to be created on the Kubernetes worker nodes. A container group, or POD, is the smallest unit that can be created and deployed in Kubernetes; it is an application instance within Kubernetes. A container group contains one or more containers, as well as shared resources such as storage and network resources. Containers within the same container group are deployed on the same worker node. The computing power requirement information indicates the CPU computing power required for the container group to handle computing tasks normally. This information includes, but is not limited to, the required computing power level, the required number of cores, and the required computing power value.

[0035] In one implementation, the user assesses the computing power requirements corresponding to the computational workload of the container group to be created, and generates a creation request carrying the computing power requirements for the container group in the client. The client sends the creation request to the Kubernetes Application Programming Interface Service Center, i.e., the API Server, through a preset transmission method.

[0036] After receiving a create request, the API Server determines the target worker node from among all candidate worker nodes in Kubernetes based on their current resource utilization. Optionally, the candidate worker node with the lowest current resource utilization may be selected as the target worker node. The API Server then forwards the create request to the target worker node.

[0037] The Kubelet component in the target worker node receives the creation request, parses the creation request, and obtains the computing power requirement information of the container group to be created recorded in the annotation fields of the creation request.

[0038] By determining the computing power requirements of the container group to be created based on the creation request, a data foundation is laid for subsequently determining the target core based on the computing power requirements.

[0039] S102. Based on the computing power value and computing power requirement information of the candidate cores in the target processor, determine the target core from the candidate cores.

[0040] In this context, the target processor refers to the central processing unit (CPU) mounted on the target working node. There can be one or more target processors, and each target processor includes at least one candidate core. For example, an ARM architecture target processor may include eight candidate cores, which can be divided into four large candidate cores and four small candidate cores. The computing power value of a candidate core reflects its computational capability. Specific forms of representation of the computing power value include, but are not limited to, the frequency value of the candidate core, or the number of floating-point operations performed by the candidate core per unit time. This embodiment does not limit the specific form of the computing power value; any value that can reflect the computational capability of a candidate core can be used as its computing power value.

[0041] In one implementation, the computing power values ​​of each candidate core in the target processor are pre-stored in the configuration center of the API Server. The Kubelet component in the target worker node accesses the configuration center and determines the target core from the candidate cores based on the computing power values ​​of each candidate core in the configuration center and the parsed computing power requirement information.

[0042] Optionally, when the computing power requirement information includes the required computing power level and the required number of cores, the Kubelet component classifies each candidate core according to its computing power value, for example, into three levels: high computing power level, medium computing power level, and low computing power level. The required computing power level is matched with the levels of each candidate core to determine candidate cores of the same level as the required computing power level, and then the target core is determined from these candidate cores based on the required number of cores.

[0043] Optionally, when the computing power requirement information includes the required computing power value, the Kubelet component matches the computing power value of each candidate core with the required computing power value, and selects at least one candidate core with a computing power value greater than or equal to the required computing power value as the target core.

[0044] By determining the target core from the candidate cores based on their computing power values ​​and computing power requirements, the computing power value of the target core is ensured to match the computing power requirements of the container group to be created.

[0045] S103. Create the container group to be created based on the target core.

[0046] In one implementation, the Kubelet component creates the container group to be created on the target worker node by calling the CRI (Container Runtime Interface), and then schedules and binds the successfully created container group to the target core. When the container group executes a computing task, it calls the target core with which the binding relationship was established to process the data.

[0047] This disclosure determines the computing power requirement information of the container group to be created based on the creation request of the container group to be created, and determines the target core from the candidate cores based on the computing power value of the candidate cores in the target processor and the computing power requirement information. Then, the container group to be created is created based on the target core. This achieves the effect of ensuring that the computing power value of the target core is adapted to the computing power requirement information of the container group to be created, improves the accuracy of core scheduling when creating the container group, and avoids the problem of random core scheduling in the prior art, which may lead to insufficient performance of the container group or waste of computing resources.

[0048] Figure 2A This is a flowchart of another method for creating container groups disclosed in the embodiments of this disclosure, which is further optimized and extended based on the above technical solutions, and can be combined with the above optional implementation methods.

[0049] like Figure 2A As shown, the method for creating a container group disclosed in this embodiment may include:

[0050] S201. Based on the creation request for the container group to be created, determine the computing power requirement information of the container group to be created.

[0051] S202. Determine the required computing power level and the required number of cores for the container group to be created based on the computing power demand information, and determine the correlation between the computing power level and the candidate cores based on the computing power value of the candidate cores.

[0052] The required computing power level indicates the level of computing power that the container group to be created needs to bind to, such as high computing power level, medium computing power level, or low computing power level. This embodiment does not limit the specific classification method of computing power level. The required number of cores indicates the number of cores that the container group to be created needs to bind to.

[0053] In one implementation, the Kubelet component in the target worker node obtains computing power requirement information, including the required computing power level and the required number of cores. It then accesses the configuration center in the API Server to obtain the computing power values ​​of each candidate core in the central processing unit (CPU) of the target worker node, and determines the association between the computing power level and the candidate cores based on the computing power values ​​of each candidate core and preset computing power grading rules.

[0054] For example, suppose the central processing unit has three candidate cores: candidate core A, candidate core B, and candidate core C. Candidate core A has a computing power of 1500, candidate core B has a computing power of 2500, and candidate core C has a computing power of 3500. The preset computing power values ​​of 1000-2000 are low computing power level, 2000-3000 are medium computing power level, and 3000-4000 are high computing power level. Then, candidate core A belongs to the low computing power level, candidate core B belongs to the medium computing power level, and candidate core C belongs to the high computing power level.

[0055] S203. Based on the required computing power level, the required number of cores, and the correlation between the computing power level and the candidate cores, determine the target core from the candidate cores.

[0056] In one implementation, the required computing power level and the required number of cores are matched with the correlation between the computing power level and the candidate cores, and the target core is determined from the candidate cores based on the matching results.

[0057] Optionally, S203 includes the following steps A and B:

[0058] A. Match the required computing power level and the correlation between the computing power level and the candidate cores, and determine the first auxiliary core from the candidate cores based on the matching results.

[0059] In one implementation, candidate cores whose associated computing power level matches the required computing power level are used as first auxiliary cores.

[0060] For example, assuming the required computing power level is "high computing power level", and the candidate cores associated with "high computing power level" include candidate core A, candidate core B and candidate core C, then candidate core A, candidate core B and candidate core C will be used as the first auxiliary core.

[0061] B. Determine the target core from the first auxiliary core based on the number of core requirements.

[0062] In one implementation, the target core is determined by randomly selecting from the first auxiliary cores based on the number of required cores.

[0063] In another implementation, the first auxiliary core with the higher computing power value is selected as the target core based on the required number of cores and the computing power value of each first auxiliary core.

[0064] By matching the required computing power level and the correlation between the computing power level and the candidate cores, and determining the first auxiliary core from the candidate cores based on the matching results, and determining the target core from the first auxiliary core based on the number of required cores, the system automatically allocates target cores that meet the required computing power level to the container group to be created, thereby improving the accuracy of core scheduling when the container group is created.

[0065] S204. Create the container group to be created based on the target core.

[0066] Figure 2B This is a schematic diagram of the process for creating some container groups according to embodiments of this disclosure, such as... Figure 2B As shown, the user sends a creation request to the API Server. The API Server determines the target worker node and forwards the creation request to it. The Kubelet component of the target worker node parses and obtains the computing power requirement information, and accesses the API Server's configuration center to determine the association between the computing power level and candidate cores. Then, based on the computing power requirement information, including the required computing power level, the required number of cores, and the association between the computing power level and candidate cores, it determines the target core from the candidate cores. Finally, it creates the container group to be created by calling CRI and binds the created container group to the target core.

[0067] This disclosure determines the required computing power level and the required number of cores for the container group to be created based on computing power demand information, determines the correlation between the computing power level and the candidate cores based on the computing power value of the candidate cores, and determines the target cores from the candidate cores based on the required computing power level, the required number of cores, and the correlation between the computing power level and the candidate cores. This achieves automatic allocation of target cores that meet the required computing power level and the required number of cores to the container group to be created, thereby improving the accuracy of core scheduling during container group creation.

[0068] Based on the above embodiments, the method further includes:

[0069] The Kubelet component periodically checks the established binding relationships between container groups and target cores to determine whether the required computing power level of the container group matches the computing power level associated with the target core, and whether the required number of cores in the container group matches the number of target cores. If not, it proactively triggers the reconstruction of the container group and the rebinding of the target core.

[0070] Figure 3 This is a flowchart of another method for creating container groups disclosed in the embodiments of this disclosure, which is further optimized and extended based on the above technical solutions, and can be combined with the above optional implementation methods.

[0071] like Figure 3 As shown, the method for creating a container group disclosed in this embodiment may include:

[0072] S301. Based on the creation request for the container group to be created, determine the computing power requirement information of the container group to be created.

[0073] S302. Determine the required computing power value of the container group to be created based on the computing power demand information.

[0074] The required computing power value represents the core computing power value required for the container group to be created to process computing tasks normally. The specific form of the required computing power value includes, but is not limited to, the frequency value of the required core, or the number of floating-point operations that the core needs to perform per unit time. This embodiment does not limit the specific form of the required computing power value, as long as the required computing power value and the computing power value of the candidate core are of the same type of computing power value.

[0075] In one implementation, the Kubelet component in the target working node parses the acquired computing power requirement information to determine the required computing power value included in the computing power requirement information.

[0076] S303. Compare the required computing power value with the computing power value of the candidate cores, and determine the target core from the candidate cores based on the comparison results.

[0077] In one implementation, the Kubelet component compares the required computing power value with the computing power value of each candidate core to determine whether any candidate core has a computing power value that can meet the required computing power value. If so, a candidate core is selected as the target core. If not, it determines whether any combination of candidate cores has a combined computing power value that can meet the required computing power value. If so, all candidate cores in the candidate core combination are selected as the target core.

[0078] Optionally, S303 includes the following steps A1, B1, and C1:

[0079] A1. When the computing power of each candidate core is less than the required computing power, combine at least two candidate cores to determine a candidate core group, and determine the combined computing power of each candidate core group.

[0080] In one implementation, if the computing power of each candidate core is less than the required computing power, then at least two candidate cores are combined to obtain candidate core groups with all possible combinations, and the sum of the computing power of the candidate cores in each candidate core group is taken as the combined computing power of the corresponding candidate core group.

[0081] For example, suppose the target processor includes candidate core A, candidate core B, and candidate core C. Assuming that the computing power of each candidate core is less than the required computing power, then at least two candidate cores will be combined 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).

[0082] Assuming the computing power values ​​of candidate core A, candidate core B, and candidate core C are 1000, 2000, and 3000 respectively, then the combined computing power value of the candidate core group (candidate core A, candidate core B) is 3000, the combined computing power value of the candidate core group (candidate core A, candidate core C) is 4000, the combined computing power value of the candidate core group (candidate core B, candidate core C) is 5000, and the combined computing power value of the candidate core group (candidate core A, candidate core B, candidate core C) is 6000.

[0083] B1. Select candidate core groups whose combined computing power value is greater than or equal to the required computing power value as auxiliary core groups.

[0084] In one implementation, the combined computing power value of each candidate core group is compared with the required computing power value, and the candidate core group whose combined computing power value is greater than or equal to the required computing power value is designated as an auxiliary core group.

[0085] For example, suppose the candidate core group includes candidate core group 1, candidate core group 2 and candidate core group 3, and suppose the required computing power is 5000, the combined computing power of candidate core group 1 is 3000, the combined computing power of candidate core group 2 is 5000, and the combined computing power of candidate core group 3 is 6000. Then candidate core group 2 and candidate core group 3 will be used as auxiliary core groups.

[0086] C1. Determine the first computing power difference between the combined computing power value and the required computing power value of each auxiliary core group, and determine the target core from the auxiliary core group based on the number of candidate cores included in each auxiliary core group and the first computing power difference.

[0087] In one implementation, the combined computing power value of each auxiliary core group is calculated by performing a difference operation with the required computing power value to determine a first computing power difference between the combined computing power value of each auxiliary core group and the required computing power value. Then, based on the first computing power difference and the number of candidate cores included in each auxiliary core group, the target core is determined from the auxiliary core group.

[0088] By combining at least two candidate cores to determine candidate core groups when the computing power of each candidate core is less than the required computing power, and determining the combined computing power of each candidate core group, candidate core groups with combined computing power greater than or equal to the required computing power are designated as auxiliary core groups. The first computing power difference between the combined computing power of each auxiliary core group and the required computing power is then determined. Based on the number of candidate cores in each auxiliary core group and the first computing power difference, the target core is determined from the auxiliary core groups. This achieves the effect of selecting candidate core groups whose combined computing power matches the computing power requirement information when the computing power of a candidate core cannot meet the required computing power, thus improving the accuracy of core scheduling during container group creation.

[0089] Optionally, step C1 includes the following steps C11 and C12:

[0090] C11. Select the auxiliary core group with the fewest candidate cores and the smallest difference in first computing power as the target core group.

[0091] In one implementation, the combined computing power value of each auxiliary core group is calculated by subtracting the required computing power value to determine a first computing power difference between the combined computing power value and the required computing power value of each auxiliary core group, and the number of candidate cores included in each auxiliary core group is determined. The number of candidate cores and the first computing power difference are used as two screening criteria to filter the auxiliary core groups, and the auxiliary core group with the fewest number of candidate cores and the smallest first computing power difference is selected as the target core group.

[0092] Specifically, a first screening can be performed based on the number of candidate cores, followed by a second screening based on the first computing power difference, ultimately resulting in the target core group; alternatively, a first screening can be performed based on the first computing power difference, followed by a second screening based on the number of candidate cores, ultimately resulting in the target core group. This embodiment does not limit the order in which the two screening conditions are executed.

[0093] C12. Select the candidate cores included in the target core group as the target cores.

[0094] For example, assuming the target core group includes candidate core A, candidate core B, and candidate core C, then candidate core A, candidate core B, and candidate core C are taken as the target core.

[0095] By using the auxiliary core group with the fewest candidate cores and the smallest difference in first computing power as the target core group, and using the candidate cores included in the target core group as the target cores, the desired computing power value of the container group to be created is achieved while calling a smaller number of candidate cores and consuming less computing resources.

[0096] Optionally, S303 also includes the following steps A2 and B2:

[0097] A2. If there is at least one candidate core whose computing power is greater than or equal to the required computing power, then at least one candidate core shall be used as the second auxiliary core.

[0098] In one implementation, if there is at least one candidate core whose computing power is greater than or equal to the required computing power, then these candidate cores are used as second auxiliary cores.

[0099] For example, assuming the required computing power is 5000, and the computing power values ​​of candidate core A, candidate core B and candidate core C are 4000, 5000 and 6000 respectively, then candidate core B and candidate core C will be used as the second auxiliary core.

[0100] B2. Based on the second computing power difference between the computing power value of each second auxiliary core and the required computing power value, determine the target core from the second auxiliary cores.

[0101] In one implementation, the computing power value of each second auxiliary core is calculated by performing a difference operation with the required computing power value to determine a second computing power difference between the computing power value of each second auxiliary core and the required computing power value, and the second auxiliary core with the smallest second computing power difference is selected as the target core.

[0102] By using at least one candidate core as a second auxiliary core when the computing power of at least one candidate core is greater than or equal to the required computing power, and determining the target core from the second auxiliary cores based on the second computing power difference between the computing power of each second auxiliary core and the required computing power, the system achieves the effect of prioritizing the selection of a candidate core that can meet the required computing power as the target core, thus avoiding excessive waste of computing resources.

[0103] S304. Create the container group to be created based on the target core.

[0104] This disclosure determines the required computing power value of the container group to be created based on the computing power demand information, compares the required computing power value with the computing power value of the candidate cores, and determines the target core from the candidate cores based on the comparison results. This realizes the automatic allocation of target cores that meet the required computing power value to the container group to be created, and improves the accuracy of core scheduling when creating the container group.

[0105] Figure 4 This is a schematic diagram of a container group creation apparatus disclosed in some embodiments of the present disclosure, which can be applied to situations where the processor cores to be bound to the container group to be created are determined. The apparatus of this embodiment can be implemented in software and / or hardware and can be integrated into any electronic device with computing capabilities.

[0106] like Figure 4 As shown, the container group creation device 40 disclosed in this embodiment may include a computing power requirement determination module 41, a target core determination module 42, and a container group creation module 43, wherein:

[0107] The computing power requirement determination module 41 is used to determine the computing power requirement information of the container group to be created based on the creation request of the container group to be created.

[0108] The target core determination module 42 is used to determine the target core from the candidate cores based on the computing power value and computing power requirement information of the candidate cores in the target processor.

[0109] Container group creation module 43 is used to create the container group to be created based on the target kernel.

[0110] Optionally, the target core determination module 42 is specifically used for:

[0111] The required computing power level and number of cores for the container group to be created are determined based on the computing power demand information, and the relationship between the computing power level and the candidate cores is determined based on the computing power value of the candidate cores.

[0112] The target core is determined from the candidate cores based on the required computing power level, the required number of cores, and the correlation between the computing power level and the candidate cores.

[0113] Optionally, the target core determination module 42 is also used for:

[0114] The required computing power level and the correlation between the computing power level and the candidate cores are matched, and the first auxiliary core is determined from the candidate cores based on the matching results.

[0115] The target core is determined from the first auxiliary core based on the number of required cores.

[0116] Optionally, the target core determination module 42 is specifically used for:

[0117] Determine the required computing power value for the container group to be created based on the computing power demand information;

[0118] The required computing power value is compared with the computing power value of the candidate cores, and the target core is determined from the candidate cores based on the comparison results.

[0119] Optionally, the target core determination module 42 is also used for:

[0120] If the computing power of each candidate core is less than the required computing power, at least two candidate cores are combined to determine a candidate core group, and the combined computing power of each candidate core group is determined.

[0121] Candidate core groups whose combined computing power is greater than or equal to the required computing power will be designated as auxiliary core groups.

[0122] Determine the first computing power difference between the combined computing power value and the required computing power value of each auxiliary core group, and determine the target core from the auxiliary core group based on the number of candidate cores included in each auxiliary core group and the first computing power difference.

[0123] Optionally, the target core determination module 42 is also used for:

[0124] The auxiliary core group with the fewest number of candidate cores and the smallest difference in first computing power is selected as the target core group.

[0125] The candidate cores included in the target core group are used as the target cores.

[0126] Optionally, the target core determination module 42 is also used for:

[0127] If at least one candidate core has a computing power value greater than or equal to the required computing power value, then at least one candidate core will be used as the second auxiliary core.

[0128] The target core is determined from the second auxiliary cores based on the second computing power difference between the computing power value of each second auxiliary core and the required computing power value.

[0129] The container group creation apparatus 40 disclosed in this embodiment can execute the container group creation method disclosed in this embodiment, and has the corresponding functional modules and beneficial effects of executing the method. Contents not described in detail in this embodiment can be referred to the descriptions in the method embodiments of this disclosure.

[0130] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0131] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0132] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0133] like Figure 5 As shown, device 500 includes a computing unit 501, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 502 or a computer program loaded from storage unit 508 into random access memory (RAM) 503. RAM 503 may also store various programs and data required for the operation of device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.

[0134] Multiple components in device 500 are connected to I / O interface 505, including: input unit 506, such as keyboard, mouse, etc.; output unit 507, such as various types of monitors, speakers, etc.; storage unit 508, such as disk, optical disk, etc.; and communication unit 509, such as network card, modem, wireless transceiver, etc. Communication unit 509 allows device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0135] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with 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 special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as the container group creation method. For example, in some embodiments, the container group creation method may be implemented as a computer software program tangibly contained 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 on device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the container group creation method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the container group creation method by any other suitable means (e.g., by means of firmware).

[0136] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0137] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0138] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0139] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the 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 can be received in any form (including sound input, voice input, or tactile input).

[0140] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0141] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0142] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0143] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for creating a container group, executed by a target worker node, wherein the target worker node is determined from candidate worker nodes based on the current resource utilization of candidate worker nodes, comprising: Based on the creation request for the container group to be created, determine the computing power requirement information of the container group to be created; The target core is determined from the candidate cores based on the computing power value of the candidate cores in the target processor and the computing power requirement information; wherein, the computing power value of the candidate core is the frequency value of the candidate core, or the number of floating-point operations performed by the candidate core per unit time. Create the container group to be created based on the target core; The step of determining the target core from the candidate cores based on the computing power information of the candidate cores in the target processor and the computing power requirement information includes: The required computing power level and the required number of cores for the container group to be created are determined based on the computing power requirement information, and the association between the computing power level and the candidate cores is determined based on the computing power value of the candidate cores; wherein, the required computing power level indicates the level of computing power of the cores to be bound to the container group to be created; the target processor indicates the central processing unit carried by the target worker node, and the target worker node belongs to Kubernetes; The required computing power level and the required number of cores are matched with the correlation between the computing power level and the candidate cores, and the target core is determined from the candidate cores based on the matching results. The step of determining the target core from the candidate cores based on the computing power value of the candidate cores in the target processor and the computing power requirement information further includes: The required computing power value of the container group to be created is determined based on the computing power requirement information; wherein, the required computing power value is the frequency value of the cores required, or the number of floating-point operations that the cores need to perform per unit time. If the computing power of each candidate core is less than the required computing power, then at least two candidate cores are combined to obtain candidate core groups with all possible combinations, and the sum of the computing power of the candidate cores in each candidate core group is taken as the combined computing power of the corresponding candidate core group. The candidate core groups whose combined computing power value is greater than or equal to the required computing power value are designated as auxiliary core groups; A first computing power difference is determined between the combined computing power value of each auxiliary core group and the required computing power value, and the target core is determined from the auxiliary core group based on the number of candidate cores included in each auxiliary core group and the first computing power difference.

2. The method according to claim 1, wherein, The step of determining the target core from the candidate cores based on the required computing power level, the required number of cores, and the correlation between the computing power level and the candidate cores includes: The required computing power level and the correlation between the computing power level and the candidate cores are matched, and the first auxiliary core is determined from the candidate cores based on the matching results. The target core is determined from the first auxiliary cores based on the required number of cores.

3. The method according to claim 1, wherein, The step of determining the target core from the auxiliary core groups based on the number of candidate cores included in each auxiliary core group and the first computing power difference includes: The auxiliary core group with the fewest number of candidate cores and the smallest first computing power difference is selected as the target core group. The candidate cores included in the target core group are used as the target cores.

4. The method according to claim 1, wherein, The step of comparing the required computing power value with the computing power value of the candidate cores, and determining the target core from the candidate cores based on the comparison result, includes: If at least one candidate core has a computing power value greater than or equal to the required computing power value, the at least one candidate core will be used as the second auxiliary core. The target core is determined from the second auxiliary cores based on the second computing power difference between the computing power value of each second auxiliary core and the required computing power value.

5. A container group creation apparatus, configured on a target worker node, wherein the target worker node is determined from candidate worker nodes based on the current resource utilization rate of candidate worker nodes, comprising: The computing power requirement determination module is used to determine the computing power requirement information of the container group to be created based on the creation request of the container group to be created; The target core determination module is used to determine the target core from the candidate cores based on the computing power value of the candidate cores in the target processor and the computing power requirement information; wherein, the computing power value of the candidate core is the frequency value of the candidate core, or the number of floating-point operations performed by the candidate core per unit time. The container group creation module is used to create the container group to be created based on the target core; Specifically, the target core determination module is used for: The required computing power level and the required number of cores for the container group to be created are determined based on the computing power requirement information, and the association between the computing power level and the candidate cores is determined based on the computing power value of the candidate cores; wherein, the required computing power level indicates the level of computing power of the cores to be bound to the container group to be created; the target processor indicates the central processing unit carried by the target worker node, and the target worker node belongs to Kubernetes; The required computing power level and the required number of cores are matched with the correlation between the computing power level and the candidate cores, and the target core is determined from the candidate cores based on the matching results. Specifically, the target core determination module is further used for: The required computing power value of the container group to be created is determined based on the computing power requirement information; wherein, the required computing power value is the frequency value of the cores required, or the number of floating-point operations that the cores need to perform per unit time. If the computing power of each candidate core is less than the required computing power, then at least two candidate cores are combined to obtain candidate core groups with all possible combinations, and the sum of the computing power of the candidate cores in each candidate core group is taken as the combined computing power of the corresponding candidate core group. The candidate core groups whose combined computing power value is greater than or equal to the required computing power value are designated as auxiliary core groups; A first computing power difference is determined between the combined computing power value of each auxiliary core group and the required computing power value, and the target core is determined from the auxiliary core group based on the number of candidate cores included in each auxiliary core group and the first computing power difference.

6. The apparatus according to claim 5, wherein, The target core determination module is further used for: The required computing power level and the correlation between the computing power level and the candidate cores are matched, and the first auxiliary core is determined from the candidate cores based on the matching results. The target core is determined from the first auxiliary cores based on the required number of cores.

7. The apparatus according to claim 5, wherein, The target core determination module is further used for: The auxiliary core group with the fewest number of candidate cores and the smallest first computing power difference is selected as the target core group. The candidate cores included in the target core group are used as the target cores.

8. The apparatus according to claim 5, wherein, The target core determination module is further used for: If at least one candidate core has a computing power value greater than or equal to the required computing power value, the at least one candidate core will be used as the second auxiliary core. The target core is determined from the second auxiliary cores based on the second computing power difference between the computing power value of each second auxiliary core and the required computing power value.

9. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-4.

11. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-4.

Citation Information

Patent Citations

  • CPU resource allocation method and device, electronic equipment and storage medium

    CN111694658A

  • Task running method and device, mobile terminal and storage medium

    CN112817428A

  • Container creation method and device, equipment, medium and program product

    CN113641457A