CN118093093A - Resource allocation method, apparatus, device, storage medium and program product - Google Patents

Resource allocation method, apparatus, device, storage medium and program product Download PDF

Info

Publication number
CN118093093A
CN118093093A CN202410107732.4A CN202410107732A CN118093093A CN 118093093 A CN118093093 A CN 118093093A CN 202410107732 A CN202410107732 A CN 202410107732A CN 118093093 A CN118093093 A CN 118093093A
Authority
CN
China
Prior art keywords
container
historical
configuration information
resource configuration
resource
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
CN202410107732.4A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202410107732.4A priority Critical patent/CN118093093A/en
Publication of CN118093093A publication Critical patent/CN118093093A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present disclosure provides a resource allocation method, apparatus, device, storage medium, and program product, which can be applied to the cloud computing technology field and the financial field. The resource allocation method comprises the following steps: responding to a received container creation request, and matching M historical container identifications in a storage node according to a container identification to be created indicated by the container creation request to obtain a matching result; under the condition that the matching result represents that a historical container identifier matched with the container identifier to be created exists, evaluating historical container information corresponding to the historical container identifier according to preset evaluation conditions to obtain an evaluation result; according to the evaluation result, adjusting the historical resource configuration information corresponding to the historical container identifier to obtain target resource configuration information; and sending the target resource configuration information to the working node corresponding to the historical container identifier, so that the working node performs resource configuration on the container corresponding to the container identifier to be created according to the target resource configuration information.

Description

