CN115269123A - Container resource adjusting method and device, electronic equipment and medium - Google Patents

Container resource adjusting method and device, electronic equipment and medium Download PDF

Info

Publication number
CN115269123A
CN115269123A CN202210992780.7A CN202210992780A CN115269123A CN 115269123 A CN115269123 A CN 115269123A CN 202210992780 A CN202210992780 A CN 202210992780A CN 115269123 A CN115269123 A CN 115269123A
Authority
CN
China
Prior art keywords
resource
amount
expected
suggested
service
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
CN202210992780.7A
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.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202210992780.7A priority Critical patent/CN115269123A/en
Publication of CN115269123A publication Critical patent/CN115269123A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5055Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering software capabilities, i.e. software resources associated or available to the machine
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the disclosure provides a method and a device for adjusting container resources, electronic equipment and a medium, and relates to the technical field of operation and maintenance of containers, and the technical scheme of the embodiment of the disclosure includes: and determining the number of the suggested copies of the container group, the suggested resource request amount and the suggested resource limit amount of a single container in the container group according to the service index sequence when the container group runs the specified service and the preset service quality parameter of the specified service. If the suggested number of copies, the suggested resource request amount, and the suggested resource limit amount do not match the current number of copies, the current resource request amount, and the current resource limit amount for the group of containers, then an expected number of copies, an expected resource request amount, and an expected resource limit amount are determined based on the suggested number of copies, the suggested resource request amount, and the suggested resource limit amount. And then adjusting the resource configuration information of the container group according to the expected copy number, the expected resource request amount and the expected resource limit amount. Thereby more rationally allocating resources for the containers.

Description

