Resource saturation determination method and device, equipment, medium and program product
By determining the target job identification and resource usage information of the target resource management unit in a distributed system, and calculating the resource usage amount in the time interval, the problem of low accuracy in resource saturation calculation in the prior art is solved, and more accurate resource utilization and performance evaluation is achieved.
Patent Information
- Application Number
- CN202411807988.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-21
AI Technical Summary
In the prior art, when calculating the resource saturation of a distributed system resource pool or queue, there is a problem of repeated calculation of idle elastic resources, resulting in low accuracy in resource saturation calculation.
By determining the target job identification of the target resource management unit in the target time period, and obtaining the resource usage information of the target container at least one time point based on the job identification, determining the resource usage amount in combination with the time interval, and finally calculating the resource saturation.
It improves the accuracy of resource saturation calculation, avoids duplicate calculation of idle elastic resources, and enhances the reflection of resource utilization and performance.
Smart Images

Figure CN119668782A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of distributed technology and financial technology, and specifically to a resource saturation determination method, apparatus, device, medium and program product. Background Art
[0002] With the rapid development of computer technology and network technology, the application of distributed systems has become more and more extensive. In distributed systems, resources can be divided into different logical units, such as resource pools, queues, etc. The resource utilization and performance of distributed systems can usually be reflected by evaluating the resource saturation of resource pools or queues.
[0003] Since a resource pool can contain multiple queues, when evaluating the resource saturation of a resource pool or queue, the relevant technology usually calculates by obtaining the allocation of the queue over a period of time. However, in order to improve the resource utilization of the entire resource pool, each queue will be over-allocated, that is, while ensuring a part of the exclusive resources, it can also use some of the idle elastic resources of other queues. Therefore, the resource saturation calculated by the allocation of the queue over a period of time may have the problem of repeated calculation of idle elastic resources, resulting in low calculation accuracy of resource saturation. Summary of the invention
[0004] In view of the above problems, the present disclosure provides a method, apparatus, device, medium and program product for determining resource saturation.
[0005] According to one aspect of the present disclosure, a method for determining resource saturation is provided, comprising: in response to receiving a resource saturation determination request, determining a target job identifier corresponding to the target resource management unit within the target time period based on the target resource management unit and the target time period included in the resource saturation determination request; determining, based on the target job identifier, respective resource usage information of a target container corresponding to the target job identifier at at least one time point, wherein the target container is used to provide resources to process the target job corresponding to the target job identifier, and at least one time point belongs to the target time period; determining the resource usage of the target resource management unit in the target time period based on the respective resource usage information of at least one time point and the time interval between at least one time point; and determining the resource saturation of the target resource management unit in the target time period based on the resource usage, the preset total amount of resources of the target resource management unit and the target time period.
[0006] According to an embodiment of the present disclosure, based on the resource usage information of at least one time point and the time interval between at least one time point, the resource usage of the target resource management unit in the target time period is determined, including: determining abnormal resource usage information from the resource usage information of at least one time point; deleting the abnormal resource usage information from the resource usage information of at least one time point to obtain at least one target resource usage information; based on at least one target resource usage information and the time points corresponding to the at least one target resource usage information, determining the resource usage of the target resource management unit in the target time period.
[0007] According to an embodiment of the present disclosure, abnormal resource usage information includes first abnormal sub-information and second abnormal sub-information; wherein, determining the abnormal resource usage information from the resource usage information of each of at least one time point includes: determining the resource usage information that is the same as the preset information in the resource usage information of each of at least one time point as the first abnormal sub-information; deleting the first abnormal sub-information in the resource usage information of each of at least one time point to obtain at least one intermediate resource usage information; determining the resource standard deviation based on the at least one intermediate resource usage information and the mean information determined by the at least one intermediate resource usage information; based on the abnormal range determined by the resource standard deviation, determining the intermediate resource usage information that belongs to the abnormal range in the at least one intermediate resource usage information as the second abnormal sub-information; determining the abnormal resource usage information based on the first abnormal sub-information and the second abnormal sub-information.
[0008] According to an embodiment of the present disclosure, based on at least one target resource usage information and a time point corresponding to each of the at least one target resource usage information, the resource usage of the target resource management unit in the target time period is determined, including: for each target resource usage information, performing a first target calculation on the target resource usage information and the target time interval to obtain a resource usage sub-amount corresponding to the target resource usage information; performing a second target calculation on the resource usage sub-amount corresponding to each of the at least one target resource usage information to obtain the resource usage of the target resource management unit in the target time period; wherein the target time interval is the time interval between the target time point and an adjacent time point of the target time point, the target time point is the time point corresponding to the target resource usage information, and the adjacent time point is a time point that is adjacent to the target time point and earlier than the target time point in at least one time point.
[0009] According to an embodiment of the present disclosure, the resource saturation of the target resource management unit in the target time period is determined based on the resource usage, the preset total resource amount of the target resource management unit and the target time period, including: determining the effective duration from the target time period based on the time point corresponding to the abnormal resource usage information; performing a third target calculation on the effective duration and the preset total resource amount to obtain the preset resource usage total amount; determining the resource saturation of the target resource management unit in the target time period based on the resource usage and the preset total resource usage.
[0010] According to an embodiment of the present disclosure, based on the time point corresponding to the abnormal resource usage information, the effective duration is determined from the target time period, including: determining the abnormal duration based on the time point corresponding to the abnormal resource usage information; deleting the abnormal duration from the target duration of the target time period to obtain the effective duration.
[0011] According to an embodiment of the present disclosure, based on a target job identifier, determining resource usage information of a target container corresponding to the target job identifier at at least one time point includes: determining at least one time point from a target time period based on a preset time interval sequence; for each time point, executing a first preset instruction in a plurality of computing nodes respectively to obtain at least one candidate container and a candidate job identifier respectively corresponding to the at least one candidate container, wherein the at least one candidate container is determined by candidate containers respectively running at the time point by the plurality of computing nodes; determining a target container corresponding to the target job identifier from the at least one candidate container based on the target job identifier and the candidate job identifier respectively corresponding to the at least one candidate container; and executing a second preset instruction in a target computing node for running the target container to determine the resource usage information of the target container at the time point.
[0012] Another aspect of the present disclosure provides a resource saturation determination device, including: an identification determination module, for determining, in response to receiving a resource saturation determination request, a target job identification corresponding to the target resource management unit within the target time period based on the target resource management unit and the target time period included in the resource saturation determination request; an information determination module, for determining, based on the target job identification, the resource usage information of each target container corresponding to the target job identification at at least one time point, wherein the target container is used to provide resources to process the target job corresponding to the target job identification, and at least one time point belongs to the target time period; a usage determination module, for determining the resource usage of the target resource management unit in the target time period based on the resource usage information of each at least one time point and the time interval between each at least one time point; and a saturation determination module, for determining the resource saturation of the target resource management unit in the target time period based on the resource usage, the preset total resource amount of the target resource management unit and the target time period.
[0013] Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0014] Another aspect of the present disclosure further provides a computer-readable storage medium having a computer program or instruction stored thereon, which implements the steps of the above method when the computer program or instruction is executed by a processor.
[0015] Another aspect of the present disclosure further provides a computer program product, including a computer program or instructions, which implement the steps of the above method when executed by a processor.
[0016] According to the resource saturation determination method disclosed in the present invention, by determining the target job identifier corresponding to the target resource management unit in the target time period, and determining the resource usage information of the target container for processing the target job at at least one time point through the target job identifier, it is possible to determine the actual resource usage information of the target resource management unit from the perspective of the target job actually processed by the target resource management unit in the target time period. And the acquisition granularity of the resource usage information is refined, and the resource usage of the target resource management unit in the target time period is determined by combining the resource usage information of at least one time point with the time interval, so that the resource saturation obtained by combining the resource usage with the preset total resource amount and the target time period is more accurate. Since the actual resource usage information of the target resource management unit in the target segment is obtained, and the acquisition granularity is refined in the process of obtaining the actual resource usage information, the resource saturation of the determined target resource management unit in the target time period is at least partially solved. The technical problem of low calculation accuracy of resource saturation due to repeated calculation of idle elastic resources existing in the related art is achieved, and the technical effect of improving the calculation accuracy of resource saturation is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0018] Figure 1 A diagram schematically illustrates an application scenario of a method, apparatus, device, medium, and program product for determining resource saturation according to an embodiment of the present disclosure;
[0019] Figure 2 A flowchart of a method for determining resource saturation according to an embodiment of the present disclosure is schematically shown;
[0020] Figure 3A schematic diagram schematically shows a target container corresponding to a target job identifier according to an embodiment of the present disclosure;
[0021] Figure 4 A data flow diagram for determining resource usage of a target resource management unit in a target time period according to an embodiment of the present disclosure is schematically shown;
[0022] Figure 5 A structural block diagram of a device for determining resource saturation according to an embodiment of the present disclosure is schematically shown; and
[0023] Figure 6 A block diagram of an electronic device suitable for implementing a method for determining resource saturation according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0024] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0025] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0026] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0027] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0028] It should be noted that the resource saturation determination method and device disclosed in the present invention can be used in the fields of distributed technology and financial technology, and can also be used in any field other than the fields of distributed technology and financial technology, such as: the field of computer technology, the field of artificial intelligence technology, etc. There is no limitation on the application field of the resource saturation determination method and device disclosed in the present invention.
[0029] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0030] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided by the embodiments of the present disclosure provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating a person's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs, and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.
[0031] The inventor discovered during the research process that in the related technology, the resource saturation of a queue or resource pool is usually calculated by obtaining the allocation of the queue within a period of time. However, in order to improve the resource utilization of the entire resource pool, each queue will be over-allocated, that is, while ensuring a part of the exclusive resources, it can also use a part of the idle elastic resources of other queues. Therefore, the resource saturation calculated by obtaining the allocation of the queue within a period of time from the queue may have the problem of repeated calculation of idle elastic resources, resulting in low calculation accuracy of resource saturation.
[0032] Moreover, the above method is not suitable for long-term evaluation. The longer the acquisition time period lasts, the higher the frequency of repeated calculation of shared resources, resulting in very inaccurate overall saturation of the resource pool calculated by the existing method.
[0033] Furthermore, since what is obtained from the queue is the resource allocation of the queue, that is, the allocated resources may not be used in time, resulting in certain unused resources not being successfully counted, so that the calculated resource saturation is not accurate.
[0034] An embodiment of the present disclosure provides a resource saturation determination method, comprising: in response to receiving a resource saturation determination request, determining a target job identifier corresponding to the target resource management unit within the target time period based on the target resource management unit and the target time period included in the resource saturation determination request; determining, based on the target job identifier, respective resource usage information of a target container corresponding to the target job identifier at at least one time point, wherein the target container is used to provide resources to process the target job corresponding to the target job identifier, and at least one time point belongs to the target time period; determining the resource usage of the target resource management unit in the target time period based on the respective resource usage information of at least one time point and the time interval between at least one time point; and determining the resource saturation of the target resource management unit in the target time period based on the resource usage, the preset total amount of resources of the target resource management unit and the target time period.
[0035] Container: It can be called a container, which is a resource encapsulation unit that can perform a specific task or job. It encapsulates the resources required for the task to run, including the central processing unit (CPU), memory, etc. Container can be started and monitored on the computing nodes of the cluster. Container is the basic unit for executing tasks.
[0036] Resource pool: In a distributed computing environment, a resource pool is a logical unit that divides the resources in a cluster into different logical units for resource management and allocation. A resource pool can contain multiple sub-queues, each of which can independently manage a set of resources.
[0037] Resource saturation: Resource saturation refers to the ratio between the amount of resources already used in a resource pool or queue and the total amount of available resources, reflecting the degree of resource usage. It is usually expressed as a percentage and is used to evaluate resource utilization and performance.
[0038] Queue: A queue is a subunit in a resource pool that is used to manage and schedule resource allocation. Each queue can have its own resource quota and scheduling policy to support concurrent execution of multiple tasks or applications.
[0039] Memory: Memory is a temporary storage device used to store data and programs in a computer system. In a distributed computing environment, memory is often an important resource type used to store data and calculation results while a program is running.
[0040] CPU: The CPU is the central processing unit in a computer system, responsible for executing program instructions and performing computing operations. In resource management, the CPU is often used to measure the usage and load of computing resources.
[0041] Figure 1 The application scenario diagram of the resource saturation determination method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown.
[0042] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, a server 105, and at least one server 106. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0043] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0044] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0045] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0046] The server 106 may also be a server that provides various services. For example, the server 106 may be a computing node that can respond to relevant instructions sent by the server 105 and return corresponding response data to the server 105 .
[0047] It should be noted that the resource saturation determination method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the resource saturation determination device provided in the embodiment of the present disclosure can generally be set in the server 105. The resource saturation determination method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the resource saturation determination device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0048] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0049] The following will be based on Figure 1 The scene described by Figure 2~Figure 4 The resource saturation determination method of the disclosed embodiment is described in detail.
[0050] Figure 2 The flowchart of the resource saturation determination method according to an embodiment of the present disclosure is schematically shown.
[0051] like Figure 2 As shown, the method includes operations S210 to S240.
[0052] In operation S210, in response to receiving a resource saturation determination request, a target job identifier corresponding to the target resource management unit within the target time period is determined based on the target resource management unit and the target time period included in the resource saturation determination request.
[0053] In operation S220, based on the target job identifier, resource usage information of each target container corresponding to the target job identifier at at least one time point is determined, wherein the target container is used to provide resources to process the target job corresponding to the target job identifier, and at least one time point belongs to the target time period.
[0054] In operation S230, based on the resource usage information of each of the at least one time point and the time interval between each of the at least one time point, the resource usage amount of the target resource management unit in the target time period is determined.
[0055] In operation S240, based on the resource usage, the preset total amount of resources of the target resource management unit, and the target time period, the resource saturation of the target resource management unit in the target time period is determined.
[0056] According to an embodiment of the present disclosure, a resource saturation determination request may be sent by any client or server, and the resource saturation determination request may include a target resource management unit and a target time period. The resource saturation determination request may be used to indicate the determination of the resource saturation of the target resource management unit in the target time period.
[0057] According to an embodiment of the present disclosure, the target time period is not limited and may be a future time period, a historical time period, or a time period including the future time period and the historical time period.
[0058] According to the embodiments of the present disclosure, the specific type of the target resource management unit is not limited, and it may be a unit for managing, allocating or scheduling resources, such as a queue or a resource pool in a distributed system.
[0059] According to the embodiments of the present disclosure, there is no limitation on the type of resources, which may be computing resources in a computer system, such as CPU, memory, etc.
[0060] According to the embodiments of the present disclosure, the specific content of the resource usage information is not limited, for example, it may include CPU core usage information and / or memory usage information.
[0061] According to an embodiment of the present disclosure, the resources of the target container may be allocated by the target resource management unit, and the resources may belong to the target resource management unit.
[0062] According to an embodiment of the present disclosure, the target job identifier may be an identifier of a job being processed in a target time period. By determining the target job identifier corresponding to the target resource management unit in the target time period, the target job being processed using the resources in the target resource management unit in the target time period may be determined.
[0063] According to an embodiment of the present disclosure, the target job may be assigned to a target resource management unit by a resource manager in a distributed system.
[0064] According to an embodiment of the present disclosure, the target job identifier corresponding to the target resource management unit may be determined according to a job identifier and resource management unit correspondence table, which may include correspondences between multiple job identifiers and multiple resource management units.
[0065] According to an embodiment of the present disclosure, the target job identifier may be one or more. When the target job identifier is multiple, target containers corresponding to each of the multiple target job identifiers may be determined, and respective resource usage information at at least one time point may be determined for each target container.
[0066] According to an embodiment of the present disclosure, there may be one or more target containers corresponding to a target job identifier. When there are multiple target containers, resource usage information of each target container at at least one time point may be determined.
[0067] According to an embodiment of the present disclosure, by determining the resource usage information of each target container corresponding to the target job identifier at at least one time point, the specific resource usage of the target resource management unit can be determined.
[0068] According to an embodiment of the present disclosure, at least one time point may be a time series, and there is a chronological relationship between at least one time point.
[0069] According to an embodiment of the present disclosure, the time intervals between adjacent time points in at least one time point may be the same or different, and the same or different time intervals may be selected according to actual needs.
[0070] According to an embodiment of the present disclosure, the resource usage of the target resource management unit in the target time period may be determined by resource usage information of each at least one time point and the time interval between adjacent time points in the at least one time point.
[0071] According to the embodiments of the present disclosure, for example: in some embodiments, resource usage information a, b, c at time points 1, 2, and 3 are collected, the time interval between time points 1 and 2 is n, the time interval between time points 2 and 3 is m, and the time interval between time point 1 and the starting time point of the target time period is k, then the resource usage of the target resource management unit in the target time period can be determined by a and m, b and n, and m and k.
[0072] According to an embodiment of the present disclosure, when there are multiple target job identifiers and target containers, for each target job identifier, the resource usage corresponding to each of the multiple target containers can be determined through operation S230, and the resource usage corresponding to each of the multiple target containers can be added to obtain the resource usage under the target job identifier, and the resource usage under each of the multiple target job identifiers can be added to obtain the resource usage of the target resource management unit in the target time period.
[0073] According to the embodiment of the present disclosure, the total amount of preset resources is not limited and can be determined by the total amount of resources inherent in the target resource management unit itself.
[0074] According to an embodiment of the present disclosure, the total amount of available resources of the target resource management unit in the target time period can be determined by presetting the total amount of resources and the target time period, thereby determining the resource saturation of the target resource management unit in the target time period by the resource usage and the total amount of available resources.
[0075] According to the resource saturation determination method disclosed in the present invention, by determining the target job identifier corresponding to the target resource management unit in the target time period, and determining the resource usage information of the target container for processing the target job at at least one time point through the target job identifier, it is possible to determine the actual resource usage information of the target resource management unit from the perspective of the target job actually processed by the target resource management unit in the target time period. And the acquisition granularity of the resource usage information is refined, and the resource usage of the target resource management unit in the target time period is determined by combining the resource usage information of at least one time point with the time interval, so that the resource saturation obtained by combining the resource usage with the preset total resource amount and the target time period is more accurate. Since the actual resource usage information of the target resource management unit in the target segment is obtained, and the acquisition granularity is refined in the process of obtaining the actual resource usage information, the resource saturation of the determined target resource management unit in the target time period is at least partially solved. The technical problem of low calculation accuracy of resource saturation due to repeated calculation of idle elastic resources existing in the related art is achieved, and the technical effect of improving the calculation accuracy of resource saturation is achieved.
[0076] According to an embodiment of the present disclosure, determining the resource usage of a target resource management unit in a target time period based on resource usage information of at least one time point and a time interval between at least one time point may include the following operations.
[0077] Determine abnormal resource usage information from the respective resource usage information at at least one time point; delete the abnormal resource usage information from the respective resource usage information at at least one time point to obtain at least one target resource usage information; determine the resource usage of the target resource management unit in the target time period based on the at least one target resource usage information and the time points corresponding to the at least one target resource usage information.
[0078] According to an embodiment of the present disclosure, the type of abnormal resource usage information is not limited and may be empty data or data that deviates from normal values.
[0079] According to an embodiment of the present disclosure, a target time interval corresponding to at least one target resource usage information may be determined based on a time point corresponding to at least one target resource usage information, and the target time interval may be considered as the duration of continuous use of the target resource usage information.
[0080] According to an embodiment of the present disclosure, by determining abnormal resource usage information and deleting the abnormal resource usage information from at least one resource usage information, and determining the resource usage by at least one target resource usage information determined after the deletion and the time points corresponding to the at least one target resource usage information, it is possible to filter the abnormal information, improve the accuracy of determining the resource usage, and thereby improve the accuracy of determining the subsequent resource saturation.
[0081] According to an embodiment of the present disclosure, abnormal resource usage information includes first abnormal sub-information and second abnormal sub-information; determining the abnormal resource usage information from the respective resource usage information at at least one time point may include the following operations.
[0082] Determine resource usage information that is identical to preset information in the resource usage information of at least one time point as first abnormal sub-information; delete the first abnormal sub-information in the resource usage information of at least one time point to obtain at least one intermediate resource usage information; determine the resource standard deviation based on the at least one intermediate resource usage information and mean information determined by the at least one intermediate resource usage information; determine the intermediate resource usage information that belongs to the abnormal range in the at least one intermediate resource usage information as second abnormal sub-information based on the abnormal range determined by the resource standard deviation; determine the abnormal resource usage information based on the first abnormal sub-information and the second abnormal sub-information.
[0083] According to the embodiments of the present disclosure, there is no limitation on the preset information, which may be information such as empty data, preset symbols, preset values, etc.
[0084] According to an embodiment of the present disclosure, resource usage information with obvious abnormalities can be filtered out through preset information.
[0085] According to an embodiment of the present disclosure, by filtering out the intermediate resource usage information from which the first abnormal sub-information is removed, the resource standard deviation of at least one intermediate resource usage information is determined, so that the accuracy of determining the resource standard deviation can be improved.
[0086] According to the embodiments of the present disclosure, the abnormal range is not limited and may be the intermediate resource usage information that differs too much from the resource standard deviation, such as: determining a resource standard deviation greater than n times as the abnormal range, where n may be any value. In some embodiments, n is 3.
[0087] According to an embodiment of the present disclosure, the abnormal resource usage information in the resource usage information of at least one time point can be determined through the first abnormal sub-information and the second abnormal sub-information, so that by deleting the abnormal resource usage information, data cleaning of the resource usage information can be achieved, thereby improving the accuracy of subsequent resource usage calculations.
[0088] According to an embodiment of the present disclosure, determining the resource usage of a target resource management unit in a target time period based on at least one target resource usage information and a time point corresponding to each of the at least one target resource usage information may include the following operations.
[0089] For each target resource usage information, a first target calculation is performed on the target resource usage information and the target time interval to obtain a resource usage sub-amount corresponding to the target resource usage information; a second target calculation is performed on the resource usage sub-amount corresponding to at least one target resource usage information to obtain the resource usage amount of the target resource management unit in the target time period; wherein the target time interval is the time interval between the target time point and the adjacent time point of the target time point, the target time point is the time point corresponding to the target resource usage information, and the adjacent time point is a time point that is adjacent to the target time point and earlier than the target time point in at least one time point.
[0090] According to the embodiments of the present disclosure, there is no limitation on the first target calculation, and it may be any calculation method that can obtain a resource usage sub-amount corresponding to the target resource usage information, such as multiplication operation.
[0091] According to the embodiments of the present disclosure, the second target calculation is not limited and can be any calculation method that can obtain the resource usage of the target resource management unit in the target time period, such as addition operation, averaging operation, etc.
[0092] According to the embodiments of the present disclosure, in some embodiments, the target time interval may be: the target resource usage information at time points 1, 2, and 3 are a, b, and c respectively, and time points 1, 2, and 3 are consecutive time points in at least one time point. Then, for the target resource time information b, its target time interval is the time interval between time point 2 and time point 1.
[0093] According to the embodiments of the present disclosure, the unit of the target time interval is not limited and may be seconds, minutes, etc.
[0094] According to an embodiment of the present disclosure, in some embodiments, the resource usage of the target resource management unit in the target time period can be obtained by the following formula (1).
[0095] W = ∑ (n i ×t i ); (1)
[0096] Where W is the resource usage of the target resource management unit in the target time period, n i is the resource usage information corresponding to the i-th time point, t i is the target time interval corresponding to the i-th time point.
[0097] According to an embodiment of the present disclosure, in some embodiments, the resource usage under the target job identification corresponding to the target resource management unit may be counted, which may be specifically shown in the following Table 1, for example.
[0098] Table 1
[0099]
[0100] According to an embodiment of the present disclosure, Table 1 schematically shows a case where resource usage is CPU usage and memory usage, wherein the CPU usage is calculated by formula (1) based on the CPU usage information included in the resource usage information, and the memory usage is calculated by formula (1) based on the memory usage information included in the resource usage information.
[0101] According to an embodiment of the present disclosure, in some embodiments, the resource usage of a target resource management unit of a smaller unit such as a queue can be counted and recorded as a statistical table, so as to determine the resource usage of the target resource management unit including the smaller unit, such as a resource pool, through the statistical table.
[0102] According to the embodiment of the present disclosure, it can be seen from Table 1 that ID1 and ID2 are both target job identifiers corresponding to resource pool Pool1. When the target resource management unit is Pool1, if the CPU usage of resource pool Pool1 in the target time period is determined, the CPU usage of ID1 and ID2 can be added. ID1 is the target job identifier corresponding to queue Queue1. When the target resource management unit is Queue1, it can be determined from Table 1 that the CPU usage of queue Queue1 in the target time period is 5000.
[0103] According to an embodiment of the present disclosure, the target resource usage information is calculated at time intervals, and the resource usage sub-amounts of the calculated multiple time intervals are used for a second target calculation, thereby obtaining the resource usage of the target resource management unit in the target time period. This can improve the calculation granularity of the resource usage and avoid the problem of repeated calculation of elastic resources.
[0104] According to an embodiment of the present disclosure, determining the resource saturation of the target resource management unit in the target time period based on the resource usage, the preset total resource amount of the target resource management unit and the target time period may include the following operations.
[0105] Based on the time point corresponding to the abnormal resource usage information, determine the effective duration from the target time period; perform a third target calculation on the effective duration and the preset total resource usage to obtain the preset total resource usage; based on the resource usage and the preset total resource usage, determine the resource saturation of the target resource management unit in the target time period.
[0106] According to an embodiment of the present disclosure, the abnormal duration can be determined by the time point corresponding to the abnormal resource usage information, and the effective market can be determined by deleting the abnormal duration from the target time period.
[0107] According to the embodiments of the present disclosure, there is no limitation on the calculation method of the third target calculation, which may be a multiplication operation or the like.
[0108] According to an embodiment of the present disclosure, by performing a third target calculation on the effective duration and the total amount of preset resources, the total amount of available resources of the target resource management unit in the target time period, that is, the total amount of preset resource usage, can be obtained.
[0109] According to an embodiment of the present disclosure, in some embodiments, the resource saturation of the target resource management unit in the target time period can be determined according to the following formula (2).
[0110] S=W / A×(T total -T w ); (2)
[0111] Among them, S is the resource saturation of the target resource management unit in the target time period, A is the preset total amount of resources, T total is the target duration of the target time period, T w For abnormal duration, through T total -T w You can get the effective time.
[0112] According to an embodiment of the present disclosure, since the total amount of preset resource usage is determined by the effective duration, and the resource saturation of the target resource management unit in the target time period is determined by the total amount of preset resource usage and the actual resource usage in the target time period, the accuracy of resource saturation can be improved.
[0113] According to an embodiment of the present disclosure, determining the effective duration from the target time period based on the time points corresponding to the abnormal resource usage information may include the following operations.
[0114] Based on the time point corresponding to the abnormal resource usage information, determine the abnormal duration; delete the abnormal duration from the target duration of the target time period to obtain the effective duration.
[0115] According to an embodiment of the present disclosure, an abnormal time interval corresponding to the abnormal resource usage information can be determined through the time point corresponding to the abnormal resource usage information. The abnormal time interval can be the time interval between the abnormal time point corresponding to the abnormal resource usage information and an adjacent time point. The adjacent time point can be at least one time point that is adjacent to the abnormal time point and earlier than the abnormal time point.
[0116] According to an embodiment of the present disclosure, the abnormal time interval corresponding to each abnormal resource usage information is added to obtain the abnormal duration.
[0117] According to an embodiment of the present disclosure, the abnormal duration is deleted from the total duration of the target time period, that is, the target time, and the effective duration in the target time period can be determined.
[0118] According to an embodiment of the present disclosure, determining, based on a target job identifier, resource usage information of each target container corresponding to the target job identifier at at least one time point may include the following operations.
[0119] Based on a preset time interval sequence, at least one time point is determined from a target time period; for each time point, a first preset instruction is executed in a plurality of computing nodes respectively to obtain at least one candidate container and a candidate job identifier respectively corresponding to the at least one candidate container, wherein the at least one candidate container is determined by candidate containers respectively running at a time point by a plurality of computing nodes; based on the target job identifier and the candidate job identifiers respectively corresponding to the at least one candidate container, a target container corresponding to the target job identifier is determined from the at least one candidate container; a second preset instruction is executed in a target computing node for running the target container to determine resource usage information of the target container at the time point.
[0120] According to an embodiment of the present disclosure, the preset time interval sequence may include time intervals between adjacent time points in at least one time point. The time intervals may be the same or different.
[0121] According to an embodiment of the present disclosure, a computing node may be a computing device such as a computer or a server.
[0122] According to the embodiments of the present disclosure, the specific instructions of the first preset instruction and the second preset instruction are not limited. The first preset instruction may be an instruction that can obtain the container process number of the running container and the job identifier corresponding to the container, such as: jps, ps instructions, etc. The second preset instruction may be an instruction that can obtain the resource usage information currently used by the container, such as: top instruction, etc.
[0123] According to an embodiment of the present disclosure, when a container is running, it may appear as a process on a computing node, and the process information includes a container process number of the container and a job identifier corresponding to the container process number.
[0124] According to an embodiment of the present disclosure, a first preset instruction can be sent to multiple computing nodes so that the multiple computing nodes respectively execute the first preset instruction and receive candidate containers respectively running at the time point and candidate job identifiers respectively corresponding to the candidate containers returned by the multiple computing nodes.
[0125] According to an embodiment of the present disclosure, the second preset instruction may be sent to the target computing node, so that the target computing node executes the second preset instruction and returns the resource usage information of the target container at that time point.
[0126] According to an embodiment of the present disclosure, in some embodiments, resource usage information of each target container at at least one time point may be summarized, and a target resource management unit to which the target container belongs may be determined, as shown in Table 2.
[0127] Table 2
[0128]
[0129] According to an embodiment of the present disclosure, when there are multiple target containers, it is also possible to summarize the resource usage information of each target container at the same or different time points, and determine the target resource management unit to which each target container belongs, so as to facilitate subsequent faster determination of the resource usage of the target resource management unit in the target time period, thereby improving the resource saturation determination rate.
[0130] According to an embodiment of the present disclosure, by respectively instructing multiple computing nodes to run a first preset instruction at at least one time point, it is possible to determine the candidate container being run and the candidate job identifier corresponding to the candidate container, so that by instructing the target computing node used to run the target container to execute a second preset instruction, it is possible to determine the resource usage information of each target container at at least one time point, that is, to determine the resource usage information actually used by each target resource management unit at at least one time point.
[0131] According to the embodiments of the present disclosure, and in some embodiments, the target container corresponding to the target job identifier can be determined first, and the second preset instruction is executed only in the target computing node used to run the target container, thereby reducing the waste of unnecessary resources and improving the determination rate.
[0132] According to the embodiments of the present disclosure, since the resource usage information actually used by the target resource management unit in the target time period is obtained in the embodiments of the present disclosure, and the resource usage information of at least one time granularity is obtained, the accuracy of the resource saturation evaluation for a long period and a long time period can also be guaranteed. And at least partially overcome the problem of inaccurate resource saturation evaluation caused by the failure to successfully count certain unused resources.
[0133] According to the embodiments of the present disclosure, the resource saturation determination method of the embodiments of the present disclosure can be used to guide the rational use of resources and to promptly handle scenarios of long-term resource shortage and long-term waste.
[0134] Figure 3A schematic diagram of a target container corresponding to a target job identifier according to an embodiment of the present disclosure is schematically shown.
[0135] like Figure 3 As shown, the target job corresponding to the target job identifier can be processed by multiple target containers providing resources, and the multiple target containers include target container 1, target container 2, ..., target container n, etc.
[0136] Figure 4 The data flow diagram for determining the resource usage of a target resource management unit in a target time period according to an embodiment of the present disclosure is schematically shown.
[0137] like Figure 4 As shown, in the case where the target job identifier corresponds to multiple target containers, at each time point, multiple computing nodes can be respectively executed with a first preset instruction, thereby obtaining at least one candidate container and a candidate job identifier 401 respectively corresponding to the at least one candidate container, and based on the target job identifier and the candidate job identifiers respectively corresponding to the at least one candidate container, multiple target containers 402 corresponding to the target job identifier are determined from the at least one candidate container, and the target computing nodes respectively corresponding to the multiple target containers are respectively executed with a second preset instruction, thereby determining the resource usage information 403 of the multiple target containers at the time point.
[0138] According to an embodiment of the present disclosure, for each target container, the resource usage information of the target container at at least one time point is aggregated to obtain the resource usage information of the target container at at least one time point. The resource usage of the target resource management unit in the target time period can be determined 404 through the resource usage information of the multiple target containers at at least one time point and the time interval between the at least one time point.
[0139] Based on the above resource saturation determination method, the present disclosure also provides a resource saturation determination device. Figure 5 The device is described in detail.
[0140] Figure 5 The structural block diagram of the resource saturation determination device according to an embodiment of the present disclosure is schematically shown.
[0141] like Figure 5 As shown, the resource saturation determination device 500 includes an identification determination module 510 , an information determination module 520 , a usage determination module 530 and a saturation determination module 540 .
[0142] The identification determination module 510 is used to determine the target job identification corresponding to the target resource management unit in the target time period based on the target resource management unit and the target time period included in the resource saturation determination request in response to receiving the resource saturation determination request.
[0143] The information determination module 520 is used to determine the resource usage information of the target container corresponding to the target job identifier at at least one time point based on the target job identifier, wherein the target container is used to provide resources to process the target job corresponding to the target job identifier, and at least one time point belongs to the target time period.
[0144] The usage amount determination module 530 is used to determine the resource usage amount of the target resource management unit in the target time period based on the resource usage information of each at least one time point and the time interval between each at least one time point.
[0145] The saturation determination module 540 is used to determine the resource saturation of the target resource management unit in the target time period based on the resource usage, the preset total resource amount of the target resource management unit and the target time period.
[0146] According to an embodiment of the present disclosure, the usage determination module 530 may include: an abnormal information determination submodule, a deletion submodule, and a determination submodule.
[0147] The abnormal information determination submodule is used to determine abnormal resource usage information from the resource usage information of at least one time point.
[0148] The deletion submodule is used to delete the abnormal resource usage information from the resource usage information of at least one time point to obtain at least one target resource usage information.
[0149] The determination submodule is used to determine the resource usage of the target resource management unit in the target time period based on at least one target resource usage information and a time point corresponding to each of the at least one target resource usage information.
[0150] According to an embodiment of the present disclosure, the abnormal resource usage information includes first abnormal sub-information and second abnormal sub-information. The abnormal information determination submodule includes: a first abnormal determination unit, a first deletion unit, a standard deviation determination unit, a second abnormal determination unit and a third abnormal determination unit.
[0151] The first abnormality determining unit is used to determine resource usage information that is the same as preset information in the resource usage information of at least one time point as first abnormality sub-information.
[0152] The first deleting unit is used to delete the first abnormal sub-information in the resource usage information of at least one time point to obtain at least one intermediate resource usage information.
[0153] The standard deviation determining unit is used to determine the resource standard deviation based on at least one intermediate resource usage information and mean information determined by the at least one intermediate resource usage information.
[0154] The second abnormality determination unit is used to determine, based on the abnormality range determined by the resource standard deviation, the intermediate resource usage information belonging to the abnormal range in the at least one intermediate resource usage information as the second abnormality sub-information.
[0155] The third abnormality determination unit is used to determine abnormal resource usage information based on the first abnormality sub-information and the second abnormality sub-information.
[0156] According to an embodiment of the present disclosure, the determining submodule includes: a first determining unit and a second determining unit.
[0157] The first determination unit is used to perform a first target calculation on each target resource usage information by combining the target resource usage information with the target time interval to obtain a resource usage sub-amount corresponding to the target resource usage information.
[0158] The second determination unit is used to perform a second target calculation on the resource usage sub-amount corresponding to each of the at least one target resource usage information to obtain the resource usage of the target resource management unit in the target time period. The target time interval is the time interval between the target time point and the adjacent time point of the target time point, the target time point is the time point corresponding to the target resource usage information, and the adjacent time point is a time point that is adjacent to the target time point and earlier than the target time point in at least one time point.
[0159] According to an embodiment of the present disclosure, the saturation determination module 540 includes: an effective duration determination submodule, a calculation submodule, and a saturation determination submodule.
[0160] The effective duration determination submodule is used to determine the effective duration from the target time period based on the time point corresponding to the abnormal resource usage information.
[0161] The calculation submodule is used to perform a third target calculation on the effective duration and the total amount of preset resources to obtain the total amount of preset resource usage.
[0162] The saturation determination submodule is used to determine the resource saturation of the target resource management unit in the target time period based on the resource usage and the preset total resource usage.
[0163] According to an embodiment of the present disclosure, the effective duration determination submodule includes: an abnormal duration determination unit and an effective duration determination unit.
[0164] The abnormal duration determining unit is used to determine the abnormal duration based on the time point corresponding to the abnormal resource usage information.
[0165] The effective duration determining unit is used to delete the abnormal duration from the target duration of the target time period to obtain the effective duration.
[0166] According to an embodiment of the present disclosure, the information determination module 520 includes: a time point determination submodule, a first execution submodule, a container determination submodule, and a second execution submodule.
[0167] The time point determination submodule is used to determine at least one time point from the target time period based on a preset time interval sequence.
[0168] The first execution submodule is used to execute the first preset instruction in multiple computing nodes at each time point to obtain at least one candidate container and a candidate job identifier corresponding to the at least one candidate container, wherein the at least one candidate container is determined by the candidate containers respectively running by the multiple computing nodes at the time point.
[0169] The container determination submodule is used to determine a target container corresponding to the target job identifier from at least one candidate container based on the target job identifier and the candidate job identifiers corresponding to each of the at least one candidate container.
[0170] The second execution submodule is used to execute a second preset instruction in a target computing node used to run the target container, and determine resource usage information of the target container at a time point.
[0171] According to an embodiment of the present disclosure, any multiple modules of the identification determination module 510, the information determination module 520, the usage determination module 530, and the saturation determination module 540 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the identification determination module 510, the information determination module 520, the usage determination module 530, and the saturation determination module 540 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in an appropriate combination of any of them. Alternatively, at least one of the identification determination module 510, the information determination module 520, the usage determination module 530, and the saturation determination module 540 may be at least partially implemented as a computer program module, and when the computer program module is executed, a corresponding function may be performed.
[0172] Figure 6 A block diagram of an electronic device suitable for implementing a method for determining resource saturation according to an embodiment of the present disclosure is schematically shown.
[0173] like Figure 6 As shown, the electronic device 600 according to an embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 to a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include an onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0174] In RAM 603, various programs and data required for the operation of electronic device 600 are stored. Processor 601, ROM 602 and RAM 603 are connected to each other via bus 604. Processor 601 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 602 and / or RAM 603. It should be noted that the program can also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0175] According to an embodiment of the present disclosure, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to the bus 604. The electronic device 600 may further include one or more of the following components connected to the input / output (I / O) interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 608 including a hard disk, etc.; and a communication portion 609 including a network interface card such as a LAN card, a modem, etc. The communication portion 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage portion 608 as needed.
[0176] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0177] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 602 and / or RAM 603 described above and / or one or more memories other than ROM 602 and RAM 603.
[0178] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the resource saturation determination method provided by the embodiment of the present disclosure.
[0179] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 601. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0180] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 609, and / or installed from a removable medium 611. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0181] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, apparatus, module, unit, etc. described above can be implemented by a computer program module.
[0182] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0183] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0184] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0185] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A method for determining resource saturation, characterized in that: The method comprises: In response to receiving a resource saturation determination request, determining a target job identifier corresponding to the target resource management unit within the target time period based on the target resource management unit and the target time period included in the resource saturation determination request; Based on the target job identifier, determining resource usage information of each target container corresponding to the target job identifier at at least one time point, wherein the target container is used to provide resources to process the target job corresponding to the target job identifier, and at least one of the time points belongs to the target time period; Determining the resource usage of the target resource management unit in the target time period based on the resource usage information of each of the at least one time point and the time interval between each of the at least one time point; The resource saturation of the target resource management unit in the target time period is determined based on the resource usage, the preset total amount of resources of the target resource management unit and the target time period.
2. The method according to claim 1, characterized in that The determining, based on the resource usage information of each of the at least one time point and the time interval between each of the at least one time point, the resource usage of the target resource management unit in the target time period comprises: Determining abnormal resource usage information from the resource usage information of at least one of the time points; Deleting the abnormal resource usage information from the resource usage information of at least one of the time points to obtain at least one target resource usage information; Based on the at least one target resource usage information and a time point corresponding to each of the at least one target resource usage information, the resource usage of the target resource management unit in the target time period is determined.
3. The method according to claim 2, characterized in that The abnormal resource usage information includes first abnormal sub-information and second abnormal sub-information; The determining of abnormal resource usage information from the resource usage information of at least one of the time points includes: Determine resource usage information that is the same as preset information in the resource usage information of at least one of the time points as the first abnormal sub-information; Deleting the first abnormal sub-information in the resource usage information of at least one of the time points to obtain at least one intermediate resource usage information; Determining a resource standard deviation based on at least one of the intermediate resource usage information and mean information determined from at least one of the intermediate resource usage information; Based on the abnormal range determined by the resource standard deviation, determining the intermediate resource usage information belonging to the abnormal range in at least one of the intermediate resource usage information as the second abnormal sub-information; The abnormal resource usage information is determined based on the first abnormal sub-information and the second abnormal sub-information.
4. The method according to claim 2, characterized in that: The determining, based on at least one target resource usage information and a time point corresponding to each of the at least one target resource usage information, the resource usage amount of the target resource management unit in the target time period includes: For each of the target resource usage information, performing a first target calculation on the target resource usage information and the target time interval to obtain a resource usage sub-amount corresponding to the target resource usage information; Perform a second target calculation on the resource usage sub-amount corresponding to at least one of the target resource usage information to obtain the resource usage amount of the target resource management unit in the target time period; Among them, the target time interval is the time interval between the target time point and an adjacent time point of the target time point, the target time point is the time point corresponding to the target resource usage information, and the adjacent time point is a time point that is adjacent to the target time point and earlier than the target time point in at least one time point.
5. The method according to claim 2, characterized in that: The determining, based on the resource usage, the preset total amount of resources of the target resource management unit and the target time period, the resource saturation of the target resource management unit in the target time period includes: Determining the effective duration from the target time period based on the time point corresponding to the abnormal resource usage information; Perform a third target calculation on the effective duration and the total amount of preset resources to obtain a total amount of preset resource usage; Based on the resource usage and the preset total resource usage, the resource saturation of the target resource management unit in the target time period is determined.
6. The method according to claim 5, characterized in that The determining the effective duration from the target time period based on the time point corresponding to the abnormal resource usage information includes: Determining the abnormal duration based on the time point corresponding to the abnormal resource usage information; The abnormal duration is deleted from the target duration of the target time period to obtain the effective duration.
7. The method according to claim 1, characterized in that The determining, based on the target job identifier, resource usage information of each target container corresponding to the target job identifier at at least one time point includes: Based on a preset time interval sequence, determining at least one of the time points from the target time period; For each of the time points, Executing the first preset instruction in the plurality of computing nodes respectively to obtain at least one candidate container and a candidate job identifier respectively corresponding to the at least one candidate container, wherein the at least one candidate container is determined by the candidate containers respectively running on the plurality of computing nodes at the time point; Based on the target job identifier and the candidate job identifiers corresponding to the at least one candidate container, determining a target container corresponding to the target job identifier from the at least one candidate container; A second preset instruction is executed in a target computing node used to run the target container to determine resource usage information of the target container at the time point.
8. A device for determining resource saturation, characterized in that: The device comprises: an identifier determination module, configured to, in response to receiving a resource saturation determination request, determine a target job identifier corresponding to the target resource management unit within the target time period based on a target resource management unit and a target time period included in the resource saturation determination request; an information determination module, configured to determine, based on the target job identifier, resource usage information of each target container corresponding to the target job identifier at at least one time point, wherein the target container is configured to provide resources to process the target job corresponding to the target job identifier, and at least one of the time points belongs to the target time period; A usage determination module, configured to determine the resource usage of the target resource management unit in a target time period based on the resource usage information of each of the at least one time point and the time interval between each of the at least one time point; The saturation determination module is used to determine the resource saturation of the target resource management unit in the target time period based on the resource usage, the preset total resource amount of the target resource management unit and the target time period.
9. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.