A computing resource scheduling method, device and storage medium
By classifying compute instance types and dynamically adjusting resources based on user needs and historical consumption data, the problem of unreasonable resource allocation in cloud-based design scenarios is solved, thereby improving resource utilization and user experience.
Patent Information
- Application Number
- CN202411507146.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-28
AI Technical Summary
In cloud-based design scenarios, unreasonable allocation of computing resources can lead to resource contention by a single user affecting the user experience of other users, and even when sufficient resources are reserved, computing power can be wasted.
Computing instance types are categorized based on their computing capabilities. Demand is predicted based on user permissions and historical computing power consumption data of applications. Computing instance types are matched accordingly, and resource consumption is continuously monitored to dynamically adjust computing resources.
This achieves a reasonable allocation of computing resources, avoids individual users from monopolizing resources, improves user experience, and increases resource utilization efficiency.
Smart Images

Figure CN119046014B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a computing resource scheduling method, device and storage medium. Background Art
[0002] In industrial design scenarios, design software generally requires high computing power to run. Users are accustomed to deploying and running these design applications on workstations. This approach is not conducive to the unified allocation and management of computing resources. Professional workstations are generally large and not easy to carry around, so cloud design is born. Public clouds have the characteristics of sufficient resources and on-demand use. Unlike the scheduling of traditional resources, the development of public cultural cloud environments has enabled more resources to be stored in the cloud. Since the allocation efficiency of cloud resources affects the user experience of using cloud computing services, resources in the cloud need to be allocated and used more reasonably.
[0003] The publication number is CN114090240A, and the name is scheduling method, device, equipment and storage medium for public cloud computing resources, which belongs to the field of cloud computing technology. The disclosed method includes: monitoring the first computing resource occupied by the work task running on the virtual device; when monitoring that the public cloud server recycles at least part of the first computing resource, applying for the second computing resource for the virtual device from the public cloud server according to the preset resource scheduling strategy; replacing the first computing resource to be recycled with the second computing resource to run the work task.
[0004] The publication number is CN112905343A, and the name is a resource scheduling system based on load characteristics in an industrial cloud environment, which belongs to the field of cloud computing technology. The disclosed system includes: a load data monitor, the load characteristic analyzer, a resource scheduling decision maker, a resource scheduling executor and a database. The load data monitor includes a monitoring server and several monitoring clients; the monitoring client monitors the load data of the working node of the cloud platform and sends it to the monitoring server; the monitoring server stores the received load data in the historical load data sequence of the master node persistent database, and sends the historical load data sequence to the load characteristic analyzer; the load characteristic analyzer processes the historical load data sequence to obtain the load prediction value at the current time point, and sends it to the resource scheduling decision maker; the resource scheduling decision maker generates a resource scheduling decision plan according to the load prediction value at the current time point, and sends it to the resource scheduling executor; the resource scheduling executor executes resource scheduling according to the resource scheduling decision plan; the database stores the data of the load data monitor, the load characteristic analyzer, the resource scheduling decision maker, and the resource scheduling executor.
[0005] However, in the existing technology, in the cloud design scenario, in order to make full use of resources, multiple users usually share a computing instance. If the user resource allocation is unreasonable, resource preemption will occur on a single computing instance. In serious cases, the resource preemption behavior of a single user will affect the user experience of all users on this computing instance. If sufficient resources are reserved, computing power resources will be wasted. Therefore, how to reasonably schedule resources in the cloud design scenario is a technical problem that needs to be solved urgently. Summary of the invention
[0006] The embodiments of the present disclosure provide a computing resource scheduling method, device and storage medium to at least solve the technical problem of unreasonable computing resource allocation in the design of cloud scenarios existing in the prior art.
[0007] According to one aspect of an embodiment of the present disclosure, a computing resource scheduling method is provided, including:
[0008] The types of computing instances are divided according to the computing capabilities of the computing instances; wherein the computing capabilities include one or a combination of the following: the number of central processing units (CPUs), the number of memories, the number of graphics processing units (GPUs), and the number of video memories; and different types of computing instances have different maximum numbers of users allowed to connect and the maximum resource usage of each user;
[0009] When a user initiates a connection request, determine the user's permission to use the computing instance type; match the computing instance type based on the computing power demand predicted by the historical computing power consumption data of the application requested by the user, and allocate the user's connection request to the computing instance of the corresponding type; wherein the matched computing instance type does not exceed the computing instance type allowed for use;
[0010] Continuously monitor the resources consumed by applications in user sessions and dynamically adjust computing resources based on the monitoring results.
[0011] According to another aspect of an embodiment of the present disclosure, a storage medium is also provided, the storage medium including a stored program, wherein when the program is running, a processor executes any one of the computing power resource scheduling methods described above.
[0012] According to another aspect of the embodiment of the present disclosure, a computing resource scheduling device is further provided, comprising: a division module, configured to divide the types of computing instances according to the computing capabilities of the computing instances; wherein the computing capabilities include one or a combination of the following: the number of central processing units (CPUs), the number of memories, the number of graphics processing units (GPUs), and the number of video memories; and different types of computing instances have different maximum numbers of users allowed to be connected and different maximum resource usages for each user;
[0013] The prediction module is configured to determine the user's permission to use the computing instance type when the user initiates a connection request; match the computing instance type according to the computing power demand predicted by the historical computing power consumption data of the application requested by the user, and allocate the user's connection request to the computing instance of the corresponding type; wherein the matched computing instance type does not exceed the computing instance type allowed for use;
[0014] The monitoring module is configured to continuously monitor the resources consumed by the application in the user session and dynamically adjust the computing resources according to the monitoring results.
[0015] According to another aspect of the embodiments of the present disclosure, there is also provided a computing resource scheduling device, including: a processor; and
[0016] A memory, connected to the processor, configured to provide the processor with instructions for processing the following processing steps:
[0017] The types of computing instances are divided according to the computing capabilities of the computing instances; wherein the computing capabilities include one or a combination of the following: the number of central processing units (CPUs), the number of memories, the number of graphics processing units (GPUs), and the number of video memories; and different types of computing instances have different maximum numbers of users allowed to connect and the maximum resource usage of each user;
[0018] When a user initiates a connection request, determine the user's permission to use the computing instance type; match the computing instance type based on the computing power demand predicted by the historical computing power consumption data of the application requested by the user, and allocate the user's connection request to the computing instance of the corresponding type; wherein the matched computing instance type does not exceed the computing instance type allowed for use;
[0019] Continuously monitor the resources consumed by applications in user sessions and dynamically adjust computing resources based on the monitoring results.
[0020] In the embodiment of the present disclosure, the type of computing instance is divided according to the computing power of the computing instance, so as to predict the computing power demand according to the historical computing power consumption data of the application requested by the user and the application, match the computing instance type, and the matched computing instance type shall not exceed the computing instance type allowed to be used. When the user's request is allocated to the computing instance of this type, the resources that the user can use will not exceed the maximum user resource usage limited by this type, so as to avoid the situation that a single user occupies resources, reasonably allocate computing power resources, ensure the user's experience, and reduce the impact on other users. For user behavior analysis and prediction, scientific predictions are formed based on continuous observation of user usage habits, so that performance and economy can be taken into account when allocating computing power resources to users. In the embodiment of the present disclosure, the resources consumed by the application in the user session are continuously monitored, and the computing power resources are dynamically adjusted according to the monitoring results, so as to improve the utilization efficiency of resources. The embodiment of the present disclosure solves the technical problem of unreasonable allocation of computing resources in the design of cloud scenarios in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present application. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:
[0022] Figure 1 It is a hardware structure block diagram of a computing device used to implement the computing power resource scheduling method disclosed in the present invention;
[0023] Figure 2 It is a system structure diagram for implementing the computing power resource scheduling method disclosed in the present invention;
[0024] Figure 3 It is a flowchart of a public computing resource scheduling method;
[0025] Figure 4 It is a flowchart of the computing power expansion and contraction method disclosed in the present invention;
[0026] Figure 5 It is a flowchart of a method for predicting computing power demand based on historical computing power consumption data disclosed in the present invention;
[0027] Figure 6 is a schematic diagram of a computing power resource scheduling device according to the present disclosure;
[0028] Figure 7 It is a schematic diagram of another computing resource scheduling device according to the present disclosure. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only embodiments of a part of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present disclosure.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0031] In view of the problem of unreasonable allocation of computing power resources in the prior art, the present invention provides a computing power resource scheduling method, device and storage medium. In the present invention, the types of computing instances are divided according to the computing power of the computing instances, and the use rights of the computing instance types by the users are used to pre-check whether there are available resources, and the computing power resources are allocated according to the use rights of the users. Then, the computing instance type is matched according to the computing power demand predicted by the historical computing power consumption data of the application requested by the user. The user session is allocated to the preset computing instance type, and the user starts to use it. At the same time, the resources consumed by the specified application in the user session are continuously monitored, and the computing power resources are dynamically adjusted according to the monitoring results. Through the method of the present invention, the rationality of resource allocation is improved, and the utilization efficiency of computing power resources during use is also improved.
[0032] Example 1
[0033] According to this embodiment, a computing resource scheduling method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0034] The method embodiment provided in this embodiment can be executed in a mobile terminal, a computer terminal, a server or a similar computing device. Figure 1FIG. 1 shows a hardware structure block diagram of a computing device for implementing a computing resource scheduling method. Figure 1 As shown, the computing device may include one or more processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory for storing data, a transmission device for communication functions, and an input / output interface. The memory, the transmission device, and the input / output interface are connected to the processor via a bus. In addition, it may also include: a display, a keyboard, and a cursor control device connected to the input / output interface. A person skilled in the art can understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0035] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computing device. As involved in the embodiments of the present disclosure, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0036] The memory can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the computing power resource scheduling method in the embodiment of the present disclosure. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, the computing power resource scheduling method of the above-mentioned application is realized. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the computing device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0037] The transmission device is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computing device. In one example, the transmission device includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0038] The display may be, for example, a touch screen liquid crystal display (LCD) that may enable a user to interact with a user interface of the computing device.
[0039] It should be noted that, in some optional embodiments, the above Figure 1 The computing device shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware elements and software elements. Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computing devices described above.
[0040] Figure 2 Schematic diagram of a system according to the computing resource scheduling method described in this embodiment. Figure 2 As shown, the system includes: a user device 100, a computing cluster 200 and a time series database 300. The user device 100 is connected to the computing cluster via a network, and the computing cluster 200 is connected to the time series database 300 via a network.
[0041] In the above operating environment, according to the first aspect of this embodiment, a computing resource scheduling method is provided. Figure 2 The system implementation shown in . Figure 3 A schematic diagram showing the process of the method is shown in FIG. Figure 3 As shown, the method includes:
[0042] S302: Classify the computing instances according to their computing capabilities; wherein the computing capabilities include one or a combination of the following: the number of central processing units (CPUs), the number of memories, the number of graphics processing units (GPUs), and the number of video memories; and different types of computing instances have different maximum numbers of users allowed to be connected and different maximum resource usages for each user;
[0043] S304: When a user initiates a connection request, determine the user's permission to use the computing instance type; match the computing instance type according to the computing power demand predicted by the historical computing power consumption data of the application program requested by the user, and allocate the user's connection request to the computing instance of the corresponding type; wherein the matched computing instance type does not exceed the computing instance type allowed for use;
[0044] S306: Continuously monitor the resources consumed by the application in the user session, and dynamically adjust the computing resources according to the monitoring results.
[0045] In the present invention, the types of computing instances are divided according to the computing capabilities of the computing instances. Then, the computing instance types are matched according to the computing power requirements predicted by the historical computing power consumption data of the application program requested by the user. The user session is assigned to a preset computing instance type, and the assigned computing instance type does not exceed the computing instance type allowed for use. After the user starts using it, the resources that the user can use will not exceed the user's maximum resource usage limited by the type, and then the resources consumed by the application program in the user session are continuously monitored, and the computing power resources are dynamically adjusted according to the monitoring results. Through the method of the present invention, the rationality of resource allocation is improved, the situation of a single user grabbing resources is avoided, and the utilization efficiency of computing power resources during use is also improved.
[0046] Optionally, in S302 of this embodiment, the types of computing instances are divided according to computing capabilities of the computing instances, including:
[0047] According to the computing power of the computing instance, it is divided into ultra-light computing instances, lightweight computing instances, standard computing instances, advanced computing instances or exclusive computing instances with decreasing maximum number of users allowed to connect and increasing maximum resource usage per user.
[0048] In step S302, computing instances are divided into different types according to their computing capabilities. The computing instance types are divided into: ultra-light computing instances, lightweight computing instances, standard computing instances, advanced computing instances, and exclusive computing instances, which correspond to different maximum session numbers and computing resource limits.
[0049] Optionally, the ultra-light computing instance, lightweight computing instance, standard computing instance, advanced computing instance, and exclusive computing instance include:
[0050] The ultra-lightweight computing instance includes N1 CPUs, M1 memory, L1 GPUs, and X1 video memory.
[0051] The lightweight computing instance includes N2 CPUs, M2 memory, L2 GPUs, and X2 video memory.
[0052] The standard computing instance includes N3 CPUs, M3 memory, L3 GPUs, and X3 video memory.
[0053] Advanced computing instances include N4 CPUs, M4 memory, L4 GPUs, and X4 video memory.
[0054] The exclusive computing instance includes N5 CPUs, M5 memory, L5 GPUs, and X5 video memory.
[0055] Among them, N5 is greater than or equal to N4, N4 is greater than or equal to N3, N3 is greater than or equal to N2, and N2 is greater than or equal to N1; M5 is greater than or equal to M4, M4 is greater than or equal to M3, M3 is greater than or equal to M2, and M2 is greater than or equal to M1; L5 is greater than or equal to L4, L4 is greater than or equal to L3, L3 is greater than or equal to L2, and L2 is greater than or equal to L1; X5 is greater than or equal to X4, X4 is greater than or equal to X3, X3 is greater than or equal to X2, and X2 is greater than or equal to X1.
[0056] As an optional example, the resources of each computing instance type are as follows in Table 1:
[0057] Table 1: Example table of compute instance types
[0058]
[0059] In Table 1 above, ultra-light computing instances, lightweight computing instances, standard computing instances, advanced computing instances, and exclusive computing instances include:
[0060] The maximum number of users allowed for ultra-light computing instances, lightweight computing instances, standard computing instances, advanced computing instances, and exclusive computing instances are 32, 16, 8, 4, and 1, respectively;
[0061] The maximum number of CPUs allowed for each user in ultra-light computing instances, lightweight computing instances, standard computing instances, advanced computing instances, and exclusive computing instances is 0.5, 1, 2, 8, and 32, respectively;
[0062] The maximum amount of memory allowed for each user in ultra-light computing instances, lightweight computing instances, standard computing instances, advanced computing instances, and exclusive computing instances is 2 GB, 4 GB, 8 GB, 32 GB, and 128 GB, respectively;
[0063] The maximum video memory allowed for each user in ultra-light computing instances and lightweight computing instances is 0.25 GB and 0.5 GB respectively.
[0064] Optionally, in this embodiment, the calculation instance may include the following rules:
[0065] (1) Each computing instance forms a cluster, and the computing instance resources in the cluster are the same.
[0066] (2) The ultra-light type allows a maximum of N users to connect simultaneously, and each user can use a maximum of 0.5 CPU and 1 GB of memory. N can be pre-set according to demand, for example, 32.
[0067] (3) An exclusive computing instance only allows one user to connect, and the one user can use all the computing resources of the computing instance.
[0068] (4) The user needs to be pre-authorized with the highest computing instance type that he or she can use. The system administrator authorizes the user with the highest computing instance type based on the user's level.
[0069] (5) When a user connects for the first time, if the compute instance type authorized for use is less than or equal to the standard compute instance type, the user will be assigned a standard compute instance type based on the principle of the higher of the two.
[0070] (6) After the user disconnects the session, the resources used by the user in the computing instance will be released.
[0071] (7) When scaling up or down, at least one computing instance must be retained for each computing instance cluster.
[0072] In this step, by dividing the computing instance types, it is possible to reasonably allocate computing resources according to user needs, ensure the user experience, and reduce the impact on other users.
[0073] Optionally, in S304 of this embodiment, when the user initiates a connection request, predicting the computing power demand according to the historical computing power consumption data of the application program requested by the user includes:
[0074] Continuously obtain CPU, memory, and GPU resource data related to the historical computing power consumption of applications used in user sessions and store them in a time series database;
[0075] After preprocessing and denoising the data in the time series database, the trend of users' use of computing resources is analyzed and predicted through time series prediction-related algorithms, and the results of the predicted trends are synchronized to the control center.
[0076] For example, after a user has used the service once, it is predicted that the user's next use will require 1.5 CPUs and 6 GB of memory, which is exactly within the maximum resource range available to each user of a standard computing instance. The maximum resource the user is authorized to use is a standard computing instance. In this case, the resources on the standard computing instance will be allocated the next time the user connects.
[0077] For another example, if it is predicted that the user will need to consume 1 CPU and 12 GB of memory next time, the higher value is used to judge that the user needs to use a premium computing instance, but the maximum resource the user is authorized to use is a standard computing instance, so only a standard computing instance can be allocated. If the maximum resource the user is authorized to use is an exclusive computing instance, a premium computing instance will be allocated to the user next time.
[0078] Example 1: When a user initiates a connection request, determine the user's permission to use the computing instance type; match the computing instance type based on the computing power demand predicted by the historical computing power consumption data of the application requested by the user, and assign the user's connection request to the computing instance of the corresponding type. Figure 5 As shown:
[0079] S502: User connection request: A user who intends to use the application initiates a connection request.
[0080] S504: Obtain the user's available resource strategy and allocate resources.
[0081] In this step, the user's permission to use the computing instance type is determined, and based on the user's permission to use the computing instance type, it is pre-checked whether there are available resources. The computing instance type is matched based on the computing power demand predicted by the historical computing power consumption data of the application requested by the user, and the computing instance type does not exceed the computing instance type allowed to be used. For example, if a user is allowed to use a maximum of advanced computing instances, according to the principle of downward allocation, the user can be allocated to a computing instance with performance equal to or lower than that of an advanced computing instance, that is, the user can be allocated four types of computing instances: ultra-light computing instances, lightweight computing instances, standard computing instances, and advanced computing instances.
[0082] Obtain the computing power demand forecast result of the application requested by the user from the control center. The forecast result is predicted based on the historical computing power consumption data. Match the computing instance type based on the forecast result. For example, the user requests to use a certain mapping application, and the user is allowed to use no more than the standard computing instance. The historical resource consumption forecast result of the mapping application obtained from the control center shows that the computing power consumption is a lightweight computing instance. In this case, it is best to allocate a lightweight computing instance to the user's current usage request. For another example, the user requests to use a certain 3D drawing application, and the user is allowed to use no more than the standard computing instance. The historical resource consumption forecast result of the 3D drawing application obtained from the control center shows that the computing power consumption is an advanced computing instance. In this case, only a standard computing instance can be allocated to the user.
[0083] As an optional example, when allocating computing resources, factors such as the user's computing resource usage and application program, file type, and file size may also be considered.
[0084] S506: The user connects and starts using the instance. The instance being used will be added to the computing cluster and registered with the control center.
[0085] S508: Session-level performance monitoring: Continuously monitor the resource consumption of the user using the application.
[0086] In this step, session-level performance monitoring includes:
[0087] (1) Install an agent program in the operating system and run it as a service in the background of the operating system.
[0088] (2) After the agent detects that the user session is successfully established, it obtains the CPU and memory usage data of the specified process through the operating system interface in units of n seconds. n is a positive integer and is set in advance according to requirements.
[0089] (3) The acquired monitoring data is transmitted to the time series database.
[0090] S510: Storing session-level performance monitoring data in a time series database.
[0091] Continuously obtain CPU, memory, and GPU resource data related to the historical computing power consumption of applications used in user sessions and store them in a time series database;
[0092] These data will be used as historical data for analyzing and predicting the resource consumption of the application software, and provide prediction results for reference in allocating resources when subsequent users request the application software.
[0093] S512: Trend analysis and forecasting.
[0094] In this step, after preprocessing and denoising the data in the time series database, the trend of users' use of computing resources is analyzed and predicted through time series prediction related algorithms, and the results of the predicted trends are synchronized to the control center.
[0095] Optionally, analyzing and predicting the trend of user computing resource usage through time series prediction related algorithms includes:
[0096] The CPU frequency occupied by the process of using computing resources Indicates the amount of memory used by the process Indicates that and Determined by the following formula:
[0097] ;
[0098] ;
[0099] Where t represents time;
[0100] express The value at time t-1, express The value at time t-2 is, express The value at time t-1, express The value at time t-2;
[0101] yes The constant term, yes Constant term;
[0102] express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2, express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2, express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2, express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2;
[0103] for The error term at time t is for The error term at time t.
[0104] The matrix expression behavior of the above time series prediction related algorithms is:
[0105] The p-order matrix form of k time series variables can be expressed as
[0106] ;
[0107] in: is a vector containing k time series variables. For example, the CPU frequency occupied by the above process is expressed as Indicates the amount of memory used by the process When indicating, for:
[0108] ;
[0109] C is a vector containing constant terms:
[0110] ;
[0111] and yes The coefficient matrix represents the coefficients of lag 1 and lag 2, for example:
[0112] ;
[0113] ;
[0114] is a vector containing the value of the variable at time t-1, for example:
[0115] ;
[0116] is a vector containing the value of the variable at time t-2, for example:
[0117] ;
[0118] is a vector containing error terms, assuming that these error terms are white noise and are independent and identically distributed, for example, ;
[0119] Optionally, in S306 of this embodiment, continuously monitoring resources consumed by applications in user sessions, and dynamically adjusting computing resources according to monitoring results includes:
[0120] If the performance of computing resources is insufficient, the computing cluster is expanded; if the performance of computing resources is excessive, the computing cluster is reduced.
[0121] Optionally, if the performance of computing resources is insufficient, the computing cluster capacity expansion includes:
[0122] Computing cluster expansion includes computing power expansion and user session maintenance expansion;
[0123] The capacity expansion in the computing power dimension includes: continuously monitoring the CPU, GPU, and memory resource usage of the computing instance cluster. If the usage of any of the CPU, GPU, and memory resources in the cluster exceeds the first threshold for a unit time n, one computing instance is added. After adding one computing instance, the cluster enters a silent period p, and no new capacity expansion operations are performed during the silent period of the cluster.
[0124] User session maintenance and expansion includes: continuously monitoring the number of user sessions on the computing instance cluster. If the cluster average session number indicator exceeds the first threshold of the total amount for a unit time n, then one computing instance is added. After one computing instance is added, the cluster enters a silent period p, during which no new expansion operations are performed;
[0125] The first threshold is m percent, where m is a number greater than or equal to 0 and less than or equal to 100;
[0126] n is the length of time;
[0127] p is the length of the silent period;
[0128] Among them, m, n, and p are defined by the system administrator.
[0129] As an optional example, for computing power expansion, define m as 60, n as 5 minutes, and p as 5 minutes. If the CPU usage exceeds 60% of the total CPU of the cluster for 5 minutes, one computing instance is added and the cluster enters a 5-minute silent period. No new expansion operations are performed during the silent period.
[0130] As an optional example, for user session maintenance expansion, for example: define m as 60, n as 5 minutes, and p as 5 minutes. If the memory usage exceeds 60% of the total cluster memory for 5 minutes, one computing instance is added and the cluster enters a 5-minute silent period. No new expansion operations are performed during the silent period.
[0131] Optionally, add a compute instance including:
[0132] Start the compute instance;
[0133] Start the agent program, which reports the status to the control center and adds the computing instance to a specific type of computing cluster;
[0134] The computing clusters include ultra-light computing clusters, lightweight computing clusters, standard computing clusters, advanced computing clusters and exclusive computing clusters.
[0135] Optionally, if the computing power resources have excess performance, scaling down the computing cluster includes:
[0136] Computing cluster scaling includes scaling down in computing power and maintaining user sessions.
[0137] Scaling down in computing power includes: continuously monitoring the CPU, GPU, and memory resource usage indicators of the computing instance cluster. If the highest value of the average value of any of the CPU, GPU, and memory resource indicators is lower than the first threshold of the total cluster resource for a unit time n, the elastic scaling function will release a computing instance with no user session, and the cluster will enter a silent period p. No new scaling down operations will be performed during the silent period.
[0138] User session maintenance and scaling down includes: continuously monitoring the number of user sessions on the computing instance. If the number of sessions in a single computing instance is 0 for a unit time n, and the highest value of the CPU, GPU, and memory resource usage of the computing instance cluster does not exceed the first threshold of the total amount, then the computing instance is released and the cluster enters a silent period p. No new scaling down operations are performed during the cluster silent period.
[0139] The first threshold is m percent, where m is a number greater than or equal to 0 and less than or equal to 100;
[0140] n is the length of time;
[0141] p is the length of the silent period;
[0142] Among them, m, n, and p are defined by the system administrator.
[0143] As an optional example, for scaling down in the computing power dimension, define m as 20, n as 10 minutes, and p as 5 minutes. For example, within 10 minutes, the average CPU usage is 10% of the total cluster, the average memory usage is 18% of the total cluster, and the average GPU usage is 5% of the total cluster. The highest memory usage of 18% is taken, which is lower than the threshold of 20%. In this case, the elastic scaling function releases one computing instance with no user session, and the cluster enters a 5-minute silent period. No new scaling down operations are performed during the silent period.
[0144] As an optional example, user session maintenance scaling down is as follows: define m as 20, n as 10 minutes, and p as 5 minutes. If within 10 minutes, the number of user sessions of a computing instance remains at 0, and the average CPU usage is 10% of the total cluster, the memory usage is 18% of the total cluster, and the GPU usage is 5% of the total cluster. The highest memory usage is 18%, which is lower than the threshold of 20%. In this case, the elastic scaling function is used to release the specific computing instance with no user session, and the cluster enters a 5-minute silent period. No new scaling down operation will be performed during the cluster silent period.
[0145] Optionally, releasing the computing instance includes:
[0146] The agent reports the status to the control center;
[0147] Destroys the compute instance.
[0148] Example 2: Continuously monitor the resources consumed by applications in user sessions and dynamically adjust computing resources based on the monitoring results. Figure 4 As shown:
[0149] S402: Performance monitoring. Continuously monitor the CPU, GPU, and memory resource usage indicators of the computing instance cluster.
[0150] S404: Determine whether the performance is insufficient or excessive. If the performance is insufficient, execute S406; if the performance is excessive, execute S410.
[0151] In this step, the method for judging insufficient performance may be insufficient performance in the computing power dimension and / or too many user sessions. Insufficient performance in the computing power dimension may be continuous monitoring of the CPU, GPU, and memory resource usage of the computing instance cluster, and the usage of any one of the CPU, GPU, and memory resources in the cluster exceeds the first threshold for a unit time n. Too many user sessions may be: continuous monitoring of the number of user sessions on the computing instance cluster, and the average number of cluster sessions exceeds the first threshold of the total for a unit time n. The first threshold is m percent, where m is a number greater than or equal to 0 and less than or equal to 100, and n is the length of time.
[0152] In this step, the method for judging excess performance may be excess performance in the computing power dimension and / or too few user sessions. Among them, excess performance in the computing power dimension may be continuous monitoring of the CPU, GPU, and memory resource usage indicators of the computing instance cluster, if the highest value of the average value of any one of the CPU, GPU, and memory resources is lower than the first threshold of the total cluster resources for a unit time n. Too few user sessions may be continuous monitoring of the number of user sessions on the computing instance, the number of sessions in a single computing instance is 0 for a unit time n, and the highest value of the CPU, GPU, and memory resource usage of the computing instance cluster does not exceed the first threshold of the total. The first threshold is m percent, where m is a number greater than or equal to 0 and less than or equal to 100, and n is the length of time.
[0153] S406: Start the computing instance. In this step, the above step S404 determines that the performance is insufficient, and the computing instance needs to be started to expand the performance.
[0154] S408: The agent program starts. The agent program reports the status to the control center and adds the computing instance to a specific type of computing cluster.
[0155] In this step, the types of computing instances added include ultra-light computing instances, lightweight computing instances, standard computing instances, advanced computing instances, and exclusive computing instances. The resource distribution of each instance can be seen in Table 1 and will not be repeated here.
[0156] S410: If the performance is excessive, the instance needs to be destroyed and the agent program reports the status. In this step, if the performance is excessive and performance scaling is required in the above step S404, the instance needs to be destroyed. The agent program reports the status of the instance to the control center.
[0157] S412: Destroy the computing instance.
[0158] According to the computing power resource scheduling method of the first aspect of this embodiment, by dividing the computing instance types, it is possible to reasonably allocate computing power resources according to user needs, so that the user experience can be guaranteed and the impact on other users can be reduced. Through user behavior analysis and prediction, based on continuous observation of user usage habits, the computing power demand is predicted according to the historical computing power consumption data of the application requested by the user, the computing instance type is matched, and the relationship between the user's computing power resource usage and factors such as the application, file type, and file size is obtained to form a prediction result, which can well balance performance and economy when allocating computing power resources to users. In the computing power resource scheduling method of this embodiment, the resources consumed by the application in the user session are continuously monitored, and the computing power resources are dynamically adjusted according to the monitoring results. When the performance is insufficient, a new instance is started, and when the performance is excessive, the instance is destroyed, thereby improving the utilization of resources. The computing power resource scheduling method of this embodiment improves the rationality of resource allocation.
[0159] Based on the same inventive concept, according to the second aspect of this embodiment, a storage medium is provided, wherein the storage medium includes a stored program, wherein when the program is run, a processor executes any one of the above computing resource scheduling methods.
[0160] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0161] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0162] Example 2
[0163] Figure 6 FIG. 6 shows a computing resource scheduling device 600 according to this embodiment, which corresponds to the method described in the first aspect of Embodiment 1. Figure 6 As shown, the device 600 includes:
[0164] The partitioning module 610 is configured to partition the types of computing instances according to the computing capabilities of the computing instances; wherein the computing capabilities include one or a combination of the following: the number of central processing units (CPUs), the number of memories, the number of graphics processing units (GPUs), and the number of video memories; and different types of computing instances have different maximum numbers of users allowed to be connected and different maximum resource usages for each user;
[0165] Prediction module 620, when a user initiates a connection request, determines the user's permission to use the computing instance type; matches the computing instance type according to the computing power demand predicted by the historical computing power consumption data of the application program requested by the user, and allocates the user's connection request to the computing instance of the corresponding type; wherein the matched computing instance type does not exceed the computing instance type allowed for use;
[0166] The monitoring module 630 continuously monitors the resources consumed by the application in the user session and dynamically adjusts the computing resources according to the monitoring results.
[0167] Optionally, the partitioning module 610 is further configured to:
[0168] According to the computing power of the computing instance, it is divided into ultra-light computing instances, lightweight computing instances, standard computing instances, advanced computing instances or exclusive computing instances with decreasing maximum number of users allowed to connect and increasing maximum resource usage per user.
[0169] Optionally, the maximum number of users allowed for the ultra-light computing instance, lightweight computing instance, standard computing instance, advanced computing instance, and exclusive computing instance are 32, 16, 8, 4, and 1, respectively;
[0170] The maximum number of CPUs allowed for each user in ultra-light computing instances, lightweight computing instances, standard computing instances, advanced computing instances, and exclusive computing instances is 0.5, 1, 2, 8, and 32, respectively;
[0171] The maximum amount of memory allowed for each user in ultra-light computing instances, lightweight computing instances, standard computing instances, advanced computing instances, and exclusive computing instances is 2 GB, 4 GB, 8 GB, 32 GB, and 128 GB, respectively;
[0172] The maximum video memory allowed for each user in ultra-light computing instances and lightweight computing instances is 0.25 GB and 0.5 GB respectively.
[0173] Optionally, the prediction module 620 is further configured to:
[0174] Continuously obtain CPU, memory, and GPU resource data related to the historical computing power consumption of applications used in user sessions and store them in a time series database;
[0175] After preprocessing and denoising the data in the time series database, the trend of users' use of computing resources is analyzed and predicted through time series prediction-related algorithms, and the results of the predicted trends are synchronized to the control center.
[0176] For example, after a user has used the service once, it is predicted that the user's next use will require 1.5 CPUs and 6 GB of memory, which is exactly within the maximum resource range available to each user of a standard computing instance. The maximum resource the user is authorized to use is a standard computing instance. In this case, the resources on the standard computing instance will be allocated the next time the user connects.
[0177] For another example, if it is predicted that the user will need to consume 1 CPU and 12 GB of memory next time, the higher value is used to judge that the user needs to use a premium computing instance, but the maximum resource the user is authorized to use is a standard computing instance, so only a standard computing instance can be allocated. If the maximum resource the user is authorized to use is an exclusive computing instance, a premium computing instance will be allocated to the user next time.
[0178] Optionally, analyzing and predicting the trend of user computing resource usage through time series prediction related algorithms includes:
[0179] The CPU frequency occupied by the process of using computing resources Indicates the amount of memory used by the process Indicates that and Determined by the following formula:
[0180] ;
[0181] ;
[0182] Where t represents time;
[0183] express The value at time t-1, express The value at time t-2 is, express The value at time t-1, express The value at time t-2;
[0184] yes The constant term, yes Constant term;
[0185] express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2, express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2, express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2, express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2;
[0186] for The error term at time t is for The error term at time t.
[0187] Optionally, the monitoring module 630 is further configured to:
[0188] If the performance of computing resources is insufficient, the computing cluster is expanded; if the performance of computing resources is excessive, the computing cluster is reduced.
[0189] Optionally, if the performance of computing resources is insufficient, the computing cluster capacity expansion includes:
[0190] Computing cluster expansion includes computing power expansion and user session maintenance expansion;
[0191] Computing capacity expansion includes: continuously monitoring the CPU, GPU, and memory resource usage of the computing instance cluster. If the CPU, GPU, and memory resource usage in the cluster exceeds the first threshold for a unit time n, one computing instance is added. After one computing instance is added, the cluster enters a silent period p, during which no new capacity expansion operations are performed.
[0192] User session maintenance and expansion includes: continuously monitoring the number of user sessions on the computing instance cluster. If the cluster average session number indicator exceeds the first threshold of the total amount for a unit time n, then one computing instance is added. After one computing instance is added, the cluster enters a silent period p, during which no new expansion operations are performed;
[0193] The first threshold is m percent, where m is a number greater than or equal to 0 and less than or equal to 100;
[0194] n is the length of time;
[0195] p is the length of the silent period;
[0196] Among them, m, n, and p are defined by the system administrator.
[0197] Specifically, adding a calculation instance includes:
[0198] Start the compute instance;
[0199] Start the agent program, which reports the status to the control center and adds the computing instance to a specific type of computing cluster;
[0200] The computing clusters include ultra-light computing clusters, lightweight computing clusters, standard computing clusters, advanced computing clusters and exclusive computing clusters.
[0201] Optionally, if the computing power resources have excess performance, the computing cluster can be scaled down, including:
[0202] Computing cluster scaling includes scaling down in computing power and maintaining user sessions.
[0203] Scaling down in computing power includes: continuously monitoring the CPU, GPU, and memory resource usage indicators of the computing instance cluster. If the highest value of the average value of any of the CPU, GPU, and memory resource indicators is lower than the first threshold of the total cluster resource for a unit time n, the elastic scaling function will release a computing instance with no user session, and the cluster will enter a silent period p. No new scaling down operations will be performed during the silent period.
[0204] User session maintenance and scaling down includes: continuously monitoring the number of user sessions on the computing instance. If the number of sessions in a single computing instance is 0 for a unit time n, and the highest value of the CPU, GPU, and memory resource usage of the computing instance cluster does not exceed the first threshold of the total amount, then the computing instance is released and the cluster enters a silent period p. No new scaling down operations are performed during the cluster silent period.
[0205] The first threshold is m percent, where m is a number greater than or equal to 0 and less than or equal to 100;
[0206] n is the length of time;
[0207] p is the length of the silent period;
[0208] Among them, m, n, and p are defined by the system administrator.
[0209] Specifically, releasing this computing instance includes:
[0210] The agent reports the status to the control center;
[0211] Destroys the compute instance.
[0212] According to the computing power resource scheduling device of this embodiment, by dividing the computing instance types, it is possible to reasonably allocate computing power resources according to user needs, which can ensure the user experience and reduce the impact on other users. Through user behavior analysis and prediction, based on the continuous observation of user usage habits, the computing power demand is predicted according to the historical computing power consumption data of the application requested by the user, the computing instance type is matched, and the relationship between the user's computing power resource usage and factors such as the application, file type, and file size is obtained to form a prediction result, which can well balance performance and economy when allocating computing power resources to users. In the computing power resource scheduling method of this embodiment, the resources consumed by the application in the user session are continuously monitored, and the computing power resources are dynamically adjusted according to the monitoring results. When the performance is insufficient, a new instance is started, and when the performance is excessive, the instance is destroyed, thereby improving the utilization of resources. The computing power resource scheduling method of this embodiment improves the rationality of resource allocation.
[0213] It should be noted that the computing power resource scheduling device provided in this embodiment can implement all the computing power resource scheduling methods of the above-mentioned embodiment 1, solve the same technical problems, and achieve the same technical effects, and the similarities will not be repeated here.
[0214] Example 3
[0215] Figure 7 FIG. 7 shows a computing resource scheduling device 700 according to this embodiment, which corresponds to the computing resource scheduling method according to the first aspect of Embodiment 1. Figure 7 As shown, the device 700 includes:
[0216] Processor 710; and
[0217] The memory 720 is connected to the processor 710 and is used to provide the processor 710 with instructions for processing the following processing steps:
[0218] The types of computing instances are divided according to the computing capabilities of the computing instances; wherein the computing capabilities include one or a combination of the following: the number of central processing units (CPUs), the number of memories, the number of graphics processing units (GPUs), and the number of video memories; and different types of computing instances have different maximum numbers of users allowed to connect and the maximum resource usage of each user;
[0219] When a user initiates a connection request, determine the user's permission to use the computing instance type; match the computing instance type based on the computing power demand predicted by the historical computing power consumption data of the application requested by the user, and allocate the user's connection request to the computing instance of the corresponding type; wherein the matched computing instance type does not exceed the computing instance type allowed for use;
[0220] Continuously monitor the resources consumed by applications in user sessions and dynamically adjust computing resources based on the monitoring results.
[0221] Optionally, the types of computing instances classified according to computing capabilities of the computing instances include:
[0222] According to the computing power of the computing instance, it is divided into ultra-light computing instances, lightweight computing instances, standard computing instances, advanced computing instances or exclusive computing instances with decreasing maximum number of users allowed to connect and increasing maximum resource usage per user.
[0223] Optionally, the maximum number of users allowed for the ultra-light computing instance, lightweight computing instance, standard computing instance, advanced computing instance, and exclusive computing instance are 32, 16, 8, 4, and 1, respectively;
[0224] The maximum number of CPUs allowed for each user in ultra-light computing instances, lightweight computing instances, standard computing instances, advanced computing instances, and exclusive computing instances is 0.5, 1, 2, 8, and 32, respectively;
[0225] The maximum amount of memory allowed for each user in ultra-light computing instances, lightweight computing instances, standard computing instances, advanced computing instances, and exclusive computing instances is 2 GB, 4 GB, 8 GB, 32 GB, and 128 GB, respectively;
[0226] The maximum video memory allowed for each user in ultra-light computing instances and lightweight computing instances is 0.25 GB and 0.5 GB respectively.
[0227] Optionally, when a user initiates a connection request, the computing power demand is predicted based on the historical computing power consumption data of the application program requested by the user, including:
[0228] Continuously obtain CPU, memory, and GPU resource data related to the historical computing power consumption of applications used in user sessions and store them in a time series database;
[0229] After preprocessing and denoising the data in the time series database, the trend of users' use of computing resources is analyzed and predicted through time series prediction-related algorithms, and the results of the predicted trends are synchronized to the control center.
[0230] For example, after a user has used the service once, it is predicted that the user's next use will require 1.5 CPUs and 6 GB of memory, which is exactly within the maximum resource range available to each user of a standard computing instance. The maximum resource the user is authorized to use is a standard computing instance. In this case, the resources on the standard computing instance will be allocated the next time the user connects.
[0231] For another example, if it is predicted that the user will need to consume 1 CPU and 12 GB of memory next time, the higher value is used to judge that the user needs to use a premium computing instance, but the maximum resource the user is authorized to use is a standard computing instance, so only a standard computing instance can be allocated. If the maximum resource the user is authorized to use is an exclusive computing instance, a premium computing instance will be allocated to the user next time.
[0232] Optionally, the computing power demand is predicted based on the historical computing power consumption data of the application program requested by the user, and the matching computing instance types include:
[0233] Determine the user's usage rights for the compute instance type;
[0234] The computing power demand is predicted based on the historical computing power consumption data of the application requested by the user, and the computing instance type is matched. The computing instance type does not exceed the computing instance type allowed for use.
[0235] Optionally, analyzing and predicting the trend of user computing resource usage through time series prediction related algorithms includes:
[0236] The CPU frequency occupied by the process of using computing resources Indicates the amount of memory used by the process Indicates that and Determined by the following formula:
[0237] ;
[0238] ;
[0239] Where t represents time;
[0240] express The value at time t-1, express The value at time t-2 is, express The value at time t-1, express The value at time t-2;
[0241] yes The constant term, yes Constant term;
[0242] express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2, express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2, express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2, express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2;
[0243] for The error term at time t is for The error term at time t.
[0244] Optionally, monitoring the computing resources used by the user and dynamically adjusting the computing resources according to the type of computing instance and the predicted trend includes:
[0245] If the performance of computing resources is insufficient, the computing cluster is expanded; if the performance of computing resources is excessive, the computing cluster is reduced.
[0246] Optionally, if the performance of computing resources is insufficient, the computing cluster capacity expansion includes:
[0247] Computing cluster expansion includes computing power expansion and user session maintenance expansion;
[0248] Computing capacity expansion includes: continuously monitoring the CPU, GPU, and memory resource usage of the computing instance cluster. If the CPU, GPU, and memory resource usage in the cluster exceeds the first threshold for a unit time n, one computing instance is added. After one computing instance is added, the cluster enters a silent period p, during which no new capacity expansion operations are performed.
[0249] User session maintenance and expansion includes: continuously monitoring the number of user sessions on the computing instance cluster. If the cluster average session number indicator exceeds the first threshold of the total amount for a unit time n, then one computing instance is added. After one computing instance is added, the cluster enters a silent period p, during which no new expansion operations are performed;
[0250] The first threshold is m percent, where m is a number greater than or equal to 0 and less than or equal to 100;
[0251] n is the length of time;
[0252] p is the length of the silent period;
[0253] Among them, m, n, and p are defined by the system administrator.
[0254] Specifically, adding a calculation instance includes:
[0255] Start the compute instance;
[0256] Starting an agent program, which reports the status to the control center and adds the computing instance to a computing cluster of a specific type;
[0257] The computing clusters include ultra-light computing clusters, lightweight computing clusters, standard computing clusters, advanced computing clusters and exclusive computing clusters.
[0258] Optionally, if the computing power resources have excess performance, scaling down the computing cluster includes:
[0259] Computing cluster scaling includes scaling down in computing power and maintaining user sessions.
[0260] Scaling down in computing power includes: continuously monitoring the CPU, GPU, and memory resource usage indicators of the computing instance cluster. If the highest value of the average value of any of the CPU, GPU, and memory resource indicators is lower than the first threshold of the total cluster resource for a unit time n, the elastic scaling function will release a computing instance with no user session, and the cluster will enter a silent period p. No new scaling down operations will be performed during the silent period.
[0261] User session maintenance and scaling down includes: continuously monitoring the number of user sessions on the computing instance. If the number of sessions in a single computing instance is 0 for a unit time n, and the highest value of the CPU, GPU, and memory resource usage of the computing instance cluster does not exceed the first threshold of the total amount, then the computing instance is released and the cluster enters a silent period p. No new scaling down operations are performed during the cluster silent period.
[0262] The first threshold is m percent, where m is a number greater than or equal to 0 and less than or equal to 100;
[0263] n is the length of time;
[0264] p is the length of the silent period;
[0265] Among them, m, n, and p are defined by the system administrator.
[0266] Specifically, releasing this computing instance includes:
[0267] The agent reports the status to the control center;
[0268] Destroys the compute instance.
[0269] According to the computing power resource scheduling device of this embodiment, by dividing the computing instance types, it is possible to reasonably allocate computing power resources according to user needs, which can ensure the user experience and reduce the impact on other users. Through user behavior analysis and prediction, based on the continuous observation of user usage habits, the computing power demand is predicted according to the historical computing power consumption data of the application requested by the user, the computing instance type is matched, and the relationship between the user's computing power resource usage and factors such as the application, file type, and file size is obtained to form a prediction result, which can well balance performance and economy when allocating computing power resources to users. In the computing power resource scheduling method of this embodiment, the resources consumed by the application in the user session are continuously monitored, and the computing power resources are dynamically adjusted according to the monitoring results. When the performance is insufficient, a new instance is started, and when the performance is excessive, the instance is destroyed, thereby improving the utilization of resources. The computing power resource scheduling method of this embodiment improves the rationality of resource allocation.
[0270] It should be noted that the computing power resource scheduling device provided in this embodiment can implement all the computing power resource scheduling methods of the above-mentioned embodiment 1, solve the same technical problems, and achieve the same technical effects, and the similarities will not be repeated here.
[0271] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0272] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0273] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0274] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0275] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0276] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.
[0277] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A computing resource scheduling method, characterized in that: include: The types of computing instances are divided according to the computing capabilities of the computing instances; wherein the computing capabilities include one or a combination of the following: the number of central processing units (CPUs), the number of memories, the number of graphics processing units (GPUs), and the number of video memories; and different types of computing instances have different maximum numbers of users allowed to connect and the maximum resource usage of each user; When a user initiates a connection request, determine the user's permission to use the computing instance type; match the computing instance type based on the computing power demand predicted by the historical computing power consumption data of the application requested by the user, and allocate the user's connection request to the computing instance of the corresponding type; wherein the matched computing instance type does not exceed the computing instance type allowed for use; Continuously monitor the resources consumed by applications in user sessions and dynamically adjust computing resources based on the monitoring results; When the user initiates a connection request, predicting the computing power demand based on the historical computing power consumption data of the application program requested by the user includes: Continuously obtain CPU, memory, and GPU resource data related to the historical computing power consumption of applications used in user sessions and store them in a time series database; After preprocessing and denoising the data in the time series database, the trend of user computing resource usage is analyzed and predicted through time series prediction related algorithms, and the results of the prediction trend are synchronized to the control center; The analysis and prediction of the trend of user computing resource usage by time series prediction related algorithms include: The CPU frequency occupied by the process of using computing resources Indicates the amount of memory used by the process Indicates that and Determined by the following formula: ; ; Where t represents time; express The value at time t-1, express The value at time t-2 is, express The value at time t-1, express The value at time t-2; yes The constant term, yes Constant term; express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2, express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2, express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2, express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2; for The error term at time t is, for The error term at time t.
2. The method according to claim 1, characterized in that: The types of computing instances divided according to computing capabilities of the computing instances include: According to the computing power of the computing instance, it is divided into ultra-light computing instances, lightweight computing instances, standard computing instances, advanced computing instances or exclusive computing instances with decreasing maximum number of users allowed to connect and increasing maximum resource usage per user.
3. The method according to claim 1, characterized in that The continuously monitoring the resources consumed by the application in the user session and dynamically adjusting the computing resources according to the monitoring result includes: If the performance of computing resources is insufficient, the computing cluster is expanded; if the performance of computing resources is excessive, the computing cluster is reduced.
4. The method according to claim 3, characterized in that: If the performance of the computing resources is insufficient, the computing cluster expansion includes: The computing cluster expansion includes computing power expansion and user session maintenance expansion; The computing power dimension expansion includes: continuously monitoring the CPU, GPU and memory resource usage of the computing instance cluster, and if the usage of any one of the CPU, GPU and memory resources in the cluster exceeds the first threshold for a unit time n, then one computing instance is added. After one computing instance is added, the cluster enters a silent period p, and no new expansion operation is performed during the silent period of the cluster; The user session maintenance and expansion includes: continuously monitoring the number of user sessions on the computing instance cluster, and if the cluster average session number index exceeds the first threshold of the total amount for a unit time n, then one computing instance is added, and after one computing instance is added, the cluster enters a silent period p, and no new expansion operation is performed during the cluster silent period; The first threshold is m percent, where m is a number greater than or equal to 0 and less than or equal to 100; n is the length of time; p is the length of the silent period; Among them, m, n, and p are defined by the system administrator.
5. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is run, the processor executes the method according to any one of claims 1 to 4.
6. A computing resource scheduling device, characterized in that: include: a partitioning module configured to partition the types of computing instances according to the computing capabilities of the computing instances; wherein the computing capabilities include one or a combination of the following: the number of central processing units (CPUs), the number of memories, the number of graphics processing units (GPUs), and the number of video memories; and different types of computing instances have different maximum numbers of users allowed to be connected and different maximum resource usages for each user; The prediction module determines the user's permission to use the computing instance type when the user initiates a connection request; matches the computing instance type according to the computing power demand predicted by the historical computing power consumption data of the application program requested by the user, and allocates the user's connection request to the computing instance of the corresponding type; wherein the matched computing instance type does not exceed the computing instance type allowed for use; The monitoring module continuously monitors the resources consumed by applications in user sessions and dynamically adjusts computing resources based on the monitoring results; When the user initiates a connection request, predicting the computing power demand based on the historical computing power consumption data of the application program requested by the user includes: Continuously obtain CPU, memory, and GPU resource data related to the historical computing power consumption of applications used in user sessions and store them in a time series database; After preprocessing and denoising the data in the time series database, the trend of user computing resource usage is analyzed and predicted through time series prediction related algorithms, and the results of the prediction trend are synchronized to the control center; The analysis and prediction of the trend of user computing resource usage by time series prediction related algorithms include: The CPU frequency occupied by the process of using computing resources Indicates the amount of memory used by the process Indicates that and Determined by the following formula: ; ; Where t represents time; express The value at time t-1, express The value at time t-2 is, express The value at time t-1, express The value at time t-2; yes The constant term, yes Constant term; express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2, express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2, express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2, express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2; for The error term at time t is, for The error term at time t.
7. A computing resource scheduling device, characterized in that: include: processor; as well as A memory, connected to the processor, configured to provide the processor with instructions for processing the following processing steps: The types of computing instances are divided according to the computing capabilities of the computing instances; wherein the computing capabilities include one or a combination of the following: the number of central processing units (CPUs), the number of memories, the number of graphics processing units (GPUs), and the number of video memories; and different types of computing instances have different maximum numbers of users allowed to connect and the maximum resource usage of each user; When a user initiates a connection request, determine the user's permission to use the computing instance type; match the computing instance type based on the computing power demand predicted by the historical computing power consumption data of the application requested by the user, and allocate the user's connection request to the computing instance of the corresponding type; wherein the matched computing instance type does not exceed the computing instance type allowed for use; Continuously monitor the resources consumed by applications in user sessions and dynamically adjust computing resources based on the monitoring results; When the user initiates a connection request, predicting the computing power demand based on the historical computing power consumption data of the application program requested by the user includes: Continuously obtain CPU, memory, and GPU resource data related to the historical computing power consumption of applications used in user sessions and store them in a time series database; After preprocessing and denoising the data in the time series database, the trend of user computing resource usage is analyzed and predicted through time series prediction related algorithms, and the results of the prediction trend are synchronized to the control center; The analysis and prediction of the trend of user computing resource usage by time series prediction related algorithms include: The CPU frequency occupied by the process of using computing resources Indicates the amount of memory used by the process Indicates that and Determined by the following formula: ; ; Where t represents time; express The value at time t-1, express The value at time t-2 is, express The value at time t-1, express The value at time t-2; yes The constant term, yes Constant term; express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2, express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2, express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2, express At time t The coefficient of influence at time t-1, express At time t The coefficient of influence at time t-2; for The error term at time t is for The error term at time t.
Citation Information
Patent Citations
Resource scheduling system based on load characteristics in industrial cloud environment
CN112905343A
Scheduling method and device for public cloud computing resources, equipment and storage medium
CN114090240A
Computing power resource allocation method and device, equipment, storage medium and product
CN118093183A
Computing force elastic deployment method and meta universe computing force elastic deployment system
CN118170545A