Resource allocation method, apparatus, device, storage medium and program product
Technical Field
The present disclosure relates to the field of cloud computing technology and the field of finance, and more particularly, to a resource allocation method, apparatus, device, storage medium, and program product.
Background
With the development of cloud computing technology, the application itself and all its dependent items can be packaged into a container so that it can run in different environments without installing and configuring additional operating systems.
When creating a container, to fully utilize resources and ensure the stability of the system, corresponding resource configuration information is set for the container. The resource configuration information includes a resource soft limit, which may be understood as the minimum resource required for the container to operate.
In the process of implementing the disclosed concept, the inventor finds that at least the following problems exist in the related art: because the soft limit of the container is higher than the actual resource usage information of the container, the resource cannot be fully utilized, and the resource utilization rate is lower.
Disclosure of Invention
In view of this, the present disclosure provides a resource allocation method, apparatus, device, storage medium, and program product.
According to one aspect of the present disclosure, there is provided a resource allocation method including: in response to receiving a container creation request, matching M historical container identifications in a storage node according to a container identification to be created indicated by the container creation request to obtain a matching result, wherein M is a positive integer; under the condition that the matching result represents that a historical container identifier matched with the container identifier to be created exists, evaluating historical container information corresponding to the historical container identifier according to preset evaluation conditions to obtain an evaluation result; according to the evaluation result, adjusting the historical resource configuration information corresponding to the historical container identifier to obtain target resource configuration information; and sending the target resource configuration information to the working node corresponding to the historical container identifier, so that the working node performs resource configuration on the container corresponding to the container identifier to be created according to the target resource configuration information.
According to an embodiment of the present disclosure, the resource allocation method further includes, before evaluating the historical container information corresponding to the historical container identifier according to a preset evaluation condition, obtaining an evaluation result: determining that a container to be created corresponding to the container identifier to be created belongs to a first container type under the condition that the matching result represents that the historical container identifier matched with the container identifier to be created exists; acquiring historical container information corresponding to the historical container identification from the monitoring node; and wherein the monitoring node stores each historical container identifying respective candidate container information, each candidate container information obtained by: and monitoring the historical container corresponding to the historical container identifier by utilizing a monitoring process deployed by the monitoring node to obtain candidate container information.
According to an embodiment of the present disclosure, the history container information includes history resource configuration information and history resource usage information, and the preset evaluation condition includes a first preset threshold value and a second preset threshold value, where the first preset threshold value is smaller than the second preset threshold value; according to preset evaluation conditions, evaluating the historical container information corresponding to the historical container identification, wherein the evaluation result comprises: determining a resource utilization ratio according to the historical resource configuration information and the historical resource use information; and evaluating the resource utilization ratio based on the first preset threshold and the second preset threshold to obtain an evaluation result.
According to an embodiment of the present disclosure, the history resource configuration information includes processor configuration information and memory configuration information, and the history resource usage information includes processor usage information and memory usage information; determining the resource utilization ratio according to the historical resource configuration information and the historical resource utilization information comprises: determining the utilization ratio of the processor according to the configuration information of the processor and the use information of the processor; determining the memory utilization ratio according to the memory configuration information and the memory utilization information; and determining the resource utilization ratio according to the processor utilization ratio and the memory utilization ratio.
According to an embodiment of the present disclosure, when an evaluation result indicates that a resource utilization ratio is less than or equal to a first preset threshold, according to the evaluation result, adjusting historical resource configuration information corresponding to a historical container identifier, to obtain target resource configuration information includes: determining a first preset resource proportion according to the first container type, wherein the first preset resource proportion is used for compressing historical resource configuration information; and adjusting the historical resource configuration information based on the first preset resource proportion to obtain target resource configuration information.
According to an embodiment of the present disclosure, when the evaluation result characterizes that the resource utilization ratio is greater than or equal to a second preset threshold, according to the evaluation result, adjusting the historical resource configuration information corresponding to the historical container identifier, to obtain the target resource configuration information includes: determining a second preset resource proportion according to the first container type, wherein the second preset resource proportion is used for expanding the historical resource configuration information; and adjusting the historical resource configuration information based on the second preset resource proportion to obtain target resource configuration information.
According to an embodiment of the present disclosure, the container creation request further includes resource demand information; the method further comprises the steps of: determining that the container to be created corresponding to the container identifier to be created belongs to a second container type when the history container identifier matched with the container identifier to be created does not exist; determining target resource configuration information according to the resource demand information and a third preset resource proportion corresponding to the second container type; and sending the target resource configuration information to any working node.
According to an embodiment of the present disclosure, the resource configuration method further includes, after transmitting the target resource configuration information to any of the working nodes: storing the container identification to be created and the target resource configuration information in a storage node in an associated manner; and after sending the target resource configuration information to the working node corresponding to the historical container identification: and updating the historical resource configuration information corresponding to the historical container identifier stored in the storage node by utilizing the target resource configuration information.
According to another aspect of the present disclosure, there is provided a resource allocation apparatus including: the matching module is used for responding to the received container creation request, matching M historical container identifications in the storage node according to the container identification to be created indicated by the container creation request to obtain a matching result, wherein M is a positive integer; the evaluation module is used for evaluating the historical container information corresponding to the historical container identifier according to a preset evaluation condition under the condition that the matching result represents that the historical container identifier matched with the container identifier to be created exists, so as to obtain an evaluation result; the adjustment module is used for adjusting the historical resource configuration information corresponding to the historical container identifier according to the evaluation result to obtain target resource configuration information; and the sending module is used for sending the target resource configuration information to the working node corresponding to the historical container identifier so that the working node can carry out resource configuration on the container corresponding to the container identifier to be created according to the target resource configuration information.
According to another aspect of the present disclosure, there is provided an electronic device including: one or more processors; and a memory for storing one or more instructions that, when executed by the one or more processors, cause the one or more processors to implement the method as described above.
According to another aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to implement a method as described above.
According to another aspect of the present disclosure, there is provided a computer program product comprising computer executable instructions which, when executed, are adapted to carry out the method as described above.
According to the embodiment of the disclosure, the container is created based on the target resource configuration information, the target resource configuration information is determined according to the matching result and the evaluation result, the matching result is obtained by matching the historical container identifier according to the container identifier to be created, and the evaluation result is obtained by evaluating the historical container information corresponding to the historical container identifier, so that the resource configuration information of the container to be created can be adjusted to the target resource configuration information according to the matching result and the evaluation result, the resource can be fully utilized, and the resource utilization rate is improved.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments thereof with reference to the accompanying drawings in which:
FIG. 1 schematically illustrates a system architecture in which a resource allocation method may be applied according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a resource allocation method according to an embodiment of the disclosure;
FIG. 3 schematically illustrates an example schematic diagram of a resource allocation method according to an embodiment of the disclosure;
FIG. 4 schematically illustrates an example schematic diagram of a resource allocation process according to an embodiment of the disclosure;
FIG. 5 schematically illustrates a block diagram of a resource allocation apparatus according to an embodiment of the disclosure; and
Fig. 6 schematically illustrates a block diagram of an electronic device adapted to implement a resource allocation method according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a convention should be interpreted in accordance with the meaning of one of skill in the art having generally understood the convention (e.g., "a system having at least one of A, B and C" would include, but not be limited to, systems having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related personal information of the user all conform to the regulations of related laws and regulations, necessary security measures are taken, and the public order harmony is not violated.
In the technical scheme of the disclosure, the authorization or consent of the user is obtained before the personal information of the user is obtained or acquired.
With the development of cloud computing technology, an application itself and all its dependent items can be packaged into one container so that it can run in different environments without installing and configuring an additional operating system.
When creating a container, to fully utilize resources and ensure the stability of the system, corresponding resource configuration information is set for the container. The resource configuration information of the container is used to characterize the resource soft limit of the container, which can be understood as the minimum resource required for the container to operate.
For example, the container's resources are soft limited to 5% CPU and 50MiB memory. It will be appreciated that typically at least 5% of the CPU and 50MiB memory are required to run this container.
In carrying out the disclosed concept, the inventors found that there are at least the following problems in the related art: because the resource soft limit of the container is higher than the resource use information of the container in practice, the resource cannot be fully utilized, and the resource utilization rate is lower.
In order to at least partially solve the technical problems in the related art, the present disclosure provides a resource allocation method, apparatus, device, storage medium, and program product, which can be applied to the cloud computing technical field and the financial field. The resource allocation method comprises the following steps: in response to receiving a container creation request, matching M historical container identifications in a storage node according to a container identification to be created indicated by the container creation request to obtain a matching result, wherein M is a positive integer; under the condition that the matching result represents that a historical container identifier matched with the container identifier to be created exists, evaluating historical container information corresponding to the historical container identifier according to preset evaluation conditions to obtain an evaluation result; according to the evaluation result, adjusting the historical resource configuration information corresponding to the historical container identifier to obtain target resource configuration information; and sending the target resource configuration information to the working node corresponding to the historical container identifier, so that the working node performs resource configuration on the container corresponding to the container identifier to be created according to the target resource configuration information.
It should be noted that, the resource allocation method and the device provided by the embodiment of the disclosure may be used in the technical field of cloud computing and the financial field, for example, in cloud computing. The resource allocation method and the device provided by the embodiment of the disclosure can be applied to any field except the cloud computing field and the financial field, for example, the resource allocation. The application fields of the resource allocation method and the device provided by the embodiment of the disclosure are not limited.
According to one embodiment of the present disclosure, container creation may be performed using a K8s cluster tool. K8s, full scale kubernetes, is a transplantable container arrangement management tool for container service, and can realize functions of container cluster deployment, management, maintenance and the like. The K8s is deployed in a cluster mode and comprises a management node, a working node and a storage node. According to another embodiment of the present disclosure, other tools may also be utilized for container creation, such as the Docker Swart cluster tool, etc.
Fig. 1 schematically illustrates a system architecture to which a resource allocation method may be applied according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, a system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is a medium used to provide a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 through the network 104 using at least one of the first terminal device 101, the second terminal device 102, the third terminal device 103, to receive or send messages, etc. Various communication client applications, such as a shopping class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only) may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103.
The first terminal device 101, the second terminal device 102, the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that, the resource allocation method provided by the embodiments of the present disclosure may be generally performed by the server 105. Accordingly, the resource allocation apparatus provided by the embodiments of the present disclosure may be generally disposed in the server 105. The resource allocation method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105. Accordingly, the resource allocation apparatus provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103 and/or the server 105.
Alternatively, the resource allocation method provided by the embodiment of the present disclosure may also be performed by the first terminal device 101, the second terminal device 102, or the third terminal device 103, or may also be performed by other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103. Accordingly, the resource allocation apparatus provided by the embodiments of the present disclosure may also be provided in the first terminal device 101, the second terminal device 102, or the third terminal device 103, or in other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
It should be noted that the sequence numbers of the respective operations in the following methods are merely representative of the operations for the purpose of description, and should not be construed as representing the order of execution of the respective operations. The method need not be performed in the exact order shown unless explicitly stated.
Fig. 2 schematically illustrates a flow chart of a resource allocation method according to an embodiment of the present disclosure.
As shown in fig. 2, the resource allocation method 200 includes operations S210 to S240.
In operation S210, in response to receiving the container creation request, M historical container identifiers in the storage node are matched according to the container identifier to be created indicated by the container creation request, so as to obtain a matching result, where M is a positive integer.
In operation S220, in the case that the matching result indicates that there is a historical container identifier matching with the container identifier to be created, according to a preset evaluation condition, evaluating the historical container information corresponding to the historical container identifier, to obtain an evaluation result.
In operation S230, according to the evaluation result, the historical resource configuration information corresponding to the historical container identifier is adjusted to obtain the target resource configuration information.
In operation S240, the target resource allocation information is transmitted to the working node corresponding to the history container identifier, so that the working node performs resource allocation on the container corresponding to the container identifier to be created according to the target resource allocation information.
According to an embodiment of the present disclosure, the container creation request may be a request message sent to the server by the client in the case where the user initiates the container to be created. The to-be-created container identification may be used to characterize the to-be-created container.
According to embodiments of the present disclosure, the storage node may be used to store the names of history containers, the number of working nodes, and the resource usage of each working node, etc. The historical container identification may be used to characterize the historical container.
According to the embodiment of the disclosure, a container creation request can be sent to a management node, a matching operation is performed on the historical container identification in the storage node according to the container identification to be created, and whether the historical container identification matched with the container identification to be created exists or not is taken as a matching result.
According to an embodiment of the present disclosure, the historical container information may include historical resource configuration information and historical resource usage information. The history resource allocation information may be understood as resource allocation information of the history container, and the history resource usage information may be understood as resource usage information of the history container.
According to the embodiment of the disclosure, when the matching result represents that the historical container identifier matched with the container identifier to be created exists, the evaluation operation can be performed according to the preset evaluation condition based on the resource configuration information to be created and the historical container information, and the resource utilization condition of the historical container is taken as the evaluation result.
According to an embodiment of the present disclosure, the preset evaluation condition may include comparing the resource utilization ratio of the historical container with a preset threshold, and the preset evaluation condition may also include scoring the resource utilization ratio of the historical container according to a preset standard, which is not limited herein.
According to the embodiment of the disclosure, after the evaluation result is determined, the historical resource configuration information can be reasonably and correspondingly adjusted according to the evaluation result to obtain the target resource configuration information.
According to the embodiment of the disclosure, the target resource configuration information can be sent to the selected working node, and the resource configuration of the container to be created is carried out according to the target resource configuration information. According to one embodiment of the present disclosure, the selected worker nodes include worker nodes corresponding to historical container identifications or any worker nodes that meet the target resource configuration information requirements.
According to one embodiment of the disclosure, after obtaining the target resource configuration information of the container to be created, the target resource configuration information may be sent to a working node corresponding to the historical container identifier matched with the container identifier to be created, so that the working node performs resource configuration on the container to be created according to the target resource configuration information.
According to the embodiment of the disclosure, the container is created based on the target resource configuration information, the target resource configuration information is determined according to the matching result and the evaluation result, the matching result is obtained by matching the historical container identifier according to the container identifier to be created, and the evaluation result is obtained by evaluating the historical container information corresponding to the historical container identifier, so that the resource configuration information of the container to be created can be adjusted to the target resource configuration information according to the matching result and the evaluation result, the resource can be fully utilized, and the resource utilization rate is improved.
The resource allocation method 200 according to the embodiment of the present disclosure is further described below with reference to fig. 3 to 4.
In accordance with one embodiment of the present disclosure, in operation S210, the container creation request may include a name of a container to be created. And performing matching operation on the names of the historical containers in the storage node according to the names of the containers to be created, so as to obtain a matching result.
According to an embodiment of the present disclosure, the matching result may include: there is a historical container identification that matches the container identification to be created or there is no historical container identification that matches the container identification to be created.
According to an embodiment of the present disclosure, the resource allocation method may further include the following operations before operation S220. And determining that the container to be created corresponding to the container identifier to be created belongs to the first container type under the condition that the matching result indicates that the historical container identifier matched with the container identifier to be created exists. Historical container information corresponding to the historical container identification is obtained from the monitoring node.
Determining that the container to be created belongs to the first container type may be understood as determining that the creation request of the container to be created belongs to a rebuilding or upgrade history container, according to embodiments of the present disclosure.
According to an embodiment of the disclosure, the monitoring node stores candidate container information for each historical container identification. The historical container information may include any of the candidate container information.
According to an embodiment of the present disclosure, each candidate container information is obtained by: and monitoring the historical container corresponding to the historical container identifier by utilizing a monitoring process deployed by the monitoring node to obtain candidate container information.
According to an embodiment of the present disclosure, the candidate container information includes candidate container resource configuration information and candidate container resource usage information.
According to the embodiment of the disclosure, the monitoring node is used for monitoring and recording the resource use information, the running state and other load information of each container in real time. The resource utilization ratio of the container can be evaluated according to the information recorded by the monitoring nodes, so that resource optimization can be performed in a targeted manner, the arrangement of the monitoring nodes is beneficial to improving the utilization rate of resources, and the stability and the availability of the system are ensured, so that the system can be managed and maintained better.
According to an embodiment of the present disclosure, the preset evaluation condition includes a first preset threshold value and a second preset threshold value, the first preset threshold value being smaller than the second preset threshold value in operation S220. According to an embodiment of the present disclosure, operation S220 may include the following operations: determining a resource utilization ratio according to the historical resource configuration information and the historical resource use information; and evaluating the resource utilization ratio based on the first preset threshold and the second preset threshold to obtain an evaluation result.
According to the embodiment of the disclosure, in the case that there is a historical container identifier matched with the container identifier to be created, for the historical container corresponding to the historical container identifier, a ratio between the historical resource usage information and the historical resource configuration information may be calculated first, and a resource utilization ratio may be obtained. And then obtaining an evaluation result according to the size relation between the resource utilization ratio and the first preset threshold value and/or the size relation between the resource utilization ratio and the second preset threshold value.
According to embodiments of the present disclosure, the evaluation result may include a higher container load or a lower container load. Under the condition that the container to be created belongs to reconstruction or upgrading of the historical container, the actual load condition of the historical container matched with the container to be created can be judged based on the evaluation result, and according to the actual load, the historical resource configuration information can be correspondingly adjusted to the target resource configuration information, so that the operation requirement of the container to be created is met, the resource waste is reduced, and the utilization rate of resources is effectively improved.
According to embodiments of the present disclosure, the historical resource configuration information may include processor configuration information and memory configuration information; the historical resource usage information may include processor usage information and memory usage information. According to an embodiment of the present disclosure, determining a resource utilization ratio from historical resource configuration information and historical resource usage information includes: determining the utilization ratio of the processor according to the configuration information of the processor and the use information of the processor; determining the memory utilization ratio according to the memory configuration information and the memory utilization information; and determining the resource utilization ratio according to the processor utilization ratio and the memory utilization ratio.
According to one embodiment of the disclosure, the ratio of the processor usage information to the processor configuration information may be calculated to obtain a processor utilization ratio; the ratio of the memory use information to the memory configuration information can be calculated to obtain the memory use ratio; the weighted value of the processor utilization ratio and the memory utilization ratio can be calculated to obtain the resource utilization ratio. For example, the weight ratio of the processor utilization to the memory utilization may be selected to be 1:1.
According to an embodiment of the present disclosure, the evaluation result may include that the resource utilization ratio is less than or equal to a first preset threshold or that the resource utilization ratio is greater than or equal to a second preset threshold.
According to an embodiment of the present disclosure, in a case where the evaluation result characterizes that the resource utilization ratio is less than or equal to the first preset threshold, operation S230 includes: determining a first preset resource proportion according to the first container type; and adjusting the historical resource configuration information based on the first preset resource proportion to obtain target resource configuration information. According to an embodiment of the present disclosure, the first preset resource proportion is used for compressing the historical resource configuration information.
According to an embodiment of the present disclosure, the evaluation result indicates that the resource utilization ratio is less than or equal to the first preset threshold, which may be understood as that the container load is low, and the historical resource configuration information needs to be compressed to obtain the target resource configuration information, so as to improve the resource utilization ratio. For example only, the first preset threshold may be selected to be a continuous 5 natural gift source utilization of 30%.
As an example, the standard resource proportion may be set first, then the first preset resource proportion is determined to be the selected standard resource proportion according to the first preset rule, and the historical resource configuration information is compressed. According to one embodiment of the present disclosure, the resource proportion may be understood as a ratio between the resource configuration information before adjustment and the resource configuration information after adjustment. The standard resource proportion may comprise 1,2, 4, 6 and 8 in order of increasing levels. The first preset rule may include: when the vessel load is low, the standard resource proportion of the vessel is adjusted up by one stage. For example, the current standard resource ratio of the container is 2, and when the load of the container is low, the standard resource ratio is adjusted up by one step, that is, the standard resource ratio of the container is adjusted to be 4.
Alternatively, the first preset resource proportion may also be calculated based on a machine learning algorithm, without limitation. For example, information such as historical resource configuration information, historical resource usage information, and evaluation results may be input into a deep learning model based on a recurrent neural network (Recurrent Neural Network, RNN) to obtain a first preset resource proportion.
According to an embodiment of the present disclosure, in a case where the evaluation result characterizes that the resource utilization ratio is greater than or equal to the second preset threshold, operation S230 includes: determining a second preset resource proportion according to the first container type; and adjusting the historical resource configuration information based on the second preset resource proportion to obtain target resource configuration information. According to an embodiment of the present disclosure, the second preset resource proportion is used to expand the historical resource configuration information.
According to an embodiment of the present disclosure, the evaluation result indicates that the resource utilization ratio is greater than or equal to the second preset threshold value, which may be understood as that the container load is higher, and the historical resource configuration information needs to be expanded to obtain the target resource configuration information so as to meet the container operation requirement. For example only, the second preset threshold may be selected to be a continuous 5 natural gift source utilization of 75%.
As an example, the standard resource proportion may be set first, then the second preset resource proportion is determined to be the selected standard resource proportion according to the second preset rule, and the historical resource configuration information is expanded. According to one embodiment of the present disclosure, the first preset rule may include: when the vessel load is low, the standard resource ratio of the vessel is adjusted down by one stage. For example, the current standard compression ratio of the container is 4, and when the load of the container is high, the standard resource ratio is adjusted down by one step, that is, the standard resource ratio of the container is adjusted to 2.
Alternatively, the second preset resource proportion may also be calculated based on a machine learning algorithm, without limitation. For example, the information such as the historical resource configuration information, the historical resource usage information, the evaluation result and the like may be input into a deep learning model based on the recurrent neural network, so as to obtain the second preset resource proportion.
According to an embodiment of the present disclosure, the container creation request may further include resource requirement information of the container to be created in operation S210. The resource allocation method further comprises the following steps: determining that the container to be created corresponding to the container identifier to be created belongs to a second container type when the history container identifier matched with the container identifier to be created does not exist; determining target resource configuration information according to the resource demand information and a third preset resource proportion corresponding to the second container type; and sending the target resource configuration information to any working node.
According to an embodiment of the present disclosure, determining that the container to be created belongs to the second container type may be understood as determining that the creation request of the container to be created belongs to the newly created container.
According to embodiments of the present disclosure, the resource requirement information of the container to be created may include processor requirement information and memory requirement information of the container to be created. The resource requirement information may be understood as a soft limitation of the resources requested by the container to be created.
According to an embodiment of the present disclosure, in case the container to be created belongs to a second container type, the second container type has a corresponding third preset resource proportion. According to one embodiment of the present disclosure, the third preset resource proportion may be understood as a ratio of resource demand information of the container to be created to target resource configuration information of the container to be created. As just one example, the third preset resource ratio may be selected to be 1.
According to the embodiment of the disclosure, the target resource configuration information of the container to be created can be determined according to the resource demand information and the third resource proportion. For example, the resource requirement information of the container to be created is selected as 5% of the memories of the CPU and 50 mibs, the third preset resource proportion is selected as 1, and the target resource configuration information of the container to be created may be 5% of the memories of the CPU and 50 mibs.
According to the embodiment of the disclosure, after the target configuration information of the container to be created is obtained under the condition that the container to be created is determined to belong to the second container type, the target resource configuration information can be sent to any working node meeting the requirement of the target resource configuration information, so that the working node performs resource configuration on the container to be created according to the target resource configuration information.
By the method, the resource configuration of the container to be created can be flexibly carried out according to the target resource configuration information and the real-time working condition of the working node in the system, and the resource utilization rate is improved.
According to an embodiment of the present disclosure, the resource allocation method further includes: after the target resource configuration information is sent to any working node, the to-be-created container identification and the target resource configuration information are stored in a storage node in an associated mode; and after the target resource configuration information is sent to the working node corresponding to the history container identifier, updating the history resource configuration information corresponding to the history container identifier stored in the storage node by using the target resource configuration information.
Through the setting, the container related information stored in the storage node can be updated in real time, so that resource management and system maintenance can be better performed.
Fig. 3 schematically illustrates an example schematic diagram of a resource allocation method according to an embodiment of the disclosure.
As shown in fig. 3, after receiving the container creation request, the management node 301 may match M historical container identifiers in the storage node 302 according to the container identifier to be created indicated by the container creation request, to obtain a matching result. M is a positive integer.
In the event that the match result is characterized by the presence of a historical container identification that matches the container identification to be created, it may be determined that the container to be created belongs to the first container type. In the event that the match result characterizes that there is no historical container identification matching the container identification to be created, it may be determined that the container to be created belongs to the second container type.
In the case that the container to be created is determined to belong to the first container type, historical container information corresponding to the historical container identifier may be acquired from the monitoring node 303, and the historical container information may be evaluated according to a preset evaluation condition, so as to obtain an evaluation result.
And according to the evaluation result and the first resource proportion or the second resource proportion corresponding to the evaluation result, adjusting the historical resource configuration information corresponding to the historical container identifier to obtain the target resource configuration information. The target resource configuration information may be sent to the working node 304 corresponding to the historical container identifier for resource configuration, and the historical resource configuration information corresponding to the historical container identifier stored in the storage node 302 may be updated with the target resource configuration information.
In the case where it is determined that the container to be created belongs to the second container type, the target resource configuration information may be determined according to the resource demand information included in the container creation request and the third resource proportion corresponding to the second container type. The target resource configuration information may be sent to any of the working nodes 305 that satisfies the target resource configuration information and the container identification to be created is associated with the target resource configuration information to store the value storage node 302.
Fig. 4 schematically illustrates an example schematic diagram of a resource allocation process according to an embodiment of the disclosure.
As shown in fig. 4, the container creation request 401 may include a container identifier 401_1 to be created, a name 401_2 of the container to be created, and resource requirement information 401_3 of the container to be created, after receiving the container creation request 401, M historical container identifiers may be matched according to the container creation request 401, to obtain a matching result 402, and the matching result 402 may include the existence of a historical container identifier matched with the container identifier 401_1 to be created or the absence of a historical container identifier matched with the container identifier 401_1 to be created.
In case the matching result 402 characterizes that there is a historical container identification matching the container identification 401_1 to be created, it may be determined that the container to be created corresponding to the container identification 401_1 to be created belongs to the first container type 403. After determining that the container to be created corresponding to the created container identification 401_1 belongs to the first container type 403, historical container information 405 corresponding to the historical container identification 402_1 may be acquired. The history container information 405 may include history resource configuration information 405_1 and history resource usage information 405_2. The history resource configuration information 405_1 may include processor configuration information and memory configuration information, and the history resource usage information 405_2 may include processor usage information and memory usage information.
The resource utilization ratio 406 may be determined from the historical resource configuration information 405_1 and the historical resource usage information 405_2. The resource utilization ratio 406 may include a processor utilization ratio and a memory utilization ratio, the processor utilization ratio may be determined according to processor configuration information and processor usage information, and the memory utilization ratio may be determined according to memory configuration information and memory usage information.
The resource utilization ratio 406 corresponding to the historical container identifier may be evaluated according to a preset evaluation condition, to obtain an evaluation result 407. The preset evaluation condition may include a first preset threshold value and a second preset threshold value. The evaluation result 407 may include that the resource utilization ratio 406 is less than or equal to a first preset threshold or that the resource utilization ratio 406 is greater than or equal to a second preset threshold.
In case the evaluation result indicates that the resource utilization ratio 406 is smaller than or equal to the first preset threshold, a first preset resource ratio 408 may be determined according to the first container type 403, where the first preset resource ratio 408 is used to compress the historical resource configuration information 405_1. The historical resource configuration information 405_1 may be adjusted based on the first preset resource proportion 408 to obtain the target resource configuration information 411_1.
In case the evaluation result indicates that the resource utilization ratio 406 is greater than or equal to the second preset threshold, a second preset resource ratio 409 may be determined according to the first container type 403, where the second preset resource ratio 409 is used to expand the historical resource configuration information 405_1. The historical resource configuration information 405_1 may be adjusted based on the first preset resource proportion 409 to obtain the target resource configuration information 411_1.
In case the matching result characterizes that there is no historical container identification matching the container identification to be created 401_1, it may be determined that the container to be created corresponding to the container identification to be created belongs to the second container type 404. After determining that the container to be created corresponding to the created container identification belongs to the second container type 404, the target resource configuration information 411_2 may be determined according to the resource demand information 401_3 of the container to be created and the third preset resource proportion 410 corresponding to the second container type 404.
In the case that the matching result indicates that there is a historical container identifier matched with the container identifier 401_1 to be created, after the target resource configuration information 411_1 is obtained, the target resource configuration information 411_1 may be sent to the working node 412 corresponding to the historical container identifier, so that the working node 412 performs resource configuration on the container corresponding to the container identifier 401_1 to be created according to the target resource configuration information 411_1. After the target resource configuration information 411_1 is sent to the worker node 412, the stored historical resource configuration information 405_1 corresponding to the historical container identification may be updated.
In the case that the matching result indicates that there is no historical container identifier matched with the container identifier 401_1 to be created, after the target resource configuration information 411_2 is obtained, the target resource configuration information 411_2 may be sent to any working node 412 meeting the requirement of the target resource configuration information, so that the working node 412 performs resource configuration on the container to be created according to the target resource configuration information 411_2. After the target resource configuration information 411_2 is sent to the working node 412, the container identification to be created 401_1 and the target resource configuration information 411_2 may be stored in association.
The above is only an exemplary embodiment, but is not limited thereto, and other resource allocation methods known in the art may be included as long as the resource allocation can be implemented.
Fig. 5 schematically illustrates a block diagram of a resource allocation apparatus according to an embodiment of the disclosure.
As shown in fig. 5, the resource configuration apparatus 500 may include a matching module 510, an evaluation module 520, an adjustment module 530, and a transmission module 540.
And the matching module 510 is configured to, in response to receiving the container creation request, match M historical container identifiers in the storage node according to the container identifier to be created indicated by the container creation request, to obtain a matching result, where M is a positive integer.
And the evaluation module 520 is configured to evaluate, according to a preset evaluation condition, historical container information corresponding to the historical container identifier to obtain an evaluation result when the matching result indicates that the historical container identifier matched with the container identifier to be created exists.
And the adjusting module 530 is configured to adjust the historical resource configuration information corresponding to the historical container identifier according to the evaluation result, so as to obtain the target resource configuration information.
And the sending module 540 is configured to send the target resource configuration information to the working node corresponding to the historical container identifier, so that the working node performs resource configuration on the container corresponding to the container identifier to be created according to the target resource configuration information.
According to an embodiment of the present disclosure, the matching module 510 may include a first acquisition sub-module, a matching sub-module, and a container type determination sub-module.
The first acquisition sub-module is used for acquiring the identification of the container to be created, the name of the container to be created and the resource demand information of the container to be created according to the container creation request.
And the matching sub-module is used for matching the historical container identifiers in the storage nodes according to the container identifiers to be created to obtain a matching result.
The container type determining submodule is used for determining that a container to be created corresponding to the container identifier to be created belongs to a first container type under the condition that the container identifier is in history container identifier matched with the container identifier to be created; and determining that the container to be created corresponding to the container to be created belongs to the second container type when the history container identifier matched with the container to be created does not exist.
According to an embodiment of the present disclosure, the resource configuration device 500 may further include a monitoring module.
And the monitoring module is used for monitoring the historical container to obtain candidate container information.
According to an embodiment of the present disclosure, the evaluation module 520 may include a second acquisition sub-module, a resource utilization ratio determination sub-module, and an evaluation sub-module.
And the second acquisition sub-module is used for acquiring the historical container information corresponding to the historical container identification from the monitoring module.
And the resource utilization ratio determining sub-module is used for determining the resource utilization ratio according to the historical resource configuration information and the historical resource utilization information.
And the evaluation sub-module is used for evaluating the resource utilization ratio based on the first preset threshold value and the second preset threshold value to obtain an evaluation result.
According to an embodiment of the present disclosure, the resource utilization ratio determination submodule may include a processor ratio determination unit and a memory ratio determination unit.
And the processor proportion determining unit is used for determining the processor utilization proportion according to the processor configuration information and the processor use information.
And the memory proportion determining subunit is used for determining the memory utilization proportion according to the memory configuration information and the memory utilization information.
According to an embodiment of the present disclosure, the adjustment module 530 may include a compression sub-module, a first adjustment sub-module, an expansion sub-module, a second adjustment sub-module, and a third determination sub-module.
And the compression sub-module is used for determining a first preset resource proportion according to the first container type.
The first adjustment sub-module is used for adjusting the historical resource configuration information based on a first preset resource proportion to obtain target resource configuration information.
And the expansion submodule is used for determining a second preset resource proportion according to the first container type.
And the second adjustment sub-module is used for adjusting the historical resource configuration information based on a second preset resource proportion to obtain target resource configuration information.
And the third determining submodule is used for determining target resource configuration information according to the resource demand information and a third preset resource proportion corresponding to the second container type.
According to an embodiment of the present disclosure, the transmitting module 540 may include a first transmitting sub-module and a second transmitting sub-module.
And the first sending submodule is used for sending the target resource configuration information to the working node corresponding to the historical container identifier under the condition that the historical container identifier matched with the container identifier is created.
And the second sending submodule is used for sending the target resource configuration information to any working node under the condition that the historical container identifier matched with the created container identifier does not exist.
According to an embodiment of the present disclosure, the resource configuration device 500 may further include a resource configuration module.
And the resource configuration module is used for carrying out resource configuration on the container corresponding to the container identifier to be created according to the target resource configuration information.
According to an embodiment of the present disclosure, the resource configuration device 500 may further include a storage module.
And the storage module is used for storing the history container identification.
According to embodiments of the present disclosure, the storage module may include a storage sub-module and an update sub-module.
And the storage sub-module is used for storing the to-be-created container identification and the target resource configuration information in the storage module in an associated manner after the target resource configuration information is sent to any working node.
And the updating sub-module is used for updating the historical resource configuration information corresponding to the historical container identifier stored in the storage module by utilizing the target resource configuration information after the target resource configuration information is sent to the working node corresponding to the historical container identifier.
Any number of modules, sub-modules, units, sub-units, or at least some of the functionality of any number of the sub-units according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented as split into multiple modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or in any other reasonable manner of hardware or firmware that integrates or encapsulates the circuit, or in any one of or a suitable combination of three of software, hardware, and firmware. Or one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be at least partially implemented as computer program modules, which, when executed, may perform the corresponding functions.
For example, any of the matching module 510, the evaluation module 520, the adjustment module 530, and the sending module 540 may be combined in one module/unit/sub-unit or any of the modules/units/sub-units may be split into a plurality of modules/units/sub-units. Or at least some of the functionality of one or more of these modules/units/sub-units may be combined with at least some of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to embodiments of the present disclosure, at least one of the matching module 510, the evaluation module 520, the adjustment module 530, and the sending module 540 may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable way of integrating or packaging the circuits, or in any one of or a suitable combination of any of the three. Or at least one of the matching module 510, the evaluation module 520, the adjustment module 530 and the sending module 540 may be at least partly implemented as a computer program module which, when run, may perform the respective functions.
It should be noted that, in the embodiment of the present disclosure, the resource allocation device portion corresponds to the resource allocation method portion in the embodiment of the present disclosure, and the description of the resource allocation device portion specifically refers to the resource allocation method portion, which is not described herein.
Fig. 6 schematically illustrates a block diagram of an electronic device adapted to implement a resource allocation method according to an embodiment of the disclosure. The electronic device shown in fig. 6 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 6, a computer electronic device 600 according to an embodiment of the present disclosure includes a processor 601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 609 into a Random Access Memory (RAM) 603. The processor 601 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. Processor 601 may also include on-board memory for caching purposes. The processor 601 may comprise a single processing unit or a plurality of processing units for performing different actions of the method flows according to embodiments of the disclosure.
In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. The processor 601 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 602 and/or the RAM 603. Note that the program may be stored in one or more memories other than the ROM 602 and the RAM 603. The processor 601 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the electronic device 600 may also include an input/output (I/O) interface 605, the input/output (I/O) interface 605 also being connected to the bus 604. The electronic device 600 may also include one or more of the following components connected to an input/output (I/O) interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to an input/output (I/O) interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on drive 610 so that a computer program read therefrom is installed as needed into storage section 608.
According to embodiments of the present disclosure, the method flow according to embodiments of the present disclosure may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 601. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: 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), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 602 and/or RAM 603 and/or one or more memories other than ROM 602 and RAM 603 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program comprising program code for performing the methods provided by the embodiments of the present disclosure, the program code for causing an electronic device to implement the resource allocation methods provided by the embodiments of the present disclosure when the computer program product is run on the electronic device.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 601. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and/or installed from the removable medium 611. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be combined in various combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. These examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (12)