Container resource adjusting method and device, electronic equipment and medium
Technical Field
The present disclosure relates to the field of operation and maintenance technologies of containers, and in particular, to a method and an apparatus for adjusting container resources, an electronic device, and a medium.
Background
A large number of nodes exist in the cloud platform, containers run in the nodes, applications can be packaged in the containers, and cloud services are provided by running the applications in the containers. The container may simplify the process of building, deploying, and running the application. In order to realize the normal operation of the container in the cloud environment, the requested quantity and the limited quantity of the resource need to be manually set for the container in advance, so that the container is subsequently scheduled to a node with the available resource larger than the requested quantity of the resource of the container, and in the operation process of the container, the actual resource usage quantity of the limited container does not exceed the resource limited quantity of the container.
At present, the resource request quantity and the resource limitation quantity of a container are evaluated and set through manual experience, and the problems of low resource utilization rate or limited use of container resources due to unreasonable resource allocation may occur. For example, if the resource request amount is too small and the resource limit amount is too large, resulting in the actual required resource amount at the time of the container operation exceeding the resource request amount too much and the resource limit amount not exceeding the resource limit amount, the actual required resource amount needs to be allocated to the container. But the available resources of the node where the container is located may not be sufficient, resulting in a limited use of resources and even possibly causing a situation where the service provided in the container is interrupted. If the resource request amount is too large, the actually required resource amount is far smaller than the resource request amount, which causes that too many resources in the node where the container is located are pre-occupied by the container but are not used for a long time, so that the resource utilization rate is low. If the resource limit is too small, the amount of resources actually required exceeds the resource limit, but the amount of resources actually allocated to the container cannot exceed the resource limit, so that a sufficient amount of resources cannot be allocated to the container.
Disclosure of Invention
An object of the embodiments of the present disclosure is to provide a method, an apparatus, an electronic device, and a medium for adjusting container resources, so as to solve the problem that resources are not reasonably allocated to a container. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present disclosure provides a container resource adjusting method, where the method includes:
acquiring a service index sequence when a container group runs a specified service and a preset service quality parameter of the specified service;
determining the number of the suggested copies of the container group, and the suggested resource request amount and the suggested resource limit amount of a single container in the container group according to the service index sequence and the preset service quality parameter;
if the suggested number of copies, the suggested amount of resource requests, and the suggested amount of resource restrictions do not match the current number of copies of the group of containers, the current amount of resource requests, and the current amount of resource restrictions for a single container in the group of containers, determining an expected number of copies, an expected amount of resource requests, and an expected amount of resource restrictions based on the suggested number of copies, the suggested amount of resource requests, and the suggested amount of resource restrictions;
and adjusting the resource configuration information of the container group according to the expected copy number, the expected resource request amount and the expected resource limit amount.
In some embodiments of the present disclosure, the service index sequence includes service index parameters at a plurality of historical times during the operation of the specified service by the container group; the determining, according to the service indicator sequence and the preset quality of service parameter, the number of suggested copies of the container group, and the amount of suggested resource requests and the amount of suggested resource restrictions of a single container in the container group, includes:
calculating the average value of the service index parameters of all the service index parameters included in the service index sequence, and determining a service index parameter limit value, wherein the service index parameter limit value is greater than or equal to the maximum value of the service index parameters in the service index sequence;
determining at least one group of resource usage amount and copy amount corresponding to the service index parameter average value and the preset service quality parameter according to a preset mapping relation among the service index parameter, the service quality parameter, the resource usage amount and the copy amount, and taking the determined resource usage amount and copy amount of each group as a group of target resource request amount and a first copy amount;
determining at least one group of resource usage and copy number corresponding to the service index parameter limit value and the preset service quality parameter according to a preset mapping relation among the service index parameter, the service quality parameter, the resource usage and the copy number, and taking each group of the determined resource usage and copy number as a group of target resource limitation and a second copy number;
and determining the recommended copy quantity and the recommended resource request quantity and the recommended resource limit quantity of a single container in the container group according to at least one group of target resource request quantity and first copy quantity and at least one group of target resource limit quantity and second copy quantity.
In some embodiments of the present disclosure, the determining the suggested copy number and the suggested resource request amount and the suggested resource limit amount for a single container in the container group according to at least one set of the target resource request amount and the first copy number and at least one set of the target resource limit amount and the second copy number comprises:
if the second copy quantity is the same as the first copy quantity, integrating the first copy quantity, the target resource request quantity corresponding to the first copy quantity and the target resource limitation quantity corresponding to the second copy quantity into a resource demand combination;
for each resource demand combination, judging whether the available resource quantity of each node included in the cluster in which the container group is positioned is enough to support the container deployment in the cluster according to the resource demand combination;
if so, the first copy quantity, the target resource request quantity and the target resource limiting quantity included in the resource demand combination are respectively used as the suggested copy quantity, the suggested resource request quantity and the suggested resource limiting quantity.
In some embodiments of the present disclosure, before determining the number of suggested copies of the container group, and the suggested resource request amount and the suggested resource limit amount of a single container in the container group according to the service indicator sequence and the preset quality of service parameter, the method further includes:
acquiring service index parameters, resource usage, service quality parameters and copy number of a sample container group at a plurality of historical moments in a specified time period;
dividing the designated time period into a plurality of change cycles based on the change trend of the business index parameters in the designated time period, and dividing each change cycle into a plurality of time periods, wherein each time period represents a peak period or a valley period of the business index parameters;
determining a mapping relation among the service index parameters, the resource usage amount, the service quality parameters and the copy number of the time interval according to the service index parameters, the resource usage amount, the service quality parameters and the copy number of the same time interval in different change cycles;
before determining at least one set of resource usage and copy number corresponding to the service index parameter average value and the preset service quality parameter according to a preset mapping relationship among the service index parameter, the service quality parameter, the resource usage and the copy number, the method further includes:
and determining the same target time interval to which the plurality of historical times belong in different change cycles, and taking the mapping relation among the service index parameter, the resource usage amount, the service quality parameter and the copy number of the target time interval as the preset mapping relation.
In some embodiments of the disclosure, after dividing each variation cycle into a plurality of periods, the method further comprises:
aiming at every two adjacent time periods with specified duration included in a single change cycle, judging whether the adjacent time periods meet mutation conditions, wherein the mutation conditions comprise: the difference value between the minimum value of the service index parameter in the previous time period and the maximum value of the service index parameter in the next time period is larger than a first specified threshold value, or the difference value between the maximum value of the service index parameter in the previous time period and the minimum value of the service index parameter in the next time period is larger than a second specified threshold value;
if so, increasing the specified time length, respectively determining two time sections of the increased specified time length by taking the specified time as a starting point, judging whether the two determined time sections meet the mutation condition, and determining the time offset between the specified time length and the initial time of the change period when the increased time length reaches the time length of a single change period or the increased times reaches the preset times; the designated time is the time between the time corresponding to the maximum value and the time corresponding to the minimum value included in the mutation conditions met by the adjacent time periods;
the adjusting the resource configuration information of the container group according to the expected copy number, the expected resource request amount and the expected resource limit amount includes:
if the time difference between the current time and the starting time of the current change period is less than or equal to the time offset, adding the starting time of the current change period and the time offset to obtain a change time;
if the time difference between the current time and the starting time of the current change period is greater than the time offset, adding the starting time of the next change period and the time offset to obtain a change time;
and at the change moment, adjusting the resource configuration information of the container group according to the expected copy number, the expected resource request amount and the expected resource limit amount.
In some embodiments of the present disclosure, after determining a desired number of replicas, a desired amount of resource requests, and a desired amount of resource restrictions based on the suggested number of replicas, the suggested amount of resource requests, and the suggested amount of resource restrictions, the method further comprises:
determining at least one group of first service index parameters and first capacity expansion and reduction conditions corresponding to the expected resource request quantity and at least one group of second service index parameters and second capacity expansion and reduction conditions corresponding to the expected resource limiting quantity according to a preset mapping relation among the service index parameters, the resource usage quantity and the capacity expansion and reduction conditions;
if the second capacity expansion and reduction condition is the same as the first capacity expansion and reduction condition, integrating the first capacity expansion and reduction condition, a first service index parameter corresponding to the first capacity expansion and reduction condition and a second service index parameter corresponding to the second capacity expansion and reduction condition into a capacity expansion and reduction demand combination;
for each expansion and reduction demand combination, judging whether a first service index parameter and a second service index parameter which are included by the expansion and reduction demand combination are both between the average value of the service index parameters and the limiting value of the service index parameters;
if yes, the first capacity expansion and reduction condition included in the capacity expansion and reduction requirement combination is used as an expected capacity expansion and reduction condition;
after the adjusting the resource configuration information of the container group according to the expected copy number, the expected resource request amount and the expected resource limiting amount, the method further includes:
and when the actual resource usage of the container group meets the expected expansion and reduction capacity condition, carrying out expansion and reduction capacity processing on the container group.
In some embodiments of the present disclosure, the determining, according to the service indicator sequence and the preset quality of service parameter, a suggested number of copies of the container group, and a suggested resource request amount and a suggested resource limit amount of a single container in the container group includes:
acquiring a resource use sequence of each container included in the container group, wherein the resource use sequence comprises the use amount of the container to a target resource in a node where the container is located at the plurality of historical times;
inputting the service index sequence, the resource use sequence and the preset service quality parameter into a pre-trained resource request quantity prediction model to obtain a suggested resource request quantity output by the resource request quantity prediction model;
inputting the service index sequence, the resource using sequence and the preset service quality parameter into a pre-trained resource limitation quantity prediction model to obtain a suggested resource limitation quantity output by the resource limitation quantity prediction model;
and inputting the service index sequence, the resource using sequence and the preset service quality parameter into a pre-trained copy quantity prediction model to obtain the suggested copy quantity output by the copy quantity prediction model.
In some embodiments of the disclosure, the adjusting the resource configuration information of the container group according to the expected copy number, the expected resource request amount, and the expected resource limitation amount includes:
calling a CI/CD tool for continuous integration/continuous deployment, and sending the expected resource request amount, the expected resource limit amount and the expected copy amount to the CI/CD tool, so that the CI/CD tool adjusts the resource configuration information of the container group according to the expected copy amount, the expected resource request amount and the expected resource limit amount; alternatively, the first and second electrodes may be,
when a resource configuration request sent by the CI/CD tool is received, sending the expected resource request amount, the expected resource limit amount and the expected copy amount to the CI/CD tool, so that the CI/CD tool adjusts the resource configuration information of the container group according to the expected copy amount, the expected resource request amount and the expected resource limit amount; alternatively, the first and second liquid crystal display panels may be,
and calling a deployment tool, and triggering the deployment tool to adjust the resource configuration information of the container group according to the expected copy quantity, the expected resource request quantity and the expected resource limiting quantity.
In a second aspect, an embodiment of the present disclosure provides a container resource adjusting apparatus, where the apparatus includes:
the system comprises an acquisition module, a service quality control module and a service quality control module, wherein the acquisition module is used for acquiring a service index sequence when a specified service is operated by a container group and a preset service quality parameter of the specified service;
a determining module, configured to determine, according to the service indicator sequence and the preset quality of service parameter obtained by the obtaining module, a number of suggested copies of the container group, and a suggested resource request amount and a suggested resource restriction amount of a single container in the container group;
the determining module is further configured to determine an expected number of copies, an expected amount of resource requests, and an expected amount of resource restrictions based on the suggested number of copies, the suggested amount of resource requests, and the suggested amount of resource restrictions if the suggested number of copies, the suggested amount of resource requests, and the suggested amount of resource restrictions do not match the current number of copies of the group of containers, the current amount of resource requests, and the current amount of resource restrictions of a single container in the group of containers;
an adjusting module, configured to adjust the resource configuration information of the container group according to the expected copy number, the expected resource request amount, and the expected resource limit amount determined by the determining module.
In some embodiments of the present disclosure, the service index sequence includes service index parameters at a plurality of historical times during the operation of the specified service by the container group; the determining module is specifically configured to:
calculating the average value of the service index parameters of all the service index parameters included in the service index sequence, and determining a service index parameter limit value, wherein the service index parameter limit value is greater than or equal to the maximum value of the service index parameters in the service index sequence;
determining at least one group of resource usage and copy number corresponding to the service index parameter average value and the preset service quality parameter according to a preset mapping relation among the service index parameter, the service quality parameter, the resource usage and the copy number, and taking the determined resource usage and copy number of each group as a group of target resource request and a first copy number;
determining at least one group of resource usage and copy number corresponding to the service index parameter limit value and the preset service quality parameter according to a preset mapping relation among the service index parameter, the service quality parameter, the resource usage and the copy number, and taking each group of the determined resource usage and copy number as a group of target resource limit and a second copy number;
and determining the recommended copy quantity and the recommended resource request quantity and the recommended resource limit quantity of a single container in the container group according to at least one group of target resource request quantity and first copy quantity and at least one group of target resource limit quantity and second copy quantity.
In some embodiments of the present disclosure, the determining module is specifically configured to:
if the second copy number is the same as the first copy number, integrating the first copy number, the target resource request amount corresponding to the first copy number and the target resource limitation amount corresponding to the second copy number into a resource demand combination;
for each resource demand combination, judging whether the available resource quantity of each node included in the cluster in which the container group is positioned is enough to support the container deployment in the cluster according to the resource demand combination;
if so, the first copy quantity, the target resource request quantity and the target resource limiting quantity included in the resource demand combination are respectively used as the suggested copy quantity, the suggested resource request quantity and the suggested resource limiting quantity.
In some embodiments of the present disclosure, the apparatus further comprises:
the obtaining module is further configured to obtain the service index parameters, the resource usage amounts, the service quality parameters and the copy numbers of the sample container group at multiple historical moments in a specified time period before determining the number of the suggested copies of the container group, and the suggested resource request amount and the suggested resource limit amount of a single container in the container group according to the service index sequence and the preset service quality parameter;
the dividing module is used for dividing the designated time period into a plurality of change cycles based on the change trend of the service index parameters in the designated time period, and dividing each change cycle into a plurality of time periods, wherein each time period represents a peak period or a valley period of the service index parameters;
the determining module is further configured to determine, for the service index parameter, the resource usage amount, the service quality parameter, and the number of copies in the same time period in different change cycles, a mapping relationship between the service index parameter, the resource usage amount, the service quality parameter, and the number of copies in the time period;
the determining module is further configured to determine the same target time periods to which the plurality of historical times belong in different variation cycles before determining at least one set of resource usage and copy number corresponding to the average value of the service index parameter and the preset service quality parameter according to a preset mapping relationship among the service index parameter, the service quality parameter, the resource usage and the copy number, and use the mapping relationship among the service index parameter, the resource usage, the service quality parameter and the copy number in the target time period as the preset mapping relationship.
In some embodiments of the present disclosure, the,
the determining module is further configured to, after dividing each change cycle into a plurality of time periods, determine, for each two adjacent time periods with a specified duration included in a single change cycle, whether the adjacent time periods satisfy a sudden change condition, where the sudden change condition includes: the difference between the minimum value of the service index parameter in the previous time period and the maximum value of the service index parameter in the next time period is larger than a first specified threshold value, or the difference between the maximum value of the service index parameter in the previous time period and the minimum value of the service index parameter in the next time period is larger than a second specified threshold value; if so, increasing the specified time length, respectively determining two time sections of the increased specified time length by taking the specified time as a starting point, judging whether the two determined time sections meet the mutation condition, and determining the time offset between the specified time length and the initial time of the change period when the increased time length reaches the time length of a single change period or the increased times reach the preset times; the designated time is the time between the time corresponding to the maximum value and the time corresponding to the minimum value which are included in the mutation conditions met by the adjacent time periods;
the adjusting module is specifically configured to:
if the time difference between the current time and the starting time of the current change period is less than or equal to the time offset, adding the starting time of the current change period and the time offset to obtain a change time;
if the time difference between the current time and the starting time of the current change period is greater than the time offset, adding the starting time of the next change period and the time offset to obtain a change time;
and at the change moment, adjusting the resource configuration information of the container group according to the expected copy number, the expected resource request amount and the expected resource limit amount.
In some embodiments of the present disclosure, the apparatus further comprises:
the determining module is further configured to determine, after determining the number of expected copies, the amount of the resource request to be requested, and the amount of the resource limit to be requested based on the number of the suggested copies, the amount of the resource request to be suggested, and the amount of the resource limit to be suggested, at least one set of a first service index parameter and a first scaling condition corresponding to the amount of the resource request to be requested, and at least one set of a second service index parameter and a second scaling condition corresponding to the amount of the resource limit to be requested according to a preset mapping relationship among the service index parameter, the amount of the resource usage, and the scaling condition; if the second capacity expansion and reduction condition is the same as the first capacity expansion and reduction condition, integrating the first capacity expansion and reduction condition, a first service index parameter corresponding to the first capacity expansion and reduction condition and a second service index parameter corresponding to the second capacity expansion and reduction condition into a capacity expansion and reduction requirement combination; for each expansion and reduction demand combination, judging whether a first service index parameter and a second service index parameter which are included by the expansion and reduction demand combination are both between the average value of the service index parameters and the limiting value of the service index parameters; if yes, the first capacity expansion and reduction condition included in the capacity expansion and reduction requirement combination is used as an expected capacity expansion and reduction condition;
and a capacity expansion and reduction module, configured to, after the resource configuration information of the container group is adjusted according to the expected copy number, the expected resource request amount, and the expected resource limiting amount, perform capacity expansion and reduction processing on the container group when an actual resource usage amount of the container group meets the expected capacity expansion condition.
In some embodiments of the present disclosure, the determining module is specifically configured to:
acquiring a resource use sequence of each container included in the container group, wherein the resource use sequence includes the use amount of the container to the target resource in the node at the plurality of historical times;
inputting the service index sequence, the resource using sequence and the preset service quality parameter into a pre-trained resource request quantity prediction model to obtain a suggested resource request quantity output by the resource request quantity prediction model;
inputting the service index sequence, the resource use sequence and the preset service quality parameter into a pre-trained resource restriction quantity prediction model to obtain a suggested resource restriction quantity output by the resource restriction quantity prediction model;
and inputting the service index sequence, the resource using sequence and the preset service quality parameter into a pre-trained copy quantity prediction model to obtain the suggested copy quantity output by the copy quantity prediction model.
In some embodiments of the present disclosure, the adjusting module is specifically configured to:
calling a CI/CD tool for continuous integration/continuous deployment, and sending the expected resource request amount, the expected resource limit amount and the expected copy amount to the CI/CD tool, so that the CI/CD tool adjusts the resource configuration information of the container group according to the expected copy amount, the expected resource request amount and the expected resource limit amount; alternatively, the first and second electrodes may be,
when a resource configuration request sent by the CI/CD tool is received, sending the expected resource request amount, the expected resource limit amount and the expected copy amount to the CI/CD tool, so that the CI/CD tool adjusts the resource configuration information of the container group according to the expected copy amount, the expected resource request amount and the expected resource limit amount; alternatively, the first and second electrodes may be,
and calling a deployment tool, and triggering the deployment tool to adjust the resource configuration information of the container group according to the expected copy number, the expected resource request amount and the expected resource limiting amount.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor configured to implement the steps of the container resource adjustment method according to any one of the first aspect when executing a program stored in a memory.
In a fourth aspect, the present disclosure provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the container resource adjusting method steps of any one of the first aspect.
In a fifth aspect, the disclosed embodiments further provide a computer program product containing instructions, which when executed on a computer, cause the computer to execute the container resource adjusting method according to any one of the above first aspects.
The embodiment of the disclosure has the following beneficial effects:
the method, the device, the electronic equipment and the medium for adjusting the container resources provided by the embodiment of the disclosure can obtain a service index parameter when the container group runs a specified service and a preset service quality parameter of the specified service, analyze the number of the suggested copies of the container group and the suggested resource request amount and the suggested resource limit amount of a single container in the container group, and determine the expected copy number, the expected resource request amount and the expected resource limit amount based on the suggested copy number, the suggested resource request amount and the suggested resource limit amount if the suggested copy number, the suggested resource request amount and the suggested resource limit amount are not matched with the current copy number of the container group, the current resource request amount and the current resource limit amount of the single container in the container group. And then adjusting the resource configuration information of the container group according to the expected copy number, the expected resource request amount and the expected resource limit amount. According to the method and the device for allocating the resources to the containers, the expected resource request quantity and the expected resource limiting quantity of the containers and the copy quantity of the container groups can be determined based on the service index parameters of the container groups during actual service operation and the preset service quality parameters of the services, so that the determined expected copy quantity, expected resource request quantity and expected resource limiting quantity are more consistent with the actual operation conditions of the containers and the requirements of the services on the service quality, and the method does not depend on artificial subjective experience, so that the resources can be allocated to the containers more reasonably.
Of course, it is not necessary for any product or method of practicing the disclosure to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other embodiments can be obtained by those skilled in the art according to the drawings.
Fig. 1 is a flowchart of a container resource adjusting method according to an embodiment of the present disclosure;
fig. 2 is a flowchart of another container resource adjustment method provided in the embodiment of the present disclosure;
fig. 3 is an exemplary schematic diagram of a mapping relationship between a service index parameter, a quality of service parameter, a resource usage amount, and a copy number according to an embodiment of the present disclosure;
fig. 4 is an exemplary schematic diagram of a mapping relationship between another service index parameter, a service quality parameter, a resource usage amount, and a copy number provided by an embodiment of the present disclosure;
fig. 5 is an exemplary schematic diagram of a service index parameter changing with time according to an embodiment of the present disclosure;
fig. 6 is an exemplary schematic diagram of a preset mapping relationship among a service index parameter, a resource usage amount, and a scaling condition according to an embodiment of the present disclosure;
FIG. 7 is an exemplary schematic view of a container provided by embodiments of the present disclosure;
fig. 8 is a schematic structural diagram of a container resource adjusting apparatus according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. All other embodiments that can be derived from the disclosure by one of ordinary skill in the art based on the embodiments in the disclosure are intended to be within the scope of the disclosure.
Before the business is on line, it is generally difficult to accurately evaluate and set the resource request quantity and the resource limit quantity of the container, except that the resource request quantity and the resource limit quantity are manually set, the pressure test can be performed on the container at present, so as to simulate the actual business situation, but the implementation of the pressure test has certain technical difficulty, and the test case and the load model of the pressure test are easy to deviate from the actual business situation, so that the setting of the resource request quantity and the resource limit quantity is unreasonable.
In order to allocate resources to a container more reasonably, the embodiments of the present disclosure provide a container resource adjusting method, where the method may be applied to an electronic device, and the electronic device may be a device with data processing capability, such as a server, a desktop computer, or a virtual machine. As shown in fig. 1, the method comprises the steps of:
s101, acquiring a service index sequence when a container group runs a specified service and a preset service quality parameter of the specified service.
Each container in the group of containers runs the same service, i.e. a specified service, and implements the same service function. For example, when the designated service is in response to a login request sent by a user, each container in the container group is used for responding to the login request sent by the user; or each container in the container group is used for realizing the function of verifying the login password in the process of responding to the login request.
The service index sequence comprises service index parameters of a plurality of historical times in the process that the container group operates the specified service. For example, the traffic indicator parameters include: the number of service requests received by the container, the average duration of responding to the service requests, the error rate of executing the services and the like are used for representing the data of the service operation condition. When multiple service index parameters are obtained, a time sequence is generated respectively for each service index parameter, namely the service index sequence comprises the time sequence of the multiple service index parameters.
The plurality of historical times are: in a plurality of variation periods of the service indicator parameter, each variation period comprises a specified time. For example: taking one day as a period, each historical time can be 9 points in each historical date; or, the time period of the morning in each historical date; with 7 days of the week as a period, each historical time may be monday of each historical week, or tuesday, etc. It should be noted that the change period can be obtained by analyzing the actual operation rule of the designated service. Optionally, in other implementations, each historical time may also be a time with the same time granularity, the time granularity may be an hour, a day, a week, and the like, and the number of the historical times is not limited.
The QOS parameter is used to indicate a QOS level of a QOS indicator of a specific Service. For example, QOS metrics include: availability, throughput, response duration, etc. The QOS index can be configured according to the operation requirement of the user on the designated service, and the QOS index can be changed, for example, the user can newly add a more intuitive QOS index, and the electronic equipment can obtain the latest QOS index.
The electronic device may obtain the QOS indicator of the designated service from the designated database, or receive the QOS indicator submitted by the user, and the like.
The electronic equipment can determine the QOS grade according to the obtained QOS index.
Optionally, in the obtained QOS indicator, when the available rate exceeds the first threshold, the throughput rate exceeds the second threshold, or the response time is less than a third threshold, it is determined that the QOS level is High (High); otherwise, the QOS level is determined to be Low (Low). For example, the QOS indicator includes that the response duration to 90% of the service requests is within 100ms, and if the third threshold corresponding to the response duration is 200ms, it is determined that the QOS level is High, that is, the QOS parameter is High. The QOS level may also be determined in other manners, which are not specifically limited in the embodiments of the present disclosure.
S102, determining the number of the suggested copies of the container group, the suggested resource request amount of a single container in the container group and the suggested resource limiting amount according to the service index sequence and the preset service quality parameter.
Wherein the number of copies indicates the number of containers contained in one container group. The resource request quantity represents the request quantity of each container in the container group to the target resource in the node where the container is located, namely the node which requires each container to be deployed at least can provide the target resource quantity. The resource limit amount represents the upper limit of the target resource usage of the node where each container in the container group is located.
For example, the target resource may be a Central Processing Unit (CPU) and memory. The resource request amount and resource limitation amount of the CPU can be expressed by time slice, wherein the time slice is a period of time which is allocated to each running process by the time-sharing operating system on the microscopic level, and when the unit of the time slice is millicore (m), the time slice represents that 1 CPU is divided into 1000 parts. For example, the resource request amount is 200m, indicating that 0.2 CPUs are used per second, and the resource limit amount is 1000m, indicating that 1 CPU is used per second. The resource request amount and the resource limit amount of the memory can be represented by a memory occupation amount, for example, the resource request amount is 128Mi, and the resource limit amount is 512Mi, where Mi =1024 × 1024 bytes.
S103, if the number of the suggested copies, the amount of the suggested resource requests and the amount of the suggested resource limits do not match with the current number of the copies of the container group, the current amount of the resource requests of the single container in the container group and the current amount of the resource limits, determining the desired number of the copies, the desired amount of the resource requests and the desired amount of the resource limits based on the number of the suggested copies, the amount of the suggested resource requests and the amount of the suggested resource limits.
In the embodiment of the disclosure, when the number of recommended copies does not match the current number of copies, the recommended resource request amount does not match the current resource request amount, or the recommended resource limit amount does not match the current resource limit amount, the desired number of copies, the desired resource request amount, and the desired resource limit amount may be determined based on the recommended copy number, the recommended resource request amount, and the recommended resource limit amount through a decision model trained in advance. The decision model may further refer to the preset quality of service parameter when determining each expected quantity, that is, the decision model may determine the expected number of copies, the expected amount of resource requests, and the expected amount of resource restrictions based on the preset quality of service parameter, the suggested number of copies, the suggested amount of resource requests, and the suggested amount of resource restrictions.
In the embodiment of the present disclosure, if the number of suggested copies, the amount of suggested resource requests, and the amount of suggested resource restrictions are matched with the current number of copies of the container group, the current amount of resource requests of a single container in the container group, and the current amount of resource restrictions, it indicates that the current resource configuration of the container group satisfies the service indicator sequence and the preset quality of service parameter, and therefore, the current resource configuration of the container group may be maintained without generating a new resource configuration, that is, without generating the number of desired copies, the amount of desired resource requests, and the amount of desired resource restrictions.
S104, adjusting the resource configuration information of the container group according to the expected copy number, the expected resource request amount and the expected resource limit amount.
Optionally, the electronic device may send the expected copy number, the expected resource request amount, and the expected resource restriction amount to a designated node of a cluster in which the container group is located, so that the designated node adjusts the copy number of the container group to the expected copy number, adjusts the resource request amount of each container of the container group to the expected resource request amount, and adjusts the resource restriction amount of each container in the container group to the expected resource restriction amount. The designated node is a node in the cluster where the container group is located, for example, the designated node is a cloud platform.
The method for adjusting the container resource provided by the embodiment of the disclosure can obtain the service index parameter when the container group runs the designated service and the preset service quality parameter of the designated service, and analyze the number of the suggested copies of the container group and the suggested resource request amount and the suggested resource restriction amount of a single container in the container group, and if the number of the suggested copies, the suggested resource request amount and the suggested resource restriction amount are not matched with the current number of the copies of the container group, the current resource request amount and the current resource restriction amount of a single container in the container group, determine the expected copy number, the expected resource request amount and the expected resource restriction amount based on the suggested copy number, the suggested resource request amount and the suggested resource restriction amount. And then adjusting the resource configuration information of the container group according to the expected copy number, the expected resource request amount and the expected resource limit amount. According to the method and the device for allocating the resources to the containers, the expected resource request quantity and the expected resource limiting quantity of the containers and the copy quantity of the container groups can be determined based on the service index parameters of the container groups during actual service operation and the preset service quality parameters of the services, so that the determined expected copy quantity, expected resource request quantity and expected resource limiting quantity are more consistent with the actual operation conditions of the containers and the requirements of the services on the service quality, and the method does not depend on artificial subjective experience, so that the resources can be allocated to the containers more reasonably.
The above manners for determining the number of the suggested copies, the amount of the suggested resource requests, and the amount of the suggested resource restrictions in S102 include the following two manners:
the method comprises the steps of firstly, obtaining a resource use sequence of each container included in a container group, wherein the resource use sequence comprises the use amount of the container to a target resource in a node at a plurality of historical times; inputting the service index sequence, the resource use sequence and the preset service quality parameter into a pre-trained resource request quantity prediction model to obtain a suggested resource request quantity output by the resource request quantity prediction model; inputting the service index sequence, the resource use sequence and the preset service quality parameter into a pre-trained resource limitation quantity prediction model to obtain a suggested resource limitation quantity output by the resource limitation quantity prediction model; and inputting the service index sequence, the resource use sequence and the preset service quality parameter into a pre-trained copy quantity prediction model to obtain the suggested copy quantity output by the copy quantity prediction model.
The method comprises the steps of obtaining a plurality of groups of sample service index sequences, sample resource use sequences and sample service quality parameters, and then determining a label corresponding to each group of data, wherein the label represents the actual resource request amount. And then training a neural network model by using the multiple groups of data and the labels of each group of data, and then taking the trained neural network model as a resource request prediction model.
Similarly, a plurality of sets of sample service index sequences, sample resource usage sequences, and sample quality of service parameters may be obtained, and then a label corresponding to each set of data is determined, where the label represents an actual resource restriction amount. And then training a neural network model by using the multiple groups of data and the labels of each group of data, and then taking the trained neural network model as a resource restriction prediction model.
Similarly, a plurality of sets of sample service index sequences, sample resource usage sequences, and sample quality of service parameters may be obtained, and then a label corresponding to each set of data is determined, where the label represents an actual number of copies. And then training a neural network model by using the multiple groups of data and the labels of each group of data, and then taking the trained neural network model as a copy quantity prediction model.
For example, the Neural Network model may be a Convolutional Neural Network (CNN) or a Recurrent Neural Network (RNN), and the like, and the embodiment of the present disclosure is not particularly limited in this respect.
Through the training model, the resource request quantity prediction model can learn the relation among the service index sequence, the resource use sequence, the service quality parameter and the resource request quantity, the resource limitation quantity prediction model can learn the relation among the service index sequence, the resource use sequence, the service quality parameter and the resource limitation quantity, and the copy quantity prediction model can learn the relation among the service index sequence, the resource use sequence, the service quality parameter and the copy quantity, so that the copy quantity, the resource request quantity and the resource limitation quantity which accord with the actual operation condition of the container and the service QOS index can be obtained.
For example, the service quality parameters include response duration of the container to the service request, the relationship between the response duration, the service index sequence, the resource usage sequence and the resource request amount can be learned through the resource request amount prediction model, the relationship between the response duration, the service index sequence, the resource usage sequence and the resource limit amount can be learned through the resource limit amount prediction model, and the relationship between the response duration, the service index sequence, the resource usage sequence and the resource limit amount can be learned through the copy number prediction model, and the relationship between the response duration, the service index sequence, the resource usage sequence and the copy number can be learned through the copy number prediction model.
By adopting the method, the embodiment of the disclosure can determine the number of the suggested copies, the request quantity of the suggested resources and the limit quantity of the suggested resources through the model, thereby realizing the automatic analysis of the resource configuration. Moreover, the service index sequence and the resource use sequence can accurately represent the actual operation condition of the container, and data is easy to obtain, so that the embodiment of the disclosure can more accurately determine the resource configuration of the container.
Referring to fig. 2, a manner of implementing the above S102 includes the following steps:
s1021, calculating the average value of the service index parameters included in the service index sequence, and determining the limit value of the service index parameters.
And the service index parameter limit value is greater than or equal to the maximum value of the service index parameter in the service index sequence.
For example, a tsfresh tool may be used to extract a time sequence feature from the service index sequence, where the time sequence feature includes a maximum value of the service index parameter and an average value of the service index parameter, and then the maximum value of the service index parameter is used as a limit value of the service index parameter, or the maximum value of the service index parameter is increased by a preset value to obtain a limit value of the service index parameter.
S1022, determining at least one group of resource usage amount and copy number corresponding to the service index parameter average value and the preset service quality parameter according to the preset mapping relation among the service index parameter, the service quality parameter, the resource usage amount and the copy number, and taking the determined resource usage amount and copy number of each group as a group of target resource request amount and a first copy number.
The average value of the service index parameters and the resource usage corresponding to the preset service quality parameters represent the average required resource usage during the container operation in the historical time, so that the resource usage is used as the target resource request.
Referring to fig. 3, in fig. 3, an abscissa represents a service index parameter, an ordinate represents a resource usage amount of a single container, a left curve represents resource usage amounts corresponding to different service index parameters when the number of copies is a and QOS is Low, and a right curve represents resource usage amounts corresponding to different service index parameters when the number of copies is b and QOS is Low. Assuming that the preset qos parameter is Low and the average value of the service index parameter is B2, as shown in fig. 3, when the service index parameter is B2, the intersection point of the left curve corresponds to R2, R2 is used as the target resource request amount, and the copy number a indicated by the left curve is used as the first copy number. Similarly, according to the intersection point of B2 and the right curve, another group with B as the number of the first copies and R3 as the target resource request amount is obtained.
S1023, determining at least one group of resource usage and copy quantity corresponding to the service index parameter limit value and the preset service quality parameter according to the preset mapping relation among the service index parameter, the service quality parameter, the resource usage and the copy quantity, and taking each group of the determined resource usage and copy quantity as a group of target resource limit quantity and a second copy quantity.
The service index parameter limit value and the resource usage amount corresponding to the preset service quality parameter represent the resource amount which is required to be used at most when the container runs in the historical time, and therefore the resource usage amount is used as the target resource limit amount.
Assuming that the preset qos parameter is Low and the service index parameter limit value is B2-max, as shown in fig. 3, when the service index parameter is B2-max, an intersection point with the left curve corresponds to L2, the L2 is used as the target resource limit amount, and the copy number a indicated by the left curve is used as the second copy number. Similarly, based on the intersection of B2-max and the right curve, another set of a second number of copies B and a target resource limit L3 is obtained.
In conjunction with S1022 and S1023, the resource usage amount represents the usage amount of the target resource in the node where the container is located, and accordingly, the target resource request amount represents the request amount for the target resource, and the target resource limit amount represents the limit amount for the target resource. For example, when the target resource includes a CPU and a memory, the target resource request amount includes a CPU resource request amount and a memory resource request amount, and the target resource limit amount includes a CPU resource limit amount and a memory resource limit amount.
If the target resource comprises a CPU, the resource usage comprises the usage time information of the CPU, and/or the CPU occupancy rate and other data used for representing the actual usage of the CPU in the node of the container. If the target resource comprises a memory, the resource usage comprises data representing the actual use condition of the memory in the node where the container is located, such as memory occupancy and/or memory occupancy.
The service index parameter in the preset mapping relationship is a service index parameter of a specified type, and the service index sequence obtained in S101 may include service index parameters of multiple types, for example, the service index sequence includes: the number of service requests received by the container, the average duration of responding to the service requests and the error rate of executing the services, and the specified type of service index parameter is the average duration of responding to the service requests. In S1021, a service index parameter of a specified type may be extracted from the service index sequence obtained in S101, and a service index parameter average value and a service index parameter limit value may be determined from the extracted service index parameters.
S1024, determining the recommended copy quantity and the recommended resource request quantity and the recommended resource limit quantity of a single container in the container group according to the at least one group of target resource request quantity and the first copy quantity and the at least one group of target resource limit quantity and the second copy quantity.
In this embodiment of the disclosure, if there is a second copy number that is the same as the first copy number, the target resource request amount corresponding to the first copy number, and the target resource limitation amount corresponding to the second copy number may be integrated into one resource demand combination. Then, for each resource demand combination, whether the available resource amount of each node included in the cluster where the container group is located is enough to support the container deployment in the cluster according to the resource demand combination is judged. If so, the first copy quantity, the target resource request quantity and the target resource limiting quantity included in the resource demand combination are respectively used as the suggested copy quantity, the suggested resource request quantity and the suggested resource limiting quantity.
For example, there are 2 sets of target resource request amounts and first copy numbers, respectively: [200,2], [150,3]; there are 2 sets of target resource restriction and second copy numbers, respectively: [300,3],[100,4]. Wherein, the number of copies in [150,3] and [300,3] is 3, i.e. the first number of copies is the same as the second number of copies, so [200,2, 300] is taken as a resource requirement combination.
For example, referring to fig. 3, the number of copies corresponding to the target resource restriction amount L2 and the target resource request amount R2 is a, so that L2, R2, and a are taken as a resource requirement combination; similarly, L3, R3 and b are taken as one resource requirement combination.
When a container is deployed in a node, the available resource amount of the node needs to be greater than or equal to the resource request amount of the container. After determining the resource demand combinations, it is further necessary to determine whether each resource demand combination is in fact, that is, whether the available resource amount of each node included in the cluster where the container group is located is sufficient to support the deployment of the containers in the cluster according to the resource demand combination. In the determining, the electronic device may determine, for each container of the first copy number, whether there is a node whose available resource amount is greater than or equal to the resource request amount, and if so, subtract the target resource request amount from the available resource amount of the node, and determine a next container according to the same method. If the judgment results of the containers with the first copy number are all present, the judgment results indicate that the available resource amount of each node included in the cluster where the container group is located is sufficient to support the combined deployment of the containers in the cluster according to the resource requirement. If any judgment result in the judgment results of the containers with the first copy number does not exist, the judgment result indicates that the available resource amount of each node included in the cluster where the container group is located is not enough to support the combined deployment of the containers in the cluster according to the resource requirement.
For example, the cluster includes 3 nodes, the available resource amount of node 1 is 300, the available resource amount of node 2 is 300, and the available resource amount of node 3 is 100. In the case that the first copy number in the resource demand combination is 2 and the target resource request amount is 200, it is determined that the available resource amount of the node 1 is equal to or greater than the target resource request amount for the first container, and the available resource amount of the updated node 1 is 300-200=100. Then, for the second container, it is determined that the available resource amount of the node 2 is equal to or greater than the target resource request amount, and the available resource amount of the updated node 2 is 300-200=100. The judgment results for 2 containers are all present, so that the available resource amount of each node included in the cluster where the container group is located is sufficient to support the combined deployment of the containers in the cluster according to the resource requirement.
By adopting the method, the embodiment of the disclosure can obtain the resource demand combination which accords with the service operation condition and the service quality according to the preset mapping relation among the service index parameter, the service quality parameter, the resource usage amount and the copy amount which are obtained by pre-analysis, and eliminate the infeasible resource demand combination according to the available resource amount of each node included in the cluster where the container group is located, thereby obtaining the recommended copy amount, the recommended resource request amount and the recommended resource limit amount which not only accord with the service operation condition and the service quality, but also can be implemented.
In some embodiments of the present disclosure, a preset mapping relationship between a service index parameter, a service quality parameter, a resource usage amount, and a copy number may also be pre-constructed, and the construction method includes the following steps:
the method comprises the steps of firstly, obtaining service index parameters, resource usage, service quality parameters and copy quantity of a sample container group at a plurality of historical moments in a specified time period.
The obtained resource usage is the average usage of each container in the sample container group to the target resource in the node where the container is located. When multiple target resources exist, the average usage amount of each target resource in the node where each container in the sample container group is located can be obtained respectively, and a time sequence corresponding to each target resource is formed and used as a service index parameter at multiple historical moments.
Optionally, the specified time period may be set to a longer time period, so that the specified time period may include a plurality of variation cycles, so as to analyze the cycle and variation trend of the service indicator parameter in the following.
In the embodiment of the disclosure, the electronic device may obtain, from the acquisition apparatus, the service index parameters, the resource usage amount, and the copy number at a plurality of historical times within a specified time period. Correspondingly, in S101, the electronic device may also obtain the service index sequence from the acquisition device.
The collection device may be a monitoring system, an Application Programming Interface (API) of a cluster, or a pre-deployed collector, etc.
Illustratively, the monitoring system may be Prometheus, zabbix, nagios, or the like. Prometheus is an open source monitoring solution, and can collect and aggregate indexes as time series data; zabbix is an enterprise-level, open source solution that can provide distributed system monitoring as well as network monitoring functions; nagios is an open source network monitoring tool that can effectively monitor node status.
The API of the cluster may be a special API provided for the node where the container is deployed, and the evaluation index information corresponding to the container may be obtained through the special API. Taking the kuberntes cluster as an example, the API of the cluster may be a metric application program interface (metric API).
In the case where the container is deployed at a node of a virtual machine cluster, the collector may be a cadvisor collector deployed in the virtual machine cluster. Wherein the cadvisor collector is a container monitoring tool.
Optionally, to reduce query pressure on the monitoring system, the electronic device may obtain the service index parameter and the resource usage amount by docking a hot backup system at the rear end of the monitoring system, for example, a remote postgres library of the prometheus monitoring system. The postgres library is a relational database management system.
And step two, dividing the designated time period into a plurality of change cycles based on the change trend of the service index parameters in the designated time period, and dividing each change cycle into a plurality of time periods. Wherein each time period represents a peak period or a valley period of the traffic indicator parameter. The change trend of the service index parameter in each change period is the same, for example, the service index parameter in each change period is increased first and then decreased.
The timing characteristics of each business index parameter may be extracted using a timing tool, such as a tsfresh tool. The time sequence characteristics include variation periods, peak values and valley values in each variation period, and the like. The variation cycle may be represented by a cycle length and a start time, that is, from the start time, time segments are divided according to the cycle length, and each of the divided time segments is a variation cycle.
Alternatively, the variation period may be determined based on the autocorrelation coefficient. For example, the service index parameter in the specified time period is moved in the time domain, the autocorrelation coefficient of the moved service index parameter and the service index parameter before movement is calculated, the adjacent peak time in the calculated autocorrelation coefficient is determined, and the time difference between the adjacent peak time is used as the period duration of the change period. And then, dividing time periods according to the cycle duration by taking the peak time as a starting point to obtain a plurality of change cycles.
The variation periods of the service index parameters may be various, and the period length of each variation period is different, for example, the period length of one variation period is 1 day, that is, 24 hours; the cycle length of another variation cycle is one week, namely 7 days; the cycle length of another variation cycle is one season, i.e. 3 months.
When the time period is divided for each variation cycle, the average value of the peak value and the valley value in the variation cycle may be determined for one variation cycle, and then the time corresponding to each average value may be taken as one division point, thereby dividing a plurality of time periods. Other cycles are also divided into a plurality of time periods according to the same division point. Since each division point is an average of a peak value and a valley value, a time period between adjacent division points includes 1 peak value or 1 valley value, and when the time period includes a peak value, the time period may represent a peak period of the service index parameter, and when the time period includes a valley value, the time period may represent a valley period of the service index parameter.
And step three, determining the mapping relation among the service index parameters, the resource usage amount, the service quality parameters and the copy number in the period of time aiming at the service index parameters, the resource usage amount, the service quality parameters and the copy number in the same period of time in different change cycles.
And aiming at the service index parameters, the resource usage amount, the service quality parameters and the copy number in the same time period in different periods, dividing the service index parameters, the resource usage amount, the service quality parameters and the copy number into a training set and a verification set according to the periods.
And taking the service index parameters and the service quality parameters in the training set and the verification set as input data of the model, and taking the resource usage amount and the copy number as labels. A model shaped as Y = f (k, X, QOS) is trained using the training set, where Y represents resource usage, k represents number of copies, X represents a traffic indicator parameter, and QOS represents a QOS level. For example, the model may be a regression model or a neural network model, etc. And then, verifying the accuracy of the trained model by using a verification set, and when the verification is passed, respectively obtaining the resource usage amount and the copy number under the conditions of different service index parameters and different service quality parameters by using the model, and fitting to obtain the mapping relation among the service index parameters, the service quality parameters, the resource usage amount and the copy number.
For example, the mapping relationship is shown in fig. 4, where the abscissa in fig. 4 represents the service index parameter and the ordinate represents the resource usage amount of a single container. Fig. 4 totally includes 4 curves, and according to the sequence from left to right, the first curve represents the resource usage amount corresponding to different service index parameters under the condition that the QOS level is Low and the copy number is 2; the second curve represents the resource usage amount corresponding to different service index parameters under the condition that the QOS level is High and the copy number is 2; the third curve represents the resource usage amount corresponding to different service index parameters under the condition that the QOS level is Low and the copy number is K; the fourth curve represents the resource usage amount corresponding to different service index parameters under the condition that the QOS level is High and the copy number is K. The embodiment of the present disclosure may also analyze curves corresponding to other copy numbers, which are not shown in fig. 4.
As can be seen from fig. 4, the mapping relationship between the service index parameter, the service quality parameter, the resource usage amount, and the copy number can be simplified to Yk = aX + bx + c, where a, b, and c are constants respectively, Y represents the resource usage amount, k represents the copy number, and X represents the service index parameter.
Since different time periods correspond to different corresponding relationships, before determining at least one set of resource usage and copy number corresponding to the average value of the service index parameter and the preset service quality parameter according to the preset mapping relationship among the service index parameter, the service quality parameter, the resource usage and the copy number in S1022, the electronic device may also determine the same target time periods to which a plurality of historical times belong in different variation cycles, and use the mapping relationship among the service index parameter, the resource usage, the service quality parameter and the copy number in the target time periods as the preset mapping relationship. So that the determined preset mapping relationship is used in S1022 and S1023.
For example, the variation cycle includes two periods of 0.
As can be seen from fig. 4, each service indicator parameter may correspond to a combination of multiple copy numbers, QOS levels, and resource usage amounts, for example, in fig. 4, an intersection exists between a dashed line with a service indicator parameter of 2 and the two right-hand curves, and each intersection corresponds to a set of QOS levels, resource usage amounts, and copy numbers. Therefore, in S1022 and S1023, at least one set of resource usage and copy number can be determined according to the average value of the service index parameter or the limit value of the service index parameter, and the preset service quality parameter.
Through the method, the embodiment of the disclosure can analyze the change cycle of the service index parameter in advance, and divide the time period included in each cycle, so as to analyze the preset mapping relationship among the service index parameter, the service quality parameter, the resource usage amount and the copy number in each time period. Because the service operation conditions in different time periods are different, so that the demands of the container on the resources are different, the number of the suggested copies, the suggested resource request amount and the suggested resource limit amount can be more accurately determined based on the mapping relation of the target time periods to which a plurality of historical times belong.
In some embodiments of the present disclosure, after dividing each variation cycle into a plurality of time periods in the second step, the electronic device may further determine, for each two adjacent time periods of a specified duration included in a single variation cycle, whether the adjacent time periods satisfy a sudden change condition, where the sudden change condition includes: the difference value between the minimum value of the service index parameter in the previous time period and the maximum value of the service index parameter in the next time period is larger than a first specified threshold value, or the difference value between the maximum value of the service index parameter in the previous time period and the minimum value of the service index parameter in the next time period is larger than a second specified threshold value. If so, increasing the specified time length, respectively determining two time sections of the increased specified time length by taking the specified time as a starting point, judging whether the two determined time sections meet the mutation condition or not until the increased time length reaches the time length of a single change cycle or the increased times reach the preset times, and determining the time offset between the starting time of the next time section and the starting time of the change cycle to which the time offset belongs.
When the time offset is determined, the electronic device may set a time window of the specified duration, determine adjacent time periods of the specified duration by sliding the time window, and determine whether the adjacent time periods satisfy the abrupt change condition. If yes, increasing the specified duration, respectively determining two time periods of the increased specified duration by taking the specified time as a starting point, and judging whether the two determined time periods meet the mutation condition. If the specified time length is met, continuing to increase the specified time length on the basis of the current specified time length, respectively determining two time sections of the increased specified time length by taking the specified time as a starting point, judging whether the two determined time sections meet a mutation condition or not until the increased time length reaches the time length of a single change cycle or the increased time length reaches the preset time length, and determining the time offset between the specified time length and the initial time of the change cycle to which the specified time length belongs.
Optionally, the first specified threshold and the second specified threshold may be 3 × std1, where std1 is a variance of the traffic indicator parameter in the adjacent time period. Alternatively, the first specified threshold and the second specified threshold may be set according to actual demands.
Referring to fig. 5, the curve in fig. 5 represents the variation of the service index parameter with time in a single variation period, and assuming that the initial value of the specified time length is T1, the time period between every two adjacent dotted lines in fig. 5 is T1. In fig. 5, the minimum value of the service index parameter in a time period T1 is min1, the maximum value of the service index parameter is max1, the minimum value of the service index parameter in the next time period of the time period is min2, and the maximum value of the service index parameter is max2. Assuming that the difference obtained from min1-max2 is greater than a first specified threshold, that is, the sudden change condition is satisfied, determining two time periods with a time length of T2 to the left and the right respectively by using a specified time Tx as a starting point, and judging that the two time periods satisfy the sudden change condition. And then, continuously determining two time periods with the time length of T3 leftwards and rightwards by taking Tx as a starting point respectively, and judging that the two time periods meet the mutation condition. Wherein T1< T2< T3. Assuming that the preset number of times is 2 times, and the increasing number of times reaches the preset number of times, the time offset Δ T between Tx and the start time T-start of the associated change period can be calculated. For example, if the starting time of a single variation cycle is 0, tx is 1.
Wherein the specified time is a time between a time corresponding to the maximum value and a time corresponding to the minimum value included in the abrupt change condition satisfied by the adjacent time period. That is, when the adjacent time period satisfies that the difference between the minimum value of the service index parameter in the previous time period and the maximum value of the service index parameter in the next time period is greater than the first specified threshold, the specified time is determined to be a time between the time corresponding to the minimum value of the service index parameter in the previous time period and the time corresponding to the maximum value of the service index parameter in the next time period. And when the adjacent time periods meet the condition that the difference value between the maximum value of the service index parameter in the previous time period and the minimum value of the service index parameter in the next time period is greater than a second specified threshold value, determining that the specified time is the time between the time corresponding to the maximum value of the service index parameter in the previous time period and the time corresponding to the minimum value of the service index parameter in the next time period. For example, the specified time may be a middle time between a time corresponding to the maximum value and a time corresponding to the minimum value included in the abrupt change condition satisfied by the adjacent time periods, or a time with a maximum rate of change between the time corresponding to the maximum value and the time corresponding to the minimum value, or may also be a specified time, which is not specifically limited in this embodiment of the present disclosure. For example, each circle in FIG. 5 represents a specified time.
On this basis, the manner of adjusting the resource configuration information of the container group according to the desired copy number, the desired resource request amount, and the desired resource restriction amount in S104 may be implemented as follows: if the time difference between the current time and the starting time of the current change period is less than or equal to the time offset, adding the starting time of the current change period and the time offset to obtain a change time; and if the time difference between the current time and the starting time of the current change period is greater than the time offset, adding the starting time of the next change period and the time offset to obtain the change time. At the time of change, the resource allocation information of the container group is adjusted according to the desired number of copies, the desired resource request amount, and the desired resource restriction amount. Specific adjustment modes can be referred to as described later.
For example, the time offset is 2 hours, and the start time of the current change period is 0. If the current time is 1. If the current time is 3.
The embodiment of the disclosure determines the adjacent time periods with large variation of the service index parameter, determines the designated time from the adjacent time periods, and determines that the service index parameter has a sudden change at the designated time when the variation of the service index parameter in the longer time period before and after the designated time is still large, and the service index parameter has a same level after the sudden change for a longer time, so that the corresponding time of the current change period or the next change period can be used as the change time of the resource configuration. The method not only accurately grasps the opportunity of changing the resource configuration, thereby changing the container configuration when the container operation service is mutated, so that the container after the configuration is modified can adapt to the appointed service after the mutation, and the requirement of the container on the resource configuration when the appointed service is operated is met. In addition, the embodiment of the disclosure determines the designated time only when the service index parameter is maintained at the same level for a long time after the mutation is judged, so that the frequent change is reduced.
In an embodiment of the present disclosure, if the number of suggested copies, the suggested resource request amount, and the suggested resource limit amount in S104 do not match the current number of copies, the current resource request amount, and the current resource limit amount of the container group, a manner of determining the desired number of copies, the desired resource request amount, and the desired resource limit amount based on the number of suggested copies, the suggested resource request amount, and the suggested resource limit amount may be implemented as follows: judging whether the number of the suggested copies is matched with the current number of the copies in the container group, whether the suggested resource request amount is matched with the current resource request amount of a single container in the container group, and whether the suggested resource limit amount is matched with the current resource limit amount of the single container in the container group; and if any judgment result is negative, determining the expected copy number, the expected resource request amount and the expected resource limit amount based on the suggested copy number, the suggested resource request amount and the suggested resource limit amount.
For example, it may be determined whether a difference between the suggested number of copies and the current number of copies of the group of containers is greater than a first preset threshold, whether a difference between the suggested amount of resource requests and the current amount of resource requests for individual containers in the group of containers is greater than a second preset threshold, and whether a difference between the suggested amount of resource restrictions and the current amount of resource restrictions for individual containers in the group of containers is greater than a third preset threshold. It can be understood that when any difference is larger, it indicates that the current configuration of the container group cannot meet the requirement of the container to run the specified service on the resource configuration, and therefore, a new resource configuration should be determined, that is, the expected number of copies, the expected resource request amount, and the expected resource limit amount are determined.
S1024 and S103 may be implemented by using a pre-trained decision model. And judging whether the difference between the number of the suggested copies, the amount of the suggested resource request and the amount of the suggested resource limit and the current number of the copies, the amount of the resource request and the amount of the resource limit is overlarge through a decision model, and if so, generating new resource allocation. If not, the current resource allocation is kept, and the condition that the resource allocation of the container is frequently adjusted is reduced, so that the resource consumed by adjusting the resource allocation is reduced.
When the decision model generates the expected copy number, the expected resource request amount and the expected resource limit amount, the vertical expansion and reduction capacity parameters can be preferentially considered to be modified, namely the expected resource request amount and the expected resource limit amount which are different from the current resource configuration are generated, and the expected copy number is kept to be the same as the current copy number; and when the modified vertical scaling parameters can not meet the QOS indexes or can not meet the available resource quantity of the nodes in the cluster, modifying the vertical scaling parameters and the horizontal scaling parameters, namely generating expected resource request quantity and expected resource limit quantity which are different from the current resource configuration, and the expected copy quantity. Alternatively, the decision model may generate the desired resource request amount and the desired resource limit amount, as well as the desired number of copies, without regard to the priority of the modification parameters.
The decision model is obtained by training a decision tree model by adopting a sample resource request quantity, a sample resource limiting quantity, a sample copy quantity, a sample current resource request quantity, a sample current resource limiting quantity, a sample current copy quantity, a sample service quality parameter, a sample available resource quantity and a training label. Wherein the training labels are the sample expected copy number, the sample expected resource request amount and the sample expected resource limit amount.
In some embodiments of the present disclosure, the electronic device may generate the desired number of copies, the desired resource request amount, and the desired resource restriction amount, and may determine a desired scaling condition for the container group, so that after the adjustment in S104, when the actual resource usage amount of the container group satisfies the desired scaling condition, the container group is scaled.
For example, the scale-up and scale-down conditions include: network traffic indicator, average response time (average _ response _ time), error rate, waiting time, resource condition threshold, and the like. Assuming that the waiting time is 10s and the resource condition threshold is 300Mi, if the time that the memory occupation amount of any container in the container group reaches 300Mi exceeds 10s, adding one more container to the container group.
The capacity expansion process includes increasing or decreasing the number of containers included in the group of containers. The way of the expansion and contraction capacity processing can be determined according to actual needs. The electronic device can send the capacity expansion and reduction conditions to the designated node by using a CI/CD tool or a deployment tool, so that the designated node performs capacity expansion and reduction processing on the container group when monitoring that the actual resource usage of the container group meets the expected capacity expansion and reduction conditions. Or, the electronic device may perform the capacity expansion and reduction processing on the container group through the deployment tool when it is monitored that the actual resource usage of the container group meets the expected capacity expansion and reduction condition.
In the embodiment of the present disclosure, the determining a desired scaling condition includes: and determining at least one group of first service index parameters and first capacity expansion and contraction conditions corresponding to the expected resource request amount and at least one group of second service index parameters and second capacity expansion and contraction conditions corresponding to the expected resource limiting amount according to a preset mapping relation among the service index parameters, the resource usage amount and the capacity expansion and contraction conditions. If the second capacity expansion and reduction condition is the same as the first capacity expansion and reduction condition, integrating the first capacity expansion and reduction condition, a first service index parameter corresponding to the first capacity expansion and reduction condition and a second service index parameter corresponding to the second capacity expansion and reduction condition into a capacity expansion and reduction requirement combination. Then, judging whether a first service index parameter and a second service index parameter which are included in each expansion and reduction demand combination are both between a service index parameter average value and a service index parameter limiting value or not; if yes, the first capacity expansion and reduction condition included by the capacity expansion and reduction requirement combination is used as the expected capacity expansion and reduction condition. The capacity expansion and reduction condition is used for indicating that the capacity expansion and reduction processing is carried out on the container group when the actual resource usage of the container group meets the capacity expansion and reduction condition.
The mapping relationship between the service index parameter, the resource usage amount, and the capacity expansion and reduction condition may be pre-constructed in the same manner as the above-mentioned mapping relationship between the service index parameter, the service quality parameter, the resource usage amount, and the number of copies, and reference may be made to the above description, which is not described herein again.
Referring to fig. 6, the abscissa of fig. 6 represents the service index parameter, the ordinate of fig. 6 represents the resource usage of a single container, the left curve represents the resource usage corresponding to different service index parameters when the scaling condition is X, and the right curve represents the resource usage corresponding to different service index parameters when the scaling condition is Y. When the expected resource request quantity is R2, the service index parameter of the intersection point of the left curve and the right curve is b1, and the service index parameter of the intersection point of the right curve and the left curve is b2; when the expected resource restriction amount is L2, the service index parameter of the intersection point with the left curve is b3, and the service index parameter of the intersection point with the right curve is b4. Therefore, b1, b3 and X are combined as an expansion and contraction requirement, and b2, b4 and Y are combined as an expansion and contraction requirement. Since B1 and B3 are both between the average value of the service index parameter B2 and the limit value of the service index parameter B2-max, and B2 and B4 are not between B2 and B2-max, X is taken as the desired scaling condition.
The embodiment of the present disclosure may further determine the expected capacity expansion and reduction condition according to the service index parameter and the resource usage amount by using the method, so that the expected capacity expansion and reduction condition better meets the actual service operation condition. Compared with a fixed capacity expansion and reduction condition, the capacity expansion and reduction condition can be flexibly adjusted according to the actual operation condition of the service, so that the setting of the capacity expansion and reduction condition is more reasonable.
In the related technology, when a container is deployed in a node included in a cluster with an automatic stretching function, in the operation process of the container, a cloud platform adjusts the actual resource usage amount of the container according to a manually set or default resource request amount and resource limitation amount, so that the QOS index of an application loaded in the container is guaranteed. For example, a cluster with auto-scaling is a kubernets cluster, which is a container arrangement engine.
For example, each box in fig. 7 represents a node in a kubernets cluster, the upper row of concentric circles in each node is a container group, the lower row of concentric circles is a container group, and each concentric circle represents a container. In each container, the outermost layer of each concentric circle represents the resource restriction amount of the container, the inner solid line circle represents the actual resource usage amount, and the inner dotted line circle represents the setting value, i.e., the resource request amount. As shown in fig. 7, in the container operation process, in the upper row of containers in the left node, the actual resource usage amount is much smaller than the resource request amount, which results in a low resource utilization rate in the node. The cloud platform can utilize a Horizontal container automatic scaling (HPA) controller, when predetermined scaling conditions that the CPU utilization rate is smaller than a threshold value, or the memory utilization rate is smaller than the threshold value and the like are met, the number of the copies is reduced from 3 to 2, the reduced containers are the containers in the upper row of the right-side node in FIG. 7, the average load of each container is increased due to the reduction of the number of the copies, so that the actual resource usage amount of each container is closer to the resource request amount, and the resource utilization rate of the node is improved. In the next row of containers in the left node, the actual resource usage exceeds the resource request amount too much, so that the container resource usage is limited. When the cloud platform meets the preset expansion and contraction capacity conditions that the CPU utilization rate reaches a threshold value or the memory utilization rate reaches a threshold value and the like, the number of the copies is increased from 2 to 4, the containers are the next row of containers in the right node in the figure 7 after the number of the copies is increased, the average load of each container is reduced, the actual resource usage amount of each container is closer to the resource request amount, and the condition that the resource usage amount of the containers is limited is reduced.
Although the actual used resources of the container can be adjusted at present, only the number of copies can be adjusted, that is, only horizontal scaling can be performed, and some application scenarios cannot perform horizontal scaling, for example, cannot perform horizontal scaling on a container running a database, so that the application scenarios of this method are limited. Moreover, when the number of copies is adjusted in the method, the number of copies of the container group is adjusted according to preset scaling conditions, so that services operated by the containers in the container group can meet QOS as much as possible, but the scaling conditions are manually preset before the containers are deployed, and because the requirements of the containers on resources follow the change of the service volume of the services operated in the containers, but the resource request volume, the resource limitation volume and the scaling strategy of the containers are fixed, the situation that the configuration after scaling is inconsistent with the actual requirements of the containers may exist. In addition, the horizontal scaling cannot adjust the resource request amount of the container, and when the actual resource usage amount of the container is much smaller than the resource request amount, even if the number of copies is reduced to 1, the actual resource usage amount of the container may still be much smaller than the resource request amount, so that it is difficult to avoid resource waste of the minimum unit.
In the embodiment of the present disclosure, the actual operation requirement of the container can be grasped globally and accurately based on the service index parameter and the service quality parameter generated during the actual operation of the container, so as to obtain more reasonable and more refined configuration, including the expected resource request amount, the expected resource limit amount, and the expected copy number. The expected resource request amount and the expected resource limit amount are expansion and contraction volumes in the vertical direction of a single container, and the expected copy number is expansion and contraction volumes in the horizontal direction of the container group, so that the embodiment of the disclosure can expand and contract the volumes horizontally and vertically, and the application range of the embodiment of the disclosure is wider. In addition, the embodiment of the disclosure can perform the expansion and shrinkage of the container in the horizontal and vertical directions according to the service operation parameters generated in the actual operation process of the container, and better meets the actual operation requirements of the container without depending on the expansion and shrinkage conditions preset manually, thereby better meeting the actual conditions of the service. In addition, because the embodiment of the disclosure can perform vertical capacity expansion, the resource request amount of a single container can be adjusted, and thus the problem of resource waste of a minimum unit caused by the fact that the resource request amount cannot be adjusted is solved.
In this embodiment of the present disclosure, in the above S104, the manners of adjusting the resource configuration information of the container group according to the expected copy number, the expected resource request amount, and the expected resource limit amount include the following three manners:
mode 1, a Continuous Integration/Continuous Deployment (CI/CD) tool is called, and a desired resource request amount, a desired resource restriction amount, and a desired copy amount are sent to the CI/CD tool, so that the CI/CD tool adjusts the resource configuration information of the container group according to the desired copy amount, the desired resource request amount, and the desired resource restriction amount.
The CI/CD tool is an automatic process tool and can automatically adjust the resource configuration information of the container group.
The electronic equipment can write the expected resource request amount, the expected resource limit amount and the expected copy number into a configuration file in a code base, the CI/CD tool obtains the configuration file from the code base, and each container is started in the cluster according to the expected resource request amount, the expected resource limit amount and the expected copy number in the configuration file; or sending the expected resource request amount, the expected resource limit amount and the expected copy number to a specified node, so that the specified node starts each container in the cluster, wherein the specified node is a node for deploying the container, for example, the specified node is a cloud platform. Optionally, the CI/CD tool may further obtain a deployment script code corresponding to the configuration file from the code library, obtain a specified container image file from the product library, and push the deployment script code and the container image file to a specified node.
The CI/CD tool may also then check the start-up results after the designated node has started the container. For example, the start result includes the number of containers that were successfully started.
And 2, when receiving the resource configuration request sent by the CI/CD tool, sending the expected resource request amount, the expected resource limit amount and the expected copy amount to the CI/CD tool, so that the CI/CD tool adjusts the resource configuration information of the container group according to the expected copy amount, the expected resource request amount and the expected resource limit amount.
The electronic device can provide an API interface such that the CI/CD tool sends a resource configuration request to the electronic device by calling the API interface. The following process that the subsequent electronic device sends the expected resource request amount, the expected resource limit amount, and the expected copy number to the CI/CD tool, and the CI/CD tool adjusts the resource configuration information of the container group according to the expected copy number, the expected resource request amount, and the expected resource limit amount may refer to the description in the first embodiment, and will not be described herein again.
Automation of the overall flow of building, testing and deploying of the application is realized by means of a CI/CD tool in the process, method and system, and the disclosed embodiment can seamlessly embed the method for automatically updating the resource request amount, the resource limitation amount and the copy number into the DevOps flow such as monitoring alarm and container deployment and the like in the cloud platform by means of the CI/CD tool, so as to adapt to a data operation (DataOps) framework.
And 3, calling a deployment tool, and triggering the deployment tool to adjust the resource configuration information of the container group according to the expected copy quantity, the expected resource request quantity and the expected resource limit quantity.
In a case that the deployment tool is a Docker complex, the electronic device may transmit the expected resource request amount, the expected resource restriction amount, and the expected copy number to the Docker complex, so that the deployment script of the deployment tool includes the expected resource request amount, the expected resource restriction amount, and the expected copy number, so that the deployment tool starts each container in the cluster according to the expected resource request amount, the expected resource restriction amount, and the expected copy number when executing the deployment script, or sends the expected resource request amount, the expected resource restriction amount, and the expected copy number to the designated node, so that the designated node starts each container in the cluster.
For example, if the expected number of copies for one container group is 2 and the expected number of copies for another container group is 4, the electronic device may send app-blue =2,app-green =4 to the Docker composite, such that in the deployment script of the Docker composite: docker-composition scale app-blue =2app-green =4.
In the case where a container is deployed for a kubernets cluster using a helm deployment tool, the electronic device may generate a configuration file that includes a desired amount of resource requests, a desired amount of resource restrictions, and a desired number of copies, for example, the configuration file is a values.
The manner in which the deployment tool adjusts the resource configuration information of the container group according to the expected copy number, the expected resource request amount, and the expected resource limitation amount may refer to the description of the manner one, and details are not described here again.
In addition, the electronic device may also communicate an indication to the CI/CD or the deployment tool when the quality of service parameter includes an indication indicating whether to interrupt service. If the indication indicates that the service is not interrupted, the CI/CD or deployment tool may perform a rolling update procedure of "start new instance, switch service, delete old instance", i.e., start new container, switch service in old container to new container, delete old container according to desired resource request amount, desired resource limit amount and desired copy number. If the indication indicates an interruption of service, the CI/CD tool or the deployment tool may delete the old container and then start the new container according to the desired amount of resource requests, the desired amount of resource restrictions, and the desired number of copies.
For example, when the indication information is transferred to the deployment tool that deploys the container for the kubernests cluster, the indication information may be updatestream = rollingUpgrade.
According to the method and the device for managing the container configuration, after the expected resource request amount, the expected resource limit amount and the expected copy number are determined based on the service index parameters and the service quality parameters of the container group, the container configuration is updated according to the expected resource request amount, the expected resource limit amount and the expected copy number by means of a CI/CD tool or a deployment tool, so that a closed loop is formed, automatic and intelligent operation and maintenance of the container are achieved, fine operation is achieved, and the method and the device have the advantages of being low in cost, light in weight and easy to implement.
Moreover, the structure and the flow of the cluster where the varactor group is located do not need to be changed, the cluster is not invaded, and the original operation of the cluster is not influenced. In addition, the embodiment of the disclosure does not need to intercept the API, so that the operation service of the container is not influenced.
Based on the same inventive concept, corresponding to the above method embodiments, the disclosed embodiments provide a container resource adjusting apparatus, as shown in fig. 8, the apparatus includes: an acquisition module 801, a determination module 802 and an adjustment module 803;
an obtaining module 801, configured to obtain a service index sequence when a specified service is run by a container group and a preset service quality parameter of the specified service;
a determining module 802, configured to determine, according to the service index sequence and the preset quality of service parameter acquired by the acquiring module 801, a suggested copy number of the container group, and a suggested resource request amount and a suggested resource restriction amount of a single container in the container group;
a determining module 802, configured to determine, if the number of suggested copies, the suggested resource request amount, and the suggested resource limit amount do not match the current number of copies of the container group, the current resource request amount, and the current resource limit amount of a single container in the container group, an expected number of copies, an expected resource request amount, and an expected resource limit amount based on the number of suggested copies, the suggested resource request amount, and the suggested resource limit amount;
an adjusting module 803, configured to adjust the resource configuration information of the container group according to the expected copy number, the expected resource request amount, and the expected resource limitation amount determined by the determining module 802.
In some embodiments of the present disclosure, the service index sequence includes service index parameters at a plurality of historical times during the operation of the specified service by the container group; the determining module 802 is specifically configured to:
calculating the average value of the service index parameters in the service index sequence, and determining the limit value of the service index parameters, wherein the limit value of the service index parameters is more than or equal to the maximum value of the service index parameters in the service index sequence;
determining at least one group of resource usage and copy number corresponding to the average value of the service index parameters and the preset service quality parameters according to the preset mapping relation among the service index parameters, the service quality parameters, the resource usage and the copy number, and taking the determined resource usage and copy number of each group as a group of target resource request and a first copy number;
determining at least one group of resource usage and copy number corresponding to the service index parameter limit value and the preset service quality parameter according to the preset mapping relation among the service index parameter, the service quality parameter, the resource usage and the copy number, and taking the determined resource usage and copy number of each group as a group of target resource limit and a second copy number;
and determining the recommended copy quantity and the recommended resource request quantity and the recommended resource limit quantity of a single container in the container group according to the at least one group of target resource request quantity and the first copy quantity and the at least one group of target resource limit quantity and the second copy quantity.
In some embodiments of the present disclosure, the determining module 802 is specifically configured to:
if the second copy number is the same as the first copy number, integrating the first copy number, the target resource request amount corresponding to the first copy number and the target resource limitation amount corresponding to the second copy number into a resource demand combination;
for each resource demand combination, judging whether the available resource quantity of each node included in the cluster of the container group is enough to support the container deployment in the cluster according to the resource demand combination;
if so, the first copy quantity, the target resource request quantity and the target resource limiting quantity included in the resource demand combination are respectively used as the suggested copy quantity, the suggested resource request quantity and the suggested resource limiting quantity.
In some embodiments of the present disclosure, the apparatus may further include:
the obtaining module 801 is further configured to obtain the service index parameters, the resource usage amount, the service quality parameters, and the copy number of the sample container group at multiple historical moments within a specified time period before determining the number of suggested copies of the container group, and the suggested resource request amount and the suggested resource limitation amount of a single container in the container group according to the service index sequence and the preset service quality parameters;
the dividing module is used for dividing the designated time period into a plurality of change cycles based on the change trend of the service index parameter in the designated time period, and dividing each change cycle into a plurality of time periods, wherein each time period represents a peak period or a valley period of the service index parameter;
the determining module 802 is further configured to determine, for the service index parameter, the resource usage amount, the service quality parameter, and the copy number in the same time period in different change cycles, a mapping relationship between the service index parameter, the resource usage amount, the service quality parameter, and the copy number in the time period;
the determining module 802 is further configured to determine a same target time period to which a plurality of historical times belong in different variation cycles before determining at least one set of resource usage and copy number corresponding to the average value of the service index parameter and the preset service quality parameter according to the preset mapping relationship among the service index parameter, the service quality parameter, the resource usage and the copy number, and use the mapping relationship among the service index parameter, the resource usage, the service quality parameter and the copy number in the target time period as the preset mapping relationship.
In some embodiments of the present disclosure, the,
the determining module 802 is further configured to, after dividing each change cycle into multiple time segments, determine, for each two adjacent time segments included in a single change cycle and having a specified duration, whether the adjacent time segments satisfy an abrupt change condition, where the abrupt change condition includes: the difference value between the minimum value of the service index parameter in the previous time period and the maximum value of the service index parameter in the next time period is larger than a first specified threshold value, or the difference value between the maximum value of the service index parameter in the previous time period and the minimum value of the service index parameter in the next time period is larger than a second specified threshold value; if so, increasing the specified time length, respectively determining two time sections of the increased specified time length by taking the specified time as a starting point, judging whether the two determined time sections meet the mutation condition, and determining the time offset between the specified time length and the initial time of the change period when the increased time length reaches the time length of a single change period or the increased times reaches the preset times; the designated time is the time between the time corresponding to the maximum value and the time corresponding to the minimum value included in the mutation conditions met by the adjacent time periods;
the adjusting module 803 is specifically configured to:
if the time difference between the current time and the starting time of the current change period is less than or equal to the time offset, adding the starting time of the current change period and the time offset to obtain a change time;
if the time difference between the current time and the starting time of the current change period is larger than the time offset, adding the starting time of the next change period and the time offset to obtain a change time;
at the time of change, the resource allocation information of the container group is adjusted according to the desired number of copies, the desired resource request amount, and the desired resource restriction amount.
In some embodiments of the present disclosure, the apparatus may further include:
the determining module 802 is further configured to determine, after determining the number of expected copies, the amount of the resource request to be requested, and the amount of the resource limit to be requested based on the number of suggested copies, the amount of the resource request to be suggested, and the amount of the resource limit to be suggested, according to a preset mapping relationship among the service index parameters, the amount of the resource usage, and the scaling conditions, at least one set of first service index parameters and first scaling conditions corresponding to the amount of the resource request to be requested, and at least one set of second service index parameters and second scaling conditions corresponding to the amount of the resource limit to be requested; if the second capacity expansion and reduction condition is the same as the first capacity expansion and reduction condition, integrating the first capacity expansion and reduction condition, a first service index parameter corresponding to the first capacity expansion and reduction condition and a second service index parameter corresponding to the second capacity expansion and reduction condition into a capacity expansion and reduction requirement combination; judging whether a first service index parameter and a second service index parameter which are included by each capacity expansion and reduction demand combination are both between the average value of the service index parameters and the limiting value of the service index parameters or not according to each capacity expansion and reduction demand combination; if yes, the first capacity expansion and reduction condition included in the capacity expansion and reduction requirement combination is used as an expected capacity expansion and reduction condition;
and the capacity expansion and reduction module is used for performing capacity expansion and reduction processing on the container group when the actual resource usage of the container group meets the expected capacity expansion and reduction condition after the resource configuration information of the container group is adjusted according to the expected copy number, the expected resource request amount and the expected resource limiting amount.
In some embodiments of the present disclosure, the determining module 802 is specifically configured to:
acquiring a resource use sequence of each container included in the container group, wherein the resource use sequence comprises the use amount of the container to a target resource in a node at a plurality of historical times;
inputting the service index sequence, the resource use sequence and the preset service quality parameter into a pre-trained resource request quantity prediction model to obtain a suggested resource request quantity output by the resource request quantity prediction model;
inputting the service index sequence, the resource use sequence and the preset service quality parameter into a pre-trained resource restriction quantity prediction model to obtain a recommended resource restriction quantity output by the resource restriction quantity prediction model;
and inputting the service index sequence, the resource use sequence and the preset service quality parameter into a pre-trained copy quantity prediction model to obtain the suggested copy quantity output by the copy quantity prediction model.
In some embodiments of the present disclosure, the adjusting module 803 is specifically configured to:
calling a CI/CD tool for continuous integration/continuous deployment, and sending an expected resource request amount, an expected resource limit amount and an expected copy amount to the CI/CD tool, so that the CI/CD tool adjusts the resource configuration information of the container group according to the expected copy amount, the expected resource request amount and the expected resource limit amount; alternatively, the first and second electrodes may be,
when a resource configuration request sent by the CI/CD tool is received, sending a desired resource request amount, a desired resource limit amount and a desired copy amount to the CI/CD tool, so that the CI/CD tool adjusts the resource configuration information of the container group according to the desired copy amount, the desired resource request amount and the desired resource limit amount; alternatively, the first and second electrodes may be,
and calling a deployment tool, and triggering the deployment tool to adjust the resource configuration information of the container group according to the expected copy quantity, the expected resource request quantity and the expected resource limit quantity.
The embodiment of the present disclosure further provides an electronic device, as shown in fig. 9, including a processor 901, a communication interface 902, a memory 903 and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 complete mutual communication through the communication bus 904,
a memory 903 for storing computer programs;
the processor 901 is configured to implement the method steps in the above-described method embodiments when executing the program stored in the memory 903.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In another embodiment provided by the present disclosure, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the container resource adjusting methods described above.
In yet another embodiment provided by the present disclosure, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the container resource adjustment methods of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the disclosure are, in whole or in part, generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
It should be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on differences from other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present disclosure, and is not intended to limit the scope of the present disclosure. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present disclosure is included in the protection scope of the present disclosure.

Claims (11)

1. A method for adjusting container resources, the method comprising:
acquiring a service index sequence when a container group runs a specified service and a preset service quality parameter of the specified service;
determining the number of the suggested copies of the container group, and the suggested resource request amount and the suggested resource limit amount of a single container in the container group according to the service index sequence and the preset service quality parameter;
if the suggested copy number, the suggested resource request amount, and the suggested resource limit amount do not match the current copy number of the container group, the current resource request amount, and the current resource limit amount of a single container in the container group, determining an expected copy number, an expected resource request amount, and an expected resource limit amount based on the suggested copy number, the suggested resource request amount, and the suggested resource limit amount;
and adjusting the resource configuration information of the container group according to the expected copy number, the expected resource request amount and the expected resource limit amount.
2. The method of claim 1, wherein the service indicator sequence comprises service indicator parameters at a plurality of historical times during the operation of the specified service by the group of containers; the determining, according to the service indicator sequence and the preset quality of service parameter, the number of suggested copies of the container group, and the amount of suggested resource requests and the amount of suggested resource restrictions of a single container in the container group, includes:
calculating the average value of the service index parameters in the service index sequence, and determining a service index parameter limit value, wherein the service index parameter limit value is greater than or equal to the maximum value of the service index parameters in the service index sequence;
determining at least one group of resource usage amount and copy amount corresponding to the service index parameter average value and the preset service quality parameter according to a preset mapping relation among the service index parameter, the service quality parameter, the resource usage amount and the copy amount, and taking the determined resource usage amount and copy amount of each group as a group of target resource request amount and a first copy amount;
determining at least one group of resource usage and copy number corresponding to the service index parameter limit value and the preset service quality parameter according to a preset mapping relation among the service index parameter, the service quality parameter, the resource usage and the copy number, and taking each group of the determined resource usage and copy number as a group of target resource limit and a second copy number;
and determining the recommended copy quantity and the recommended resource request quantity and the recommended resource limit quantity of a single container in the container group according to at least one group of target resource request quantity and first copy quantity and at least one group of target resource limit quantity and second copy quantity.
3. The method of claim 2, wherein determining the suggested number of copies and the suggested resource request amount and the suggested resource limit amount for a single container in the set of containers based on at least one set of the target resource request amount and the first number of copies and at least one set of the target resource limit amount and the second number of copies comprises:
if the second copy quantity is the same as the first copy quantity, integrating the first copy quantity, the target resource request quantity corresponding to the first copy quantity and the target resource limitation quantity corresponding to the second copy quantity into a resource demand combination;
for each resource demand combination, judging whether the available resource quantity of each node included in the cluster in which the container group is positioned is enough to support the container deployment in the cluster according to the resource demand combination;
if so, the first copy quantity, the target resource request quantity and the target resource limiting quantity included in the resource demand combination are respectively used as the suggested copy quantity, the suggested resource request quantity and the suggested resource limiting quantity.
4. The method of claim 2, wherein before determining the number of suggested copies for the group of containers and the suggested resource request amount and the suggested resource limit amount for an individual container in the group of containers based on the sequence of traffic indicators and the preset quality of service parameter, the method further comprises:
acquiring service index parameters, resource usage, service quality parameters and copy number of a sample container group at a plurality of historical moments in a specified time period;
dividing the designated time period into a plurality of change cycles based on the change trend of the service index parameter in the designated time period, and dividing each change cycle into a plurality of time periods, wherein each time period represents a peak period or a valley period of the service index parameter;
determining a mapping relation among the service index parameters, the resource usage amount, the service quality parameters and the copy number of the time interval according to the service index parameters, the resource usage amount, the service quality parameters and the copy number of the same time interval in different change cycles;
before determining at least one set of resource usage and copy number corresponding to the service index parameter average value and the preset service quality parameter according to a preset mapping relationship among the service index parameter, the service quality parameter, the resource usage and the copy number, the method further includes:
and determining the same target time interval to which the plurality of historical times belong in different change cycles, and taking the mapping relation among the service index parameter, the resource usage amount, the service quality parameter and the copy number of the target time interval as the preset mapping relation.
5. The method of claim 4, wherein after dividing each variation cycle into a plurality of time segments, the method further comprises:
aiming at every two adjacent time periods with specified duration included in a single change cycle, judging whether the adjacent time periods meet mutation conditions, wherein the mutation conditions comprise: the difference value between the minimum value of the service index parameter in the previous time period and the maximum value of the service index parameter in the next time period is larger than a first specified threshold value, or the difference value between the maximum value of the service index parameter in the previous time period and the minimum value of the service index parameter in the next time period is larger than a second specified threshold value;
if so, increasing the specified time length, respectively determining two time sections of the increased specified time length by taking the specified time as a starting point, judging whether the two determined time sections meet the mutation condition, and determining the time offset between the specified time length and the initial time of the change period when the increased time length reaches the time length of a single change period or the increased times reach the preset times; the designated time is the time between the time corresponding to the maximum value and the time corresponding to the minimum value included in the mutation conditions met by the adjacent time periods;
the adjusting the resource configuration information of the container group according to the expected copy number, the expected resource request amount and the expected resource limit amount includes:
if the time difference between the current time and the starting time of the current change period is less than or equal to the time offset, adding the starting time of the current change period and the time offset to obtain a change time;
if the time difference between the current time and the starting time of the current change period is larger than the time offset, adding the starting time of the next change period and the time offset to obtain a change time;
and at the change moment, adjusting the resource configuration information of the container group according to the expected copy quantity, the expected resource request quantity and the expected resource limiting quantity.
6. The method of any of claims 2-5, wherein after determining a desired number of replicas, a desired amount of resource requests, and a desired amount of resource restrictions based on the suggested number of replicas, the suggested amount of resource requests, and the suggested amount of resource restrictions, the method further comprises:
determining at least one group of first service index parameters and first capacity expansion and reduction conditions corresponding to the expected resource request quantity and at least one group of second service index parameters and second capacity expansion and reduction conditions corresponding to the expected resource limiting quantity according to a preset mapping relation among the service index parameters, the resource usage quantity and the capacity expansion and reduction conditions;
if the second capacity expansion and reduction condition is the same as the first capacity expansion and reduction condition, integrating the first capacity expansion and reduction condition, a first service index parameter corresponding to the first capacity expansion and reduction condition and a second service index parameter corresponding to the second capacity expansion and reduction condition into a capacity expansion and reduction demand combination;
for each expansion and reduction demand combination, judging whether a first service index parameter and a second service index parameter which are included by the expansion and reduction demand combination are both between the average value of the service index parameters and the limiting value of the service index parameters;
if yes, taking a first expansion-reduction capacity condition included in the expansion-reduction capacity requirement combination as an expected expansion-reduction capacity condition;
after the adjusting the resource configuration information of the container group according to the expected copy number, the expected resource request amount and the expected resource limiting amount, the method further includes:
and when the actual resource usage of the container group meets the expected expansion and reduction capacity condition, carrying out expansion and reduction capacity processing on the container group.
7. The method according to any of claims 1-5, wherein the determining the number of suggested copies of the container group, and the amount of suggested resource requests and the amount of suggested resource restrictions for a single container in the container group according to the sequence of traffic indicators and the preset quality of service parameter comprises:
acquiring a resource use sequence of each container included in the container group, wherein the resource use sequence comprises the use amount of the container to a target resource in a node where the container is located at the plurality of historical times;
inputting the service index sequence, the resource using sequence and the preset service quality parameter into a pre-trained resource request quantity prediction model to obtain a suggested resource request quantity output by the resource request quantity prediction model;
inputting the service index sequence, the resource use sequence and the preset service quality parameter into a pre-trained resource restriction quantity prediction model to obtain a suggested resource restriction quantity output by the resource restriction quantity prediction model;
and inputting the service index sequence, the resource using sequence and the preset service quality parameter into a pre-trained copy quantity prediction model to obtain the suggested copy quantity output by the copy quantity prediction model.
8. The method according to any of claims 1-5, wherein said adjusting the resource configuration information of the container group according to the desired number of copies, the desired resource request amount and the desired resource restriction amount comprises:
calling a CI/CD tool for continuous integration/continuous deployment, and sending the expected resource request amount, the expected resource limit amount and the expected copy amount to the CI/CD tool, so that the CI/CD tool adjusts the resource configuration information of the container group according to the expected copy amount, the expected resource request amount and the expected resource limit amount; alternatively, the first and second electrodes may be,
when a resource configuration request sent by the CI/CD tool is received, sending the expected resource request amount, the expected resource limit amount and the expected copy amount to the CI/CD tool, so that the CI/CD tool adjusts the resource configuration information of the container group according to the expected copy amount, the expected resource request amount and the expected resource limit amount; alternatively, the first and second electrodes may be,
and calling a deployment tool, and triggering the deployment tool to adjust the resource configuration information of the container group according to the expected copy quantity, the expected resource request quantity and the expected resource limiting quantity.
9. A container resource adjustment apparatus, the apparatus comprising:
the system comprises an acquisition module, a service quality control module and a service quality control module, wherein the acquisition module is used for acquiring a service index sequence when a specified service is operated by a container group and a preset service quality parameter of the specified service;
a determining module, configured to determine, according to the service indicator sequence and the preset quality of service parameter obtained by the obtaining module, a suggested copy number of the container group, and a suggested resource request amount and a suggested resource restriction amount of a single container in the container group;
the determining module is further configured to determine an expected number of copies, an expected amount of resource requests, and an expected amount of resource restrictions based on the suggested number of copies, the suggested amount of resource requests, and the suggested amount of resource restrictions if the suggested number of copies, the suggested amount of resource requests, and the suggested amount of resource restrictions do not match the current number of copies of the group of containers, the current amount of resource requests, and the current amount of resource restrictions of a single container in the group of containers;
and an adjusting module, configured to adjust the resource configuration information of the container group according to the number of the desired copies, the desired resource request amount, and the desired resource limiting amount determined by the determining module.
10. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 8 when executing a program stored in the memory.
11. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 8.
CN202210992780.7A 2022-08-18 2022-08-18 Container resource adjusting method and device, electronic equipment and medium Pending CN115269123A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210992780.7A CN115269123A (en) 2022-08-18 2022-08-18 Container resource adjusting method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210992780.7A CN115269123A (en) 2022-08-18 2022-08-18 Container resource adjusting method and device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN115269123A true CN115269123A (en) 2022-11-01

Family

ID=83752922

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210992780.7A Pending CN115269123A (en) 2022-08-18 2022-08-18 Container resource adjusting method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN115269123A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116599968A (en) * 2023-07-18 2023-08-15 中移(苏州)软件技术有限公司 Expansion and contraction method and device, electronic equipment and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116599968A (en) * 2023-07-18 2023-08-15 中移(苏州)软件技术有限公司 Expansion and contraction method and device, electronic equipment and readable storage medium
CN116599968B (en) * 2023-07-18 2023-11-03 中移(苏州)软件技术有限公司 Expansion and contraction method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US11726836B2 (en) Predicting expansion failures and defragmenting cluster resources
EP2904491B1 (en) Method, node and computer program for enabling automatic adaptation of resource units
US20180144251A1 (en) Server and cloud computing resource optimization method thereof for cloud big data computing architecture
US20140282520A1 (en) Provisioning virtual machines on a physical infrastructure
CN112583861A (en) Service deployment method, resource configuration method, system, device and server
US11579933B2 (en) Method for establishing system resource prediction and resource management model through multi-layer correlations
US11652720B2 (en) Allocating cloud resources in accordance with predicted deployment growth
CN110289994B (en) Cluster capacity adjusting method and device
CN113010260A (en) Elastic expansion method and system for container quantity
US11972301B2 (en) Allocating computing resources for deferrable virtual machines
US11777949B2 (en) Dynamic user access control management
US20220398021A1 (en) Workload management using a trained model
WO2020172852A1 (en) Computing resource scheduling method, scheduler, internet of things system, and computer readable medium
US11669374B2 (en) Using machine-learning methods to facilitate experimental evaluation of modifications to a computational environment within a distributed system
CN115269123A (en) Container resource adjusting method and device, electronic equipment and medium
WO2020206699A1 (en) Predicting virtual machine allocation failures on server node clusters
CN109992408B (en) Resource allocation method, device, electronic equipment and storage medium
CN116737804B (en) Gas data hierarchical processing method and system based on intelligent gas Internet of things
CN115913967A (en) Micro-service elastic scaling method based on resource demand prediction in cloud environment
CN115658319A (en) Resource scheduling method, system, device and storage medium
CN115562841A (en) Cloud video service self-adaptive resource scheduling system and method
CN110932926B (en) Container cluster monitoring method, system and device
CN113949624B (en) Distribution method, device, equipment and medium of link sampling number
CN117194172B (en) Network card power supply control method and related device
CN113867972B (en) Container memory load prediction method based on combination of memory resources and service performance

Legal Events

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