1. A resource allocation method, comprising:
Responding to a received container creation request, and matching M historical container identifications in a storage node according to a container identification to be created indicated by the container creation request to obtain a matching result, wherein M is a positive integer;
Under the condition that the matching result represents that a historical container identifier matched with the container identifier to be created exists, evaluating historical container information corresponding to the historical container identifier according to a preset evaluation condition to obtain an evaluation result;
According to the evaluation result, adjusting the historical resource configuration information corresponding to the historical container identifier to obtain target resource configuration information; and
And sending the target resource configuration information to a working node corresponding to the historical container identifier, so that the working node performs resource configuration on the container corresponding to the container identifier to be created according to the target resource configuration information.
2. The method of claim 1, further comprising, before evaluating the historical container information corresponding to the historical container identifier according to a preset evaluation condition, obtaining an evaluation result:
Determining that a container to be created corresponding to the container identifier to be created belongs to a first container type under the condition that the matching result represents that a history container identifier matched with the container identifier to be created exists;
acquiring historical container information corresponding to the historical container identification from a monitoring node; and
Wherein the monitoring node stores candidate container information for each historical container identification, and each candidate container information is obtained by the following way:
and monitoring the history container corresponding to the history container identifier by utilizing the monitoring process deployed by the monitoring node to obtain the candidate container information.
3. The method of claim 2, wherein the historical container information includes the historical resource configuration information and historical resource usage information, the preset evaluation condition includes a first preset threshold and a second preset threshold, the first preset threshold being less than the second preset threshold;
And evaluating the historical container information corresponding to the historical container identifier according to a preset evaluation condition, wherein the evaluation result comprises:
Determining a resource utilization ratio according to the historical resource configuration information and the historical resource use information; and
And based on the first preset threshold value and the second preset threshold value, evaluating the resource utilization ratio to obtain the evaluation result.
4. The method of claim 3, wherein the historical resource configuration information comprises processor configuration information and memory configuration information, and the historical resource usage information comprises processor usage information and memory usage information;
the determining the resource utilization ratio according to the historical resource configuration information and the historical resource utilization information comprises:
determining a processor utilization ratio according to the processor configuration information and the processor use information;
determining a memory utilization ratio according to the memory configuration information and the memory utilization information; and
And determining the resource utilization ratio according to the processor utilization ratio and the memory utilization ratio.
5. The method of claim 3, wherein, in the event that the evaluation result characterizes the resource utilization ratio as being less than or equal to the first preset threshold,
And according to the evaluation result, adjusting the historical resource configuration information corresponding to the historical container identifier to obtain target resource configuration information, wherein the step of obtaining the target resource configuration information comprises the following steps:
Determining a first preset resource proportion according to the first container type, wherein the first preset resource proportion is used for compressing the historical resource configuration information; and
And adjusting the historical resource configuration information based on the first preset resource proportion to obtain the target resource configuration information.
6. The method according to claim 3, wherein, in the case where the evaluation result characterizes that the resource utilization ratio is greater than or equal to the second preset threshold,
And according to the evaluation result, adjusting the historical resource configuration information corresponding to the historical container identifier to obtain target resource configuration information, wherein the step of obtaining the target resource configuration information comprises the following steps:
Determining a second preset resource proportion according to the first container type, wherein the second preset resource proportion is used for expanding the historical resource configuration information; and
And adjusting the historical resource allocation information based on the second preset resource proportion to obtain the target resource allocation information.
7. The method of any of claims 1 to 6, wherein the container creation request further comprises resource requirement information;
the method further comprises the steps of:
Determining that the container to be created corresponding to the container identifier to be created belongs to a second container type under the condition that the historical container identifier matched with the container identifier to be created does not exist;
Determining the target resource allocation information according to the resource demand information and a third preset resource proportion corresponding to the second container type; and
And sending the target resource configuration information to any working node.
8. The method of claim 7, further comprising, after the sending the target resource configuration information to any working node:
Storing the container identifier to be created and the target resource configuration information in an associated mode to the storage node; and
After said sending said target resource configuration information to a working node corresponding to said historical container identification:
and updating the historical resource configuration information corresponding to the historical container identifier stored in the storage node by utilizing the target resource configuration information.
9. A resource allocation apparatus, comprising:
The matching module is used for responding to a received container creation request, matching M historical container identifications in a storage node according to a container identification to be created indicated by the container creation request to obtain a matching result, wherein M is a positive integer;
the evaluation module is used for evaluating the historical container information corresponding to the historical container identifier according to a preset evaluation condition under the condition that the matching result represents that the historical container identifier matched with the container identifier to be created exists, so as to obtain an evaluation result;
the adjustment module is used for adjusting the historical resource configuration information corresponding to the historical container identifier according to the evaluation result to obtain target resource configuration information; and
And the sending module is used for sending the target resource configuration information to a working node corresponding to the historical container identifier so that the working node can carry out resource configuration on the container corresponding to the container identifier to be created according to the target resource configuration information.
10. An electronic device, comprising:
one or more processors;
A memory for storing one or more instructions,
Wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1 to 8.
11. A computer readable storage medium having stored thereon executable instructions which when executed by a processor cause the processor to implement the method of any of claims 1 to 8.
12. A computer program product comprising computer executable instructions for implementing the method of any one of claims 1 to 8 when executed.
CN202410107732.4A 2024-01-25 2024-01-25 Resource allocation method, apparatus, device, storage medium and program product Pending CN118093093A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410107732.4A CN118093093A (en) 2024-01-25 2024-01-25 Resource allocation method, apparatus, device, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410107732.4A CN118093093A (en) 2024-01-25 2024-01-25 Resource allocation method, apparatus, device, storage medium and program product

Publications (1)

Publication Number Publication Date
CN118093093A true CN118093093A (en) 2024-05-28

Family

ID=91143262

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410107732.4A Pending CN118093093A (en) 2024-01-25 2024-01-25 Resource allocation method, apparatus, device, storage medium and program product

Country Status (1)

Country Link
CN (1) CN118093093A (en)

Similar Documents

Publication Publication Date Title
US10838798B2 (en) Processing system for performing predictive error resolution and dynamic system configuration control
US10884839B2 (en) Processing system for performing predictive error resolution and dynamic system configuration control
CN114416512A (en) Test method, test device, electronic equipment and computer storage medium
CN111427701A (en) Workflow engine system and business processing method
CN105630684A (en) Software development kit identification method and device
CN115357761A (en) Link tracking method and device, electronic equipment and storage medium
CN107347093B (en) Configuration method and device for distributed server system
CN113191889A (en) Wind control configuration method, configuration system, electronic device and readable storage medium
CN118093093A (en) Resource allocation method, apparatus, device, storage medium and program product
CN114780361A (en) Log generation method, device, computer system and readable storage medium
CN113138772A (en) Method and device for constructing data processing platform, electronic equipment and storage medium
CN114363172B (en) Decoupling management method, device, equipment and medium for container group
CN115525362B (en) Parameter changing method and device based on kernel parameter adjusting platform of operating system
CN114721882B (en) Data backup method and device, electronic equipment and storage medium
CN115174588B (en) Bandwidth control method, device, apparatus, storage medium and program product
CN111767085B (en) Storm platform parameter configuration method and apparatus
CN115729567A (en) Automatic deployment method and device of operation and maintenance product, electronic equipment and storage medium
CN110262756B (en) Method and device for caching data
CN115080434A (en) Case execution method, device, equipment and medium
CN116627536A (en) Application deployment method and device, electronic equipment and storage medium
CN116775307A (en) Service processing method, device, equipment and storage medium
CN116737160A (en) Code generation method and device, electronic equipment and computer readable storage medium
CN115237391A (en) Method, device, electronic equipment and medium for generating script
CN117950802A (en) Resource data updating method, device, equipment, medium and program product
CN117149570A (en) Data processing 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