Resource scheduling method and device, equipment, storage medium and program product
By obtaining the storage performance information of the storage system and using the filtering model to select the appropriate target storage node for virtual resource scheduling, the problem of unreasonable virtualized instance scheduling is solved, the resource utilization rate and scheduling efficiency are improved, and the accuracy and efficiency of resource allocation are ensured.
Patent Information
- Application Number
- CN202510381157.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-07-25
AI Technical Summary
The existing virtualized instance scheduling methods have the problem of unreasonable scheduling, which leads to idle nodes with strong storage performance, while nodes with weak storage performance are overloaded and resource allocation is unreasonable, which affects resource utilization and scheduling efficiency.
By obtaining the storage performance information of each storage node in the storage system, based on the storage performance information and resource scheduling requests, the most suitable target storage nodes are selected from the storage system for virtual resource scheduling, and using the screening model for quantitative evaluation and automated selection, ensuring the accuracy and efficiency of resource allocation.
It improves the resource utilization rate of the storage system, avoids the problem of unreasonable resource allocation, improves resource scheduling efficiency, ensures the matching of storage performance with business needs, and reduces the workload of manual intervention and manual operations.
Smart Images

Figure CN120371509A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer virtualization technology, and particularly to a resource scheduling method, apparatus, device, storage medium, and program product. Background Art
[0002] With the continuous increase in the scale and resource requirements of data centers and cloud platforms, the efficient scheduling of resources on cloud platforms has become a crucial technical issue. To meet rapidly changing business needs, cloud platforms need to be able to flexibly and efficiently manage and schedule resources such as computing, storage, and networking. In this process, virtualization technology plays an extremely important role. It enables cloud resources to be quickly provisioned to users through resource abstraction. Specifically, virtualization technology can transform physical hardware resources (such as CPUs, memory, storage, and network bandwidth) into multiple independent virtual resources. These virtual resources can exist in the form of virtual machines and be allocated to different physical nodes according to the specific resource requirements of applications or users. Currently, in the process of virtual resource scheduling, virtualized instances to be scheduled are usually scheduled to physical servers where disks of a specified type are located.
[0003] However, the above virtualized instance scheduling method has the problem of unreasonable scheduling. Summary of the Invention
[0004] Based on this, it is necessary to provide a resource scheduling method, apparatus, device, storage medium, and program product that can achieve reasonable scheduling of virtualized instances for the above technical problems.
[0005] In a first aspect, this application provides a resource scheduling method, which includes:
[0006] When a resource scheduling request is received, obtain the storage performance information of each storage node in the storage system;
[0007] According to the storage performance information of each storage node and the resource scheduling request, screen out the first target storage node from all storage nodes in the storage system;
[0008] Perform virtual resource scheduling on the first target storage node.
[0009] The resource scheduling method provided by the embodiments of the present application, in the case of receiving a resource scheduling request, obtains the storage performance information of each storage node in the storage system, and then filters out the first target storage node from all the storage nodes in the storage system according to the storage performance information of each storage node and the resource scheduling request, and finally performs virtual resource scheduling on the first target storage node. Through the storage performance information of each storage node in the storage system, the above method can clearly understand the storage performance status of each storage node. On this basis, combined with the resource scheduling request, the virtual resources can be accurately scheduled to the first target storage node with better storage performance and matching the resource scheduling request, avoiding the unreasonable resource allocation problem caused by the traditional random allocation or simple rule allocation method, preventing the idle of nodes with strong storage performance (such as preventing the idle of nodes with low storage pressure), while the nodes with weak storage performance are overloaded. Therefore, the above method can effectively improve the resource utilization rate of the entire storage system, and can improve the resource scheduling efficiency to a certain extent when performing virtual resource scheduling on the first target storage node subsequently.
[0010] In some embodiments, filtering out the first target storage node from all the storage nodes in the storage system according to the storage performance information of each storage node and the resource scheduling request includes:
[0011] Extracting the required storage performance information from the resource scheduling request, and filtering out multiple candidate storage nodes from all the storage nodes in the storage system according to the required storage performance information;
[0012] Filtering out the first target storage node from the multiple candidate storage nodes according to the storage type in the resource scheduling request and the storage performance information of each candidate storage node.
[0013] For the method described in the embodiments of the present application, different services have very different requirements for storage performance. By extracting the required storage performance information from the resource scheduling request, the actual requirements of the service can be accurately grasped, so as to filter out the candidate storage nodes that match it, ensuring the accuracy of resource allocation. Since the traditional resource allocation method only considers the storage capacity for allocation, it may lead to the problem of over-provisioning, that is, allocating high-performance storage resources that exceed the actual requirements of the service, resulting in resource waste; or under-provisioning, unable to meet the basic requirements of the service, affecting the normal operation of the service. The method of this embodiment can avoid the problem of unbalanced resource allocation by extracting the required storage performance information for storage node filtering, and make the resources be reasonably utilized.
[0014] In some embodiments, filtering out the first target storage node from the multiple candidate storage nodes according to the storage type in the resource scheduling request and the storage performance information of each candidate storage node includes:
[0015] Obtain a screening model corresponding to the storage type;
[0016] Determine a first target storage node according to the storage performance information of each candidate storage node and the screening model.
[0017] In some embodiments, determining a first target storage node according to the storage performance information of each candidate storage node and the screening model includes:
[0018] Substitute the storage performance information of each candidate storage node into the screening model for evaluation to obtain the evaluation scores corresponding to each candidate storage node;
[0019] Determine a first target storage node according to the evaluation scores corresponding to each candidate storage node.
[0020] In the method described in the embodiments of the present application, since there are significant differences in the requirements for storage performance for different storage types, the method described in this embodiment can accurately screen according to the characteristics and requirements of a specific storage type by obtaining a screening model corresponding to the storage type, which can ensure that virtual resources are allocated to the first target storage node that best meets the requirements of its storage type, improving the accuracy of resource allocation. In addition, the screening model quantifies and analyzes the storage performance information of each candidate storage node to obtain an evaluation score. This quantification method can avoid the problems of subjective judgment and fuzzy criteria in traditional allocation methods, and then select the first target storage node based on the evaluation score, which can more accurately match the requirements of the resource scheduling request for storage performance. Moreover, the process of substituting the storage performance information into the screening model for evaluation and determining the first target storage node can be automated, greatly reducing the workload of manual intervention and manual operation, and improving the efficiency and accuracy of resource scheduling.
[0021] In some embodiments, the first target storage node includes multiple first target storage nodes, and the method further includes:
[0022] Send the evaluation scores and the node selection requests of each first target storage node to the cloud platform; the node selection requests are used to instruct the cloud platform to determine a second target storage node according to the evaluation scores of each first target storage node and the load performance of each first target storage node;
[0023] Perform virtual resource scheduling on the first target storage node, including:
[0024] Perform virtual resource scheduling on the second target storage node.
[0025] In the method described in the embodiments of the present application, when the cloud platform determines the second target storage node, it not only considers the evaluation scores of each first target storage node, but also combines the load performance of the storage node. Among them, the evaluation score can reflect the comprehensive storage performance of the storage node, while the load performance can reflect the current working pressure and resource usage of the storage node. By integrating these two key factors, the cloud platform can make more comprehensive and accurate decisions, allocate virtual resources to the most suitable nodes, avoid resource misallocation problems that may be caused by allocating based on a single factor, and thus achieve a rational resource scheduling effect.
[0026] In some embodiments, screening out multiple candidate storage nodes from all storage nodes in the storage system according to the required storage performance information includes:
[0027] Determining screening conditions according to the required storage performance information; the screening conditions include at least one of whether the storage node supports a preset protocol, whether the storage node reaches the maximum threshold of the exported volume, whether the number of input / output operations per second of the storage node reaches the number threshold, and whether the bandwidth of the storage node reaches the bandwidth threshold;
[0028] Determining the storage nodes that meet the screening conditions among all storage nodes in the storage system as candidate storage nodes.
[0029] In the method described in the embodiments of the present application, whether the preset protocol is supported is closely related to the data interaction method between the business system and the storage system. When the storage system supports the preset protocol, efficient data transmission and sharing can be achieved. By screening the storage nodes that support the preset protocol, seamless docking between the business system and the storage system can be ensured, and the data interaction requirements of the business can be met. Moreover, conditions such as the maximum threshold of the exported volume, the threshold of the number of input / output operations per second, and the bandwidth threshold are set based on the actual requirements of the business for storage capacity, read / write performance, and data transmission speed. For a real-time trading system with extremely high requirements for data read / write speed, setting an appropriate threshold for the number of input / output operations per second can screen out storage nodes that can quickly respond to business read / write requests, avoid business lags or response delays caused by insufficient storage performance, and ensure the stable operation of the business. In addition, by setting screening conditions, storage nodes that do not meet the business requirements can be excluded, and resources can be accurately allocated to the storage nodes that truly need and can effectively utilize them, avoiding resource waste caused by allocating resources to nodes that cannot effectively support the business.
[0030] In a second aspect, the present application also provides a resource scheduling device, and the device includes:
[0031] An acquisition module, configured to acquire the storage performance information of each storage node in the storage system when receiving a resource scheduling request;
[0032] A screening module, configured to screen out a first target storage node from all storage nodes in the storage system according to the storage performance information and resource scheduling requests of each storage node;
[0033] A scheduling module, configured to perform virtual resource scheduling on the first target storage node.
[0034] In a third aspect, the present application further provides a computer device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0035] When receiving a resource scheduling request, obtain the storage performance information of each storage node in the storage system;
[0036] According to the storage performance information and resource scheduling requests of each storage node, screen out a first target storage node from all storage nodes in the storage system;
[0037] Perform virtual resource scheduling on the first target storage node.
[0038] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0039] When receiving a resource scheduling request, obtain the storage performance information of each storage node in the storage system;
[0040] According to the storage performance information and resource scheduling requests of each storage node, screen out a first target storage node from all storage nodes in the storage system;
[0041] Perform virtual resource scheduling on the first target storage node.
[0042] In a fifth aspect, the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the following steps are implemented:
[0043] When receiving a resource scheduling request, obtain the storage performance information of each storage node in the storage system;
[0044] According to the storage performance information and resource scheduling requests of each storage node, screen out a first target storage node from all storage nodes in the storage system;
[0045] Perform virtual resource scheduling on the first target storage node.
[0046] The above resource scheduling method, device, equipment, storage medium and program product. In the case of receiving a resource scheduling request, the method obtains the storage performance information of each storage node in the storage system, then screens out the first target storage node from all the storage nodes in the storage system according to the storage performance information of each storage node and the resource scheduling request, and finally performs virtual resource scheduling on the first target storage node. Through the storage performance information of each storage node in the storage system, the above method can clearly understand the storage performance status of each storage node. On this basis, combined with the resource scheduling request, the virtual resources can be accurately scheduled to the first target storage node with better storage performance and matching the resource scheduling request, avoiding the problem of unreasonable resource allocation caused by the traditional random allocation or simple rule allocation method, preventing the nodes with strong storage performance from being idle (for example, preventing the nodes with low storage pressure from being idle), while the nodes with weak storage performance are overloaded. Therefore, the above method can effectively improve the resource utilization rate of the entire storage system, and can improve the resource scheduling efficiency to a certain extent when performing virtual resource scheduling on the first target storage node subsequently. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 FIG. 1 is one of the schematic structural diagrams of the resource scheduling system in some embodiments;
[0048] Figure 2 FIG. 2 is one of the schematic flowcharts of the resource scheduling method in some embodiments;
[0049] Figure 3 FIG. 3 is another schematic flowchart of the resource scheduling method in some embodiments;
[0050] Figure 4 FIG. 4 is yet another schematic flowchart of the resource scheduling method in some embodiments;
[0051] Figure 5 FIG. 5 is still another schematic flowchart of the resource scheduling method in some embodiments;
[0052] Figure 6 FIG. 6 is yet another schematic flowchart of the resource scheduling method in some embodiments;
[0053] Figure 7 FIG. 7 is still another schematic flowchart of the resource scheduling method in some embodiments;
[0054] Figure 8 FIG. 8 is yet another schematic flowchart of the resource scheduling method in some embodiments;
[0055] Figure 9 FIG. 9 is another schematic structural diagram of the resource scheduling system in some embodiments;
[0056] Figure 10Schematic diagram of data interaction process after scheduling virtual resources in some embodiments;
[0057] Figure 11 Communication architecture between virtual instances and storage services on storage nodes in some embodiments;
[0058] Figure 12 Block diagram of the resource scheduling device in some embodiments;
[0059] Figure 13 Internal structure diagram of a computer device in some embodiments. Detailed implementation manners
[0060] In the embodiments of the present application, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.
[0061] In the embodiments of the present application, the term "a plurality of" refers to two or more, and other quantifiers are similar thereto.
[0062] In the embodiments of the present application, the term "at least one" means one or more. For example, at least one of A, B, and C may represent: A exists alone, B exists alone, C exists alone, A and B exist simultaneously, A and C exist simultaneously, B and C exist simultaneously, and A, B, and C exist simultaneously. These six situations.
[0063] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0064] As the scale and resource requirements of data centers and cloud platforms continue to climb, the efficient scheduling of resources on cloud platforms has become a crucial technical issue. To meet the rapidly changing business needs, cloud platforms need to be able to manage and schedule resources such as computing, storage, and networking flexibly and efficiently. In this process, virtualization technology plays an extremely important role. Through resource abstraction, cloud resources can be quickly provided to users. Specifically, virtualization technology can transform physical hardware resources (such as CPUs, memory, storage, and network bandwidth) into multiple independent virtual resources. These virtual resources can exist in the form of virtual machines and be allocated to different physical nodes according to the specific resource requirements of applications or users. Currently, in the process of virtual resource scheduling, virtualized instances to be scheduled are usually scheduled to physical servers where disks of a specified type are located. However, there are problems with unreasonable scheduling in the above virtualized instance scheduling method.
[0065] In view of this, embodiments of the present application propose a resource scheduling method, apparatus, device, storage medium, and program product. By combining the storage performance information of each storage node and the resource scheduling request, the best storage node can be selected from the storage cluster. When performing virtual resource scheduling on this best storage node subsequently, the resource scheduling efficiency can be improved to a certain extent.
[0066] It should be noted that the beneficial effects or technical problems solved by the embodiments of the present application are not limited to this one, and there may be other implicit or related problems. For specific details, please refer to the descriptions of the following embodiments.
[0067] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific embodiments. These specific embodiments below can be combined with each other. Concepts or processes that are the same or similar may not be repeated in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0068] In some embodiments, the resource scheduling method provided by the embodiments of the present application can be applied to, for example Figure 1In the resource scheduling system shown, the resource scheduling system includes a cloud platform 101, a resource scheduling device 102, and multiple storage nodes 103. The resource scheduling device 102 is respectively connected to the cloud platform 101 and multiple storage nodes 103 and communicates through a network. The cloud platform 101 sends a resource scheduling request to the resource scheduling device 102. The resource scheduling device 102 preliminarily screens out some storage nodes with better storage performance according to the storage performance information on each storage node 103 and the resource scheduling request, and returns the some storage nodes with better storage performance to the cloud platform 101. The cloud platform 101 then screens out the final storage nodes from the some storage nodes with better storage performance in combination with the load performance information, and schedules virtual resources on the final storage nodes. Among them, the cloud platform 101 can be an independent server or a server cluster composed of multiple servers. The resource scheduling device 102 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The storage node 103 can be an independent server or a server cluster composed of multiple servers. The cloud platform 101 can be set separately and independently from the resource scheduling device 102, or can be integrated.
[0069] The resource scheduling method implemented in the embodiments of this application is based on a hyper-converged architecture. Hyper-convergence means deploying cloud platform management services and storage services to the same set of clusters (that is, storage nodes and computing nodes are one node), so as to provide complete virtualization services externally through a set of hardware. After the resource scheduling is completed in the embodiments of this application, the vhost-user interface and the vhost-user-blk protocol are adopted to achieve zero-copy of memory when interacting with user-mode processes on virtual machines, and the input / output performance has been improved to a certain extent.
[0070] Those skilled in the art can understand that Figure 1 the structure shown in
[0071] In some embodiments, as Figure 2 shown, a resource scheduling method is provided. Taking the method applied to the resource scheduling device in Figure 1 as an example, the method includes the following steps:
[0072] S201, when receiving a resource scheduling request, obtain the storage performance information of each storage node in the storage system.
[0073] Among them, the resource scheduling request is used to instruct the resource scheduling system to schedule virtual resources to the storage node, and it is also a request for creating a block storage device. The resource scheduling request includes at least one of the required transport protocol, required storage capacity, required bandwidth, required number of input / output operations per second (i.e., iops), and the type of data to be stored. The storage performance information of the storage node includes at least one of the data transfer protocols supported by the storage node, the current number of exported volumes of the storage node, the current number of input / output operations per second of the storage node, the current bandwidth of the storage node, and the storage type of the storage node. Among them, the current number of exported volumes of the storage node, the current number of input / output operations per second of the storage node, and the current bandwidth of the storage node can reflect the storage pressure situation of the storage node, and the data transfer protocol supported by the storage node and the storage type of the storage node can reflect the attribute situation of the storage node.
[0074] In the embodiment of the present application, when an external system needs to schedule storage resources, it can send a resource scheduling request to the resource scheduling system, and the resource scheduling system can receive the resource scheduling request. For example, the external system can send a resource scheduling request to the cloud platform, and the cloud platform forwards the resource scheduling request to the resource scheduling device, and the resource scheduling device can receive the resource scheduling request. When the resource scheduling device receives the resource scheduling request, it can use a system monitoring tool or write a script program to actively obtain the current storage performance information of each storage node in the storage system at a certain time interval (such as every minute, every hour, or every day). Optionally, the resource scheduling device sends a storage performance information acquisition request to each storage node in the storage system, and each storage node can send its own storage performance information to the resource scheduling device at a certain time interval (such as every minute, every hour, or every day), and the resource scheduling device can obtain the storage performance information of each storage node in the storage system.
[0075] S202, according to the storage performance information of each storage node and the resource scheduling request, screen out the first target storage node from all the storage nodes in the storage system.
[0076] Among them, the first target storage node is a storage node in the storage system whose storage performance information meets the resource scheduling request.
[0077] In the embodiments of the present application, after the resource scheduling device obtains the storage performance information of each storage node based on the above steps, it may first determine whether the current number of exported volumes of the storage node has reached the maximum threshold of the exported volumes according to the current number of exported volumes of the storage node, determine whether the iops of the storage node has reached the maximum threshold according to the current number of input / output operations per second of the storage node, and determine whether the bandwidth of the storage node has reached the maximum bandwidth threshold according to the current bandwidth of the storage node. Then, it filters out the storage nodes whose number of exported volumes has not reached the maximum threshold of the exported volumes, the number of input / output operations per second has not reached the maximum threshold of the iops, and the bandwidth has not reached the maximum bandwidth threshold, and obtains some storage nodes. Then, it parses the resource scheduling request to parse out the node performance requirements of the storage nodes to be scheduled by the resource scheduling request. Then, according to the node performance requirements, it filters out the first target storage node with the best node performance from these storage nodes, or filters out multiple storage nodes with better performance from these storage nodes according to the node performance requirements, and then randomly filters out a storage node from the multiple storage nodes with better performance as the first target storage node. The node performance requirements can be determined according to the storage capacity required by the virtual resources; for example, if the storage capacity of a certain storage node is less than the storage capacity threshold, it means that the storage node meets the node performance requirements, and the storage capacity threshold can be determined according to the actual storage requirements. Optionally, the node performance requirements can be determined according to the required bandwidth; for example, if the bandwidth of a certain storage node is less than the bandwidth threshold, it means that the storage node meets the node performance requirements, and the bandwidth threshold can be determined according to the actual storage requirements. Optionally, the node performance requirements can be determined according to the required number of input / output operations per second; for example, if the iops of a certain storage node is less than the iops threshold, it means that the storage node meets the node performance requirements, and the iops threshold can be determined according to the actual storage requirements. Optionally, the node performance requirements can be determined according to the type of data to be stored; for example, if the type of data stored in a certain storage node meets the type of data requested by the resource scheduling request, it means that the storage node meets the node performance requirements, and the type of data requested by the resource scheduling request can be determined according to the actual type of data stored (such as files, videos, audios, etc.). Optionally, the node performance requirements can be determined comprehensively by multiple factors such as the required storage capacity, the required bandwidth, the required number of input / output operations per second, and the type of data to be stored.
[0078] S203, perform virtual resource scheduling on the first target storage node.
[0079] Among them, the virtual resource is a virtualization instance, that is, a virtual machine.
[0080] In the embodiment of the present application, after the resource scheduling device determines the first target storage node from all storage nodes in the storage system based on the above steps, virtual resources can be created on the first target storage node. Specifically, the detailed information of the first target storage node, such as available storage space, storage type, etc., can be obtained first. Then, the configuration parameters of the volume are planned, such as the size of the volume, access mode (read / write or read-only), etc. Then, using the management interface of the preset storage system, a storage volume is created on the first target storage node. After the storage volume is created, it is mounted as a virtual disk into the virtual machine configuration, and the storage volume is mounted to the container path through the driver. Finally, the interface of the orchestration tool is called to start the virtualization instance to achieve virtual resource scheduling.
[0081] The resource scheduling method provided by the embodiment of the present application, in the case of receiving a resource scheduling request, by obtaining the storage performance information of each storage node in the storage system, and then according to the storage performance information of each storage node and the resource scheduling request, screening out the first target storage node from all storage nodes in the storage system, and finally performing virtual resource scheduling on the first target storage node. Through the storage performance information of each storage node in the storage system, the above method can clearly understand the storage performance status of each storage node. On this basis, combined with the resource scheduling request, virtual resources can be accurately scheduled to the first target storage node with better storage performance and matching the resource scheduling request, avoiding the problem of unreasonable resource allocation caused by the traditional random allocation or simple rule allocation method, preventing the situation that nodes with strong storage performance are idle (for example, preventing nodes with low storage pressure from being idle), while nodes with weak storage performance are overloaded. Therefore, the above method can effectively improve the resource utilization rate of the entire storage system, and can improve the resource scheduling efficiency to a certain extent when performing virtual resource scheduling on the first target storage node subsequently.
[0082] In some embodiments, a method for screening out the first target storage node from all storage nodes in the storage system is also provided, as Figure 3 shown, the "screening out the first target storage node from all storage nodes in the storage system according to the storage performance information of each storage node and the resource scheduling request" in S202 above includes:
[0083] S301, extracting the required storage performance information from the resource scheduling request, and screening out multiple candidate storage nodes from all storage nodes in the storage system according to the required storage performance information.
[0084] Among them, the required storage performance information includes at least one of the required transmission protocol, required storage capacity, required bandwidth, and required number of input / output operations per second (i.e., iops). The candidate storage node is a storage node whose storage performance information meets the required storage performance information of the resource scheduling request.
[0085] In an embodiment of the present application, after obtaining a resource scheduling request and the storage performance information of each storage node in the storage system, the resource scheduling device may parse the resource scheduling request, and then parse at least one of the required transport protocol, required storage capacity, required bandwidth, and required number of input / output operations per second (i.e., iops) from the resource scheduling request. Then, the resource scheduling device may correspondingly extract at least one of the transport protocols supported by each storage node, the current storage capacity of each storage node, the current bandwidth of each storage node, and the current number of input / output operations per second (i.e., iops) of each storage node from the storage performance information of all storage nodes in the storage system. Then, for any storage node, it may be determined whether the transport protocol supported by the storage node is the required transport protocol. For example, it is determined whether the vhost-user-blk protocol is supported. If the storage node supports the vhost-user-blk protocol, then it is considered that the storage node supports the required transport protocol. On the contrary, if the storage node does not support the vhost-user-blk protocol, then it is considered that the storage node does not support the required transport protocol. It may be determined whether the current storage capacity of the storage node meets the required storage capacity. For example, if the current storage capacity is greater than the required storage capacity, it may be considered that the current storage capacity meets the required storage capacity. Or, if the difference between the current storage capacity and the required storage capacity is greater than 5%, it may be considered that the current storage capacity meets the required storage capacity. On the contrary, if the current storage capacity is not greater than the required storage capacity, it is considered that the current storage capacity of the storage node does not meet the required storage capacity. It may be determined whether the current bandwidth of the storage node meets the required bandwidth. For example, if the current bandwidth is greater than the required bandwidth, it may be considered that the current bandwidth meets the required bandwidth. On the contrary, if the current bandwidth is not greater than the required bandwidth, it is considered that the current bandwidth of the storage node does not meet the required bandwidth. It may be determined whether the current iops of the storage node meets the required iops. For example, if the current iops is greater than the required iops, it may be considered that the current iops meets the required iops. On the contrary, if the current iops is not greater than the required iops, it is considered that the current iops of the storage node does not meet the required iops. The resource scheduling device may determine whether the transport protocol supported by the storage node is the required transport protocol, whether the current storage capacity of the storage node meets the required storage capacity, whether the current bandwidth of the storage node meets the required bandwidth, and whether the current iops of the storage node meets the required iops through the above judgment method. When a certain storage node meets some or all of the above requirements, for example, meets the required transport protocol, required storage capacity, and required bandwidth, or meets the required transport protocol, required storage capacity, required bandwidth, and required iops, then the storage node is considered a candidate storage node. Multiple candidate storage nodes can be screened out from all storage nodes in the storage system by using this judgment method.
[0086] S302. Based on the storage type in the resource scheduling request and the storage performance information of each candidate storage node, screen out the first target storage node from multiple candidate storage nodes.
[0087] Among them, the storage types include performance type, balanced type, and bandwidth type. The performance type refers to scenarios with high requirements for the overall performance of the storage system, which focuses more on meeting the requirements of high input / output operation times (IOPS) or low latency, etc. For example, in database applications, due to frequent data read and write operations, the requirements for the system's IOPS are very high, and it is also sensitive to network latency. The storage system needs to quickly respond to each input / output request to ensure the efficient execution of database operations. Therefore, such scenarios belong to the performance type. The balanced type refers to seeking a balance in all aspects of performance, neither overly pursuing high IOPS nor simply emphasizing high bandwidth, but hoping that the system can have relatively stable and reasonable performance in multiple performance indicators. For example, in ordinary enterprise office systems, a certain file read and write speed (related to bandwidth) is required, and a good response speed (related to IOPS) is also needed during daily operations, but the requirements for both aspects are not extremely high. Therefore, such scenarios belong to the balanced type. The bandwidth type refers to mainly focusing on the data transmission rate, that is, being able to transmit a large amount of data within a unit time. For example, in scenarios such as video stream services, large-scale data backup and recovery, etc., a large amount of data needs to be transmitted in a short time, so there are high requirements for bandwidth, and a large network bandwidth needs to be occupied to ensure smooth video playback or fast data transmission. Therefore, such scenarios belong to the bandwidth type.
[0088] In the embodiments of the present application, after receiving a resource scheduling request, the resource scheduling device may parse the resource scheduling request to determine the storage type. Specifically, when the resource scheduling request includes the data to be scheduled, the resource scheduling device may determine the storage type according to the data to be scheduled in the resource scheduling request. For example, if the data to be scheduled is a database application, the storage type may be determined as performance type; if the data to be scheduled is an ordinary enterprise office system, the storage type may be determined as balanced type; if the data to be scheduled is a video stream, the storage type may be determined as bandwidth type. Optionally, if the resource scheduling request directly includes the storage type to be scheduled, the storage type may be directly determined. After determining the storage type, the resource scheduling device may combine the storage type and the storage performance information of each candidate storage node to determine a storage node that matches the storage type from multiple candidate storage nodes as the first target storage node. Specifically, for the performance-type storage type, the storage node with the highest IOPS may be selected as the first target storage node; for the balanced-type storage type, the storage node with the highest average of IOPS and bandwidth may be selected as the first target storage node; for the bandwidth-type storage type, the storage node with the highest bandwidth may be selected as the first target storage node.
[0089] For the method described in the embodiments of the present application, different services have very different requirements for storage performance. By extracting the required storage performance information from the resource scheduling request, the actual needs of the service can be accurately grasped, so as to screen out candidate storage nodes that match it and ensure the accuracy of resource allocation. Since the traditional resource allocation method only considers storage capacity for allocation, it may lead to problems of over-allocation, that is, allocating high-performance storage resources that exceed the actual needs of the service, resulting in waste of resources; or under-allocation, unable to meet the basic needs of the service, affecting the normal operation of the service. The method of this embodiment can avoid the problem of unbalanced resource allocation by extracting the required storage performance information for storage node screening, and make reasonable use of resources.
[0090] In some embodiments, a specific implementation manner for screening the first target storage node from all storage nodes in the storage system is also provided, as Figure 4 shown. The "screening the first target storage node from multiple candidate storage nodes according to the storage type and the storage performance information of each candidate storage node in the resource scheduling request" in S302 above includes:
[0091] S401, obtaining a screening model corresponding to the storage type.
[0092] Among them, the screening model includes a performance-type screening model, a balanced-type screening model, and a bandwidth-type screening model.
[0093] In the embodiments of the present application, a performance screening model, a balanced screening model, and a bandwidth screening model can be pre-constructed and stored in a preset path. The specific screening models are as follows:
[0094] Performance screening model: score = 0.7 * [(Mi - Ci) / Mi] + 0.3 * [(Mb - Cb) / Mb];
[0095] Balanced screening model: score = 0.5 * [(Mi - Ci) / Mi] + 0.5 * [(Mb - Cb) / Mb];
[0096] Bandwidth screening model: score = 0.3 * [(Mi - Ci) / Mi] + 0.7 * [(Mb - Cb) / Mb];
[0097] Wherein, Ci = current iops, representing the number of input / output operations per second (IOPS) of the storage node currently; Mi = Node Max iops, representing the maximum number of input / output operations per second (IOPS) of the storage node; Cb = current bandwidth, representing the current data transfer rate (bandwidth) of the storage node; Mb = Node Max bandwidth, representing the maximum data transfer rate (bandwidth) of the storage node.
[0098] After determining the storage type requested by the resource scheduling request, the resource scheduling device can obtain the screening model corresponding to the storage type from the preset path.
[0099] S402. Determine the first target storage node according to the storage performance information of each candidate storage node and the screening model.
[0100] In the embodiments of the present application, after the resource scheduling device obtains the screening model corresponding to the storage type based on the above steps, it can determine the first target storage node from multiple candidate storage nodes according to the current number of input / output operations per second, the current number of input / output operations per second, the current data transfer rate of the storage node, the maximum data transfer rate of the storage node, and the corresponding screening model in the storage performance information of each candidate storage node.
[0101] Specifically, as Figure 5 shown, "determine the first target storage node according to the storage performance information of each candidate storage node and the screening model" in the above S402 includes:
[0102] S501. Substitute the storage performance information of each candidate storage node into the screening model for evaluation to obtain the evaluation scores corresponding to each candidate storage node.
[0103] Among them, the evaluation score is the performance evaluation score of the storage node.
[0104] In the embodiment of the present application, after obtaining the screening model and the storage performance information of each candidate storage node, the resource scheduling device can substitute the current number of input / output operations per second Ci, the current number of input / output operations per second Mi, the current data transfer rate Cb of the storage node, and the maximum data transfer rate Mb of the storage node in the storage performance information of each candidate storage node into the screening model for evaluation, and obtain the corresponding evaluation scores of each candidate storage node. Specifically, if the screening model is a performance-based screening model, substitute Ci, Mi, Cb, and Mb into score = 0.7 * [(Mi - Ci) / Mi] + 0.3 * [(Mb - Cb) / Mb] to calculate the evaluation score; if the screening model is a balanced screening model, substitute Ci, Mi, Cb, and Mb into score = 0.5 * [(Mi - Ci) / Mi] + 0.5 * [(Mb - Cb) / Mb] to calculate the evaluation score; if the screening model is a bandwidth-based screening model, substitute Ci, Mi, Cb, and Mb into score = 0.3 * [(Mi - Ci) / Mi] + 0.7 * [(Mb - Cb) / Mb] to calculate the evaluation score.
[0105] S502. Determine the first target storage node according to the corresponding evaluation scores of each candidate storage node.
[0106] In the embodiment of the present application, after the resource scheduling device obtains the corresponding evaluation scores of each candidate storage node based on the above steps, it can use the candidate storage node with the highest evaluation score as the first target storage node. Optionally, multiple storage nodes whose evaluation scores meet the preset score threshold can be screened out first, and then a storage node is randomly selected from the multiple storage nodes whose evaluation scores meet the preset score threshold as the first target storage node. The preset score threshold can be determined according to storage requirements or service requirements.
[0107] In the method described in the embodiments of the present application, due to significant differences in the requirements for storage performance among different storage types, the method described in this embodiment can accurately screen according to the characteristics and requirements of a specific storage type by obtaining a screening model corresponding to the storage type. It can ensure that virtual resources are allocated to the first target storage node that best meets the requirements of its storage type, improving the accuracy of resource allocation. In addition, the screening model quantifies and analyzes the storage performance information of each candidate storage node to obtain an evaluation score. This quantification method can avoid the problems of subjective judgment and fuzzy criteria in traditional allocation methods. Then, based on the evaluation score, the first target storage node is selected, which can more accurately match the requirements of the resource scheduling request for storage performance. Moreover, the process of substituting the storage performance information into the screening model for evaluation and determining the first target storage node can be automated, greatly reducing the workload of manual intervention and manual operation, and improving the efficiency and accuracy of resource scheduling.
[0108] In some embodiments, a resource scheduling method in a scenario where there are multiple first target storage nodes in the first target storage node is also provided, as Figure 6 shown Figure 5 The resource scheduling method described in the embodiment further includes:
[0109] S601, sending the evaluation scores and the node selection requests of each first target storage node to the cloud platform.
[0110] Among them, there are multiple first target storage nodes in the first target storage node. The node selection request is used to instruct the cloud platform to determine the second target storage node according to the evaluation scores of each first target storage node and the load performance of each first target storage node.
[0111] In the embodiments of the present application, after obtaining the evaluation scores corresponding to each candidate storage node, the resource scheduling device may use all the candidate storage nodes as multiple first target storage nodes. Optionally, multiple candidate storage nodes whose evaluation scores meet a preset score threshold may be used as multiple first target storage nodes. Optionally, a preset number of candidate storage nodes with the top evaluation scores may be used as multiple first target storage nodes. The preset score threshold and the preset number may be determined according to storage requirements or service requirements. After determining the multiple first target storage nodes, the resource scheduling device may generate a node selection request, and then send the multiple first target storage nodes, the evaluation scores of each first target storage node, and the node selection request to the cloud platform. After receiving the multiple first target storage nodes and the evaluation scores of each first target storage node, the cloud platform may use corresponding commands or cloud platform monitoring tools to obtain the CPU load and memory load of each first target storage node, determine the CPU score according to the CPU load, and determine the memory score according to the memory load. Then, in combination with the evaluation scores corresponding to each first target storage node, the comprehensive evaluation score of each first target storage node is determined. For example, the CPU score, the memory score, and the evaluation score may be summed to obtain the comprehensive evaluation score; or, different weights may be assigned to the CPU score, the memory score, and the evaluation score, and then the CPU score, the memory score, and the evaluation score are weighted and summed to obtain the comprehensive evaluation score. Among them, the weight of the evaluation score may be greater than the weight of the CPU score, and the weight of the evaluation score may be greater than the weight of the memory score. The weights corresponding to the CPU score, the memory score, and the evaluation score may be determined according to actual service requirements and storage requirements. After obtaining the comprehensive evaluation scores of each first target storage node, the cloud platform may determine the first target storage node with the highest comprehensive evaluation score as the second target storage node. Optionally, a first target storage node may be randomly selected from multiple first target storage nodes with the top comprehensive evaluation scores as the second target storage node. After determining the second target storage node, the cloud platform returns the second target storage node to the resource scheduling device. Optionally, the cloud platform may generate a virtual resource creation request, and then return the virtual resource creation request and the second target storage node to the resource scheduling device. The virtual resource creation request is used to instruct the resource scheduling device to create virtual resources on the second target storage node to implement the scheduling of virtual resources.
[0112] Correspondingly, when the resource scheduling device executes the step of "performing virtual resource scheduling on the first target storage node" in S203, it specifically executes S602: performing virtual resource scheduling on the second target storage node.
[0113] Among them, the second target storage node is a storage node selected from multiple second target storage nodes by combining the CPU load, the memory load, and the storage performance evaluation score.
[0114] In the embodiments of the present application, after the resource scheduling device determines the second target storage node from all storage nodes in the storage system based on the above steps, virtual resources can be created on the second target storage node. Specifically, the detailed information of the second target storage node, such as available storage space, storage type, etc., can be obtained first. Then, the configuration parameters of the volume are planned, such as the size of the volume, access mode (read / write or read-only), etc. Then, using the management interface of the preset storage system, a storage volume is created on the second target storage node. After the storage volume is created, it is mounted as a virtual disk in the virtual machine configuration and mounted to the container path through the driver. Finally, the interface of the orchestration tool is called to start the virtualization instance to achieve virtual resource scheduling.
[0115] In the method described in the embodiments of the present application, when the cloud platform determines the second target storage node, it not only considers the evaluation scores of each first target storage node, but also combines the load performance of the storage nodes. Among them, the evaluation score can reflect the comprehensive storage performance of the storage node, and the load performance can reflect the current working pressure and resource usage of the storage node. By integrating these two key factors, the cloud platform can make more comprehensive and accurate decisions, allocate virtual resources to the most suitable nodes, avoid resource misallocation problems that may be caused by allocating only based on a single factor (such as evaluation score or load performance), and thus achieve a rational resource scheduling effect.
[0116] In some embodiments, a specific implementation manner for screening out multiple candidate storage nodes from all storage nodes in the storage system is also provided, such as Figure 7 shown, the "screening out multiple candidate storage nodes from all storage nodes in the storage system according to the required storage performance information" in S301 above includes:
[0117] S701, determining a screening condition according to the required storage performance information.
[0118] Among them, the screening condition is used to screen out candidate storage nodes from all storage nodes in the storage system. The screening condition includes at least one of whether the storage node supports a preset protocol, whether the storage node reaches the maximum threshold of the exported volume, whether the number of input / output operations per second of the storage node reaches the number threshold, and whether the bandwidth of the storage node reaches the bandwidth threshold. The preset protocol is the vhost-user-blk protocol.
[0119] In the embodiments of the present application, after obtaining a resource scheduling request, the resource scheduling device may extract the required storage performance information from the resource scheduling request, and then determine a screening condition according to the required storage performance information. Specifically, at least one of whether a storage node supports a preset protocol, whether the storage node reaches the maximum threshold of the exported volume, whether the number of input / output operations per second of the storage node reaches a threshold number, and whether the bandwidth of the storage node reaches a bandwidth threshold may be used as a screening condition. The preset protocols of each storage node may be the same or different, and may be specifically determined according to the attributes or storage requirements of the storage node. The maximum threshold of the exported volume of each storage node may be the same or different, and may be specifically determined according to the attributes or storage requirements of the storage node. The threshold number of each storage node may be the same or different, and may be specifically determined according to the attributes or storage requirements of the storage node. The bandwidth threshold of each storage node may be the same or different, and may be specifically determined according to the attributes or storage requirements of the storage node.
[0120] S702, determine the storage nodes that meet the screening conditions among all the storage nodes in the storage system as candidate storage nodes.
[0121] In the embodiment of the present application, after the resource scheduling device obtains the screening conditions based on the above steps, it can correspondingly extract at least one of the transmission protocols supported by each storage node, the current number of exported volumes of each storage node, the current number of input / output operations per second of each storage node, and the current bandwidth of each storage node from the storage performance information of all storage nodes in the storage system. Then, for any storage node, it can be determined whether the transmission protocol supported by the storage node is a preset protocol. For example, whether it supports the vhost-user-blk protocol. If the storage node supports the vhost-user-blk protocol, then it is considered that the storage node meets the screening conditions. On the contrary, if the storage node does not support the vhost-user-blk protocol, then it is considered that the storage node does not meet the screening conditions; it can be determined whether the current exported volume of the storage node reaches the maximum threshold of the exported volume. For example, if the current exported volume does not reach the maximum threshold of the exported volume, it can be considered that the storage node meets the screening conditions. On the contrary, if the current exported volume reaches the maximum threshold of the exported volume, it can be considered that the storage node does not meet the screening conditions; it can be determined whether the current bandwidth of the storage node exceeds the bandwidth threshold of the storage node. For example, if the current bandwidth does not exceed the bandwidth threshold of the storage node, it can be considered that the storage node meets the screening conditions. On the contrary, if the current bandwidth exceeds the bandwidth threshold of the storage node, it can be considered that the storage node does not meet the screening conditions; it can be determined whether the current iops of the storage node exceeds the maximum iops of the storage node. For example, if the current iops does not exceed the maximum iops of the storage node, it can be considered that the storage node meets the screening conditions. On the contrary, if the current iops exceeds the maximum iops of the storage node, it can be considered that the storage node does not meet the screening conditions. When a certain storage node meets some or all of the above requirements, for example, a certain storage node supports the preset protocol and does not reach the maximum threshold of the exported volume, it is considered that the storage node meets the screening conditions, and the storage node is determined as a candidate storage node. Optionally, if a certain storage node supports the preset protocol, does not reach the maximum threshold of the exported volume, does not reach the maximum bandwidth, and does not reach the maximum number of input / output operations per second, it is considered that the storage node meets the screening conditions, and the storage node is determined as a candidate storage node.
[0122] In the method described in the embodiments of the present application, whether the preset protocol is supported is closely related to the data interaction method between the service system and the storage system. When the storage system supports the preset protocol, efficient data transmission and sharing can be achieved. By screening the storage nodes that support the preset protocol, seamless docking between the service system and the storage system can be ensured, meeting the data interaction requirements of the service. Moreover, conditions such as the maximum threshold of the exported volume, the threshold of the number of input / output operations per second (IOPS), and the bandwidth threshold are set based on the actual requirements of the service for storage capacity, read / write performance, and data transmission speed. For a real-time trading system with extremely high requirements for data read / write speed, setting an appropriate IOPS threshold can screen out storage nodes that can quickly respond to the read / write requests of the service, avoiding service jams or response delays caused by insufficient storage performance and ensuring the stable operation of the service. In addition, by setting screening conditions, storage nodes that do not meet the service requirements can be excluded, and resources can be accurately allocated to the storage nodes that truly need and can effectively utilize them, avoiding resource waste caused by allocating resources to nodes that cannot effectively support the service.
[0123] In summary of all the above embodiments, a resource scheduling method is further provided, as Figure 8 shown, the method includes:
[0124] S801, in the case of receiving a resource scheduling request, obtain the storage performance information of each storage node in the storage system.
[0125] S802, according to the storage performance information of each storage node and the resource scheduling request, extract the required storage performance information from the resource scheduling request, and determine the screening conditions according to the required storage performance information. Among them, the screening conditions include at least one of whether the storage node supports the preset protocol, whether the storage node reaches the maximum threshold of the exported volume, whether the number of input / output operations per second of the storage node reaches the number threshold, and whether the bandwidth of the storage node reaches the bandwidth threshold.
[0126] S803, determine the storage nodes that meet the screening conditions among all the storage nodes in the storage system as candidate storage nodes.
[0127] S804, obtain the screening model corresponding to the storage type, and substitute the storage performance information of each candidate storage node into the screening model for evaluation to obtain the evaluation scores corresponding to each candidate storage node.
[0128] S805, determine the first target storage node according to the evaluation scores corresponding to each candidate storage node.
[0129] S806. When there are multiple first target storage nodes in the first target storage node, send the evaluation scores and selection requests of each first target storage node to the cloud platform. The selection request is used to instruct the cloud platform to determine the second target storage node according to the evaluation scores of each first target storage node and the load performance of each first target storage node.
[0130] S807. Perform virtual resource scheduling on the second target storage node.
[0131] In the embodiments of this application, the structure of the resource scheduling system may be specifically as Figure 9 shown. The resource scheduling device may include a management module and a scheduling module. Each storage node may include a storage service module. The management module is respectively connected to the scheduling module and the storage service module, and is connected to the cloud platform through an API interface. The storage service module is used to create virtualization instances (such as VMs in the figure) on the corresponding storage nodes. It should be noted that the resource scheduling method in the embodiments of this application is implemented based on a hyper-converged architecture. Hyper-convergence means deploying cloud platform management services and storage services to the same set of clusters (that is, storage nodes and computing nodes are one node), so as to provide complete virtualization services externally through a set of hardware. Under this hyper-converged architecture, the data interaction process after scheduling virtual resources is as Figure 10 shown. This figure is the communication model of the vhost-user protocol. Among them, VHOST Client refers to the Virtio driver (user mode) in the virtual machine, which is used to initiate I / O requests; Shared Memory refers to the memory area shared by the front and back ends, which is used to efficiently transmit data (reduce data copying); VHOST Backend refers to the user-mode service (such as SPDK) on the host, which is used to process requests from the client; Socket is used for control channel communication between the front and back ends (such as negotiating the shared memory address).
[0132] Figure 10 The interaction process of the communication model in is that the Client and the Backend establish a connection through the Socket, negotiate the shared memory, and then the I / O data is directly transmitted through the Shared Memory, and the control signaling is transmitted through the Socket. Using this communication model can avoid frequent switching between the kernel mode and the user mode and significantly improve performance. As Figure 11As shown in the figure, this is the communication architecture between virtualized instances and storage SAN services on a computing / storage node, specifically showing the virtualized storage stack from Host OS to Guest OS, combining user-space (QEMU) and kernel-space (KVM) components. Among them, Host OS refers to the host operating system for running virtualization software (QEMU / KVM); QEMU refers to the user-space virtual machine manager responsible for simulating devices (such as Virtio devices); VM (Guest OS) refers to the guest operating system within the virtual machine running the Virtio driver; Virtio PCI Driver refers to the driver in the Guest OS kernel for communicating with Virtio devices; Virtio Device refers to the virtual device simulated by QEMU, providing a standardized I / O interface; Vhost-user Driver refers to the user-space driver that communicates directly with the backend service (such as Storage Service) through the vhost-user protocol, bypassing the kernel to improve performance; Storage Service refers to the user-space storage service (such as Ceph, SPDK) that processes storage requests of virtual machines; Virtqueue refers to the core mechanism of Virtio for the data transfer queue between the front-end (Guest) and the back-end (Host); vhost device refers to the vhost device in the kernel or user-space for accelerating Virtio data-plane processing (such as network or storage); San Storage Engine refers to the storage engine (such as SAN or distributed storage, i.e., storage service module 1031) for managing underlying physical storage devices; User / Kernelspace refers to the division between user-space and kernel-space, and KVM is responsible for CPU virtualization and runs in the kernel-space; physical storage includes SSD and HDD as the underlying storage media, which are managed by San Storage Engine. Figure 11 The data flow of the storage SAN service communication architecture in the figure is as follows: The Virtio driver of Guest OS sends I / O requests to the Host through Virtqueue; if vhost-user is used, the requests are directly passed to the Storage Service through the user-space (vhost-user driver) without passing through the kernel; if kernel vhost is used, the requests are processed by the vhost module of the kernel and then forwarded to the storage service; finally, the storage service reads and writes physical storage (SSD / HDD) through SanStorage Engine.
[0133] In the embodiments of this application, this application may specifically include a Storage Area Network (SAN) storage San service module, an affinity scheduling module, and a management communication module.
[0134] The San service module storage system can divide the physical disks in the cluster into logical blocks according to certain rules, and then combine the logical blocks into logical disks, and provide distributed high-availability block device services based on the logical disks. To improve performance and ensure high availability, the metadata module of the block device in the process memory maintains relevant information about the logical blocks, such as location, status, etc. The memory cache module temporarily stores frequently accessed data to speed up the reading speed. The high-performance disk cache module optimizes the read and write operations of the disk to improve efficiency. The log module records the operations and status of the system for fault recovery and monitoring. For the front end, it can provide the iscsi Ethernet transmission protocol, the storage area network protocol based on TCP / IP, and transmit block data through the network, as well as block device protocols such as nvme and vhost-user-blk (a protocol based on shared memory for direct communication of block devices between virtual machines and host machines). Both iscsi and nvme are network-based io protocols, while vhost-user is a protocol based on shared memory (a high-speed storage interface standard that supports the PCIe bus). By implementing the vhost-user protocol by the backend storage engine, zero-copy of data pages can be achieved for io requests from virtualization instances to the san storage engine.
[0135] The management communication module is responsible for receiving external management requests, such as creating a volume (dividing a new logical storage unit on the storage device), deleting the volume storage space (removing a logical storage unit from the storage device), mounting a volume (connecting a logical storage unit (volume) to a directory or drive in the operating system to make it available), etc. After receiving the request, it converts the request into a storage task and solidifies it into a task list, and sends the task to the San service module to process the request. When the processing result is obtained, it updates the solidified task status and returns the result to the caller (cloud platform). At the same time, it periodically collects io performance information on each physical server through the San module, including information such as iops, bandwidth, and the number of volumes within the period. After collecting this information, it performs calculations and persists it.
[0136] The affinity scheduling module consists of two parts: filter and weighter. The filter filters out the nodes that can provide the corresponding block services according to the volume type storage type of the request. Then, according to different performance type parameters in the request, through different algorithms, it scores the node storage performance data collected by the management module, sorts the scoring results, and returns the results to the requestor cloud platform.
[0137] The specific scheduling process in this embodiment includes the following steps: ① When the cloud platform creates a virtualized instance, it issues a request to create a block storage device to the storage cluster. ② After receiving the request, the storage management module sends a node selection request to the affinity scheduling module. ③ After obtaining the node selection request, the affinity scheduling module, through the filter module, selects nodes that can provide the vhost-user-blk protocol based on the block service protocols that each node can currently provide (for example, whether a certain point can communicate to provide the vhost-blk protocol, or whether a certain point has reached the maximum threshold of the exported volume, whether the iops has reached the maximum threshold, and whether the bandwidth has reached the maximum threshold). ④ Different io models result in different consumption of storage system resources. For example, the bandwidth type consumes more storage network resources of the storage cluster and requires a larger network bandwidth. The iops type is more sensitive to network latency and also occupies more cpu resources. Therefore, the affinity scheduling module performs a weighted calculation based on the result returned by the previous step of the filter and the performance type (performance type, balanced type, bandwidth type) in the node selection request:
[0138] Ci = current iops;
[0139] Mi = Node Max iops;
[0140] Cb = current bandwidth;
[0141] Mb = Node Max bandwidth;
[0142] Performance type: score = 0.7 * [(Mi - Ci) / Mi] + 0.3 * [(Mb - Cb) / Mb];
[0143] Balanced type: score = 0.5 * [(Mi - Ci) / Mi] + 0.5 * [(Mb - Cb) / Mb];
[0144] Bandwidth type: score = 0.3 * [(Mi - Ci) / Mi] + 0.7 * [(Mb - Cb) / Mb];
[0145] Sort according to the scores and return the sorted result to the management module. ⑤ The cloud platform, based on the obtained scores and the cpu load and memory load on the current computing node, creates a volume mapping for the corresponding computing node through the SAN module of the storage management module and schedules the virtualized instance to the corresponding computing node. Among them, the filter and weighter can be configured to load different types of filters and weighters, so that various filters and weighters can be developed continuously according to requirements, thus realizing the backward functional expansion feature of the affinity scheduling strategy.
[0146] Their configuration parameters are similar:
[0147] affinity_filters=protocol_filter,lun_filter,iops_filter,bw_filter;
[0148] Affinity_weighters=iops_weighter,bw_weighter,balance_weighter.
[0149] When the uneven distribution of virtualization instances causes uneven load of computing / memory resources on physical nodes, and the number of logical block devices on the nodes of virtualization schedulable instances has reached the upper limit, the virtualization instances and logical block devices can be scheduled to different physical nodes, and the io requests are forwarded through the San storage engine to improve the overall adaptability of the hyper-converged cluster.
[0150] The method described in the embodiments of this application aims to directly implement the vhost-user interface by the storage process in the hyper-converged scenario. When applying for storage resources on the cloud platform, the storage cluster collects, statistics, and calculates the storage-related performance metrics of each current node, and guides the cloud platform to schedule virtualization instances to the optimal nodes of the block devices provided by the storage service, so that the virtualization instances can obtain the best storage performance. The virtualization instances and logical volumes after affinity scheduling can be located on the same physical node. The vhost-user is implemented by the San storage engine. The virtualization instances located on the same physical node can achieve zero-copy of data through the vhost-user protocol, and the io requests do not pass through the network at all. The affinity scheduling module implemented by the filter and weighter concepts can select the types of algorithms to be loaded through configuration and support backward extension. The affinity scheduling module can select different weighter algorithms through request parameters to perform more reasonable affinity scheduling calculations. If the resources between physical nodes are unbalanced due to the imbalance between virtualization instances and logical block services, it can support the virtualization instances and logical blocks to be located on different nodes, and the io is forwarded through the San service engine through the network to improve the cluster adaptability. The affinity scheduling module implemented by the filter and weighter methods can achieve the affinity scheduling between virtualization instances and distributed storage logical volumes in the hyper-converged scenario. The affinity scheduling module can continuously collect the performance metric data of each physical node, and perform affinity scoring and sorting according to the request type through different algorithm strategies. When the resources are unbalanced, the virtualization instances and logical volumes may not be on the same physical node and are forwarded through the san storage engine.
[0151] The methods described in the above steps have been described in the foregoing embodiments. For detailed content, please refer to the foregoing description and will not be elaborated herein.
[0152] It should be understood that although each step in the flowcharts involved in the above-described embodiments is sequentially shown according to the indication of the arrows, these steps are not necessarily executed sequentially according to the order indicated by the arrows. Unless otherwise clearly stated in this article, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.
[0153] Based on the same inventive concept, the embodiments of the present application also provide a resource scheduling device for implementing the resource scheduling method involved above. The implementation solutions provided by this device to solve problems are similar to the implementation solutions described in the above method. Therefore, the specific limitations in one or more embodiments of the resource scheduling device provided below can refer to the limitations on the resource scheduling method in the above text and will not be elaborated herein.
[0154] In some embodiments, as Figure 12 shown, a resource scheduling device is provided, including:
[0155] An acquisition module 11, configured to acquire the storage performance information of each storage node in the storage system when receiving a resource scheduling request.
[0156] A screening module 12, configured to screen out a first target storage node from all storage nodes in the storage system according to the storage performance information of each storage node and the resource scheduling request.
[0157] A scheduling module 13, configured to perform virtual resource scheduling on the first target storage node.
[0158] In some embodiments, the above screening module includes:
[0159] A first screening unit, configured to extract the required storage performance information from the resource scheduling request and screen out multiple candidate storage nodes from all storage nodes in the storage system according to the required storage performance information.
[0160] A second screening unit, configured to screen out the first target storage node from the multiple candidate storage nodes according to the storage type in the resource scheduling request and the storage performance information of each candidate storage node.
[0161] In some embodiments, the above-mentioned second screening unit includes:
[0162] An acquisition subunit, configured to acquire a screening model corresponding to the storage type.
[0163] A first determination subunit, configured to determine a first target storage node according to the storage performance information of each candidate storage node and the screening model.
[0164] In some embodiments, the above-mentioned first determination subunit is specifically configured to substitute the storage performance information of each candidate storage node into the screening model for evaluation to obtain the evaluation scores corresponding to each candidate storage node; and determine the first target storage node according to the evaluation scores corresponding to each candidate storage node.
[0165] In some embodiments, the above-mentioned first determination subunit is specifically configured to send the evaluation scores and the point selection requests of each first target storage node to the cloud platform; the point selection request is used to instruct the cloud platform to determine a second target storage node according to the evaluation scores of each first target storage node and the load performance of each first target storage node; and perform virtual resource scheduling on the second target storage node.
[0166] In some embodiments, the above-mentioned first screening unit includes:
[0167] A second determination subunit, configured to determine a screening condition according to the required storage performance information; the screening condition includes at least one of whether the storage node supports a preset protocol, whether the storage node reaches the maximum threshold of the exported volume, whether the number of input / output operations per second of the storage node reaches the number threshold, and whether the bandwidth of the storage node reaches the bandwidth threshold.
[0168] A third determination subunit, configured to determine the storage nodes that meet the screening conditions among all the storage nodes in the storage system as candidate storage nodes.
[0169] Each module in the above-mentioned resource scheduling device can be implemented in whole or in part by software, hardware, and their combination. The above-mentioned modules can be embedded in the processor of the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form, so as to facilitate the processor to call and execute the operations corresponding to the above-mentioned each module.
[0170] In some embodiments, a computer device is provided. The computer device can be a terminal or a server, and its internal structure diagram can be as Figure 13As shown in the figure, the computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. The computer program, when executed by the processor, implements a resource scheduling method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0171] Those skilled in the art can understand that Figure 13 the structure shown in the figure is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0172] In some embodiments, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps of the resource scheduling method described in any of the above embodiments are implemented.
[0173] In some embodiments, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the resource scheduling method described in any of the above embodiments are implemented.
[0174] In some embodiments, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps of the resource scheduling method described in any of the above embodiments are implemented.
[0175] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0176] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0177] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A resource scheduling method, characterized in that, The resource scheduling method includes: Upon receiving a resource scheduling request, obtaining the storage performance information of each storage node in the storage system; Based on the storage performance information of each storage node and the resource scheduling request, screening out the first target storage node from all the storage nodes in the storage system; Performing virtual resource scheduling on the first target storage node.
2. The method according to claim 1, wherein The screening out the first target storage node from all the storage nodes in the storage system based on the storage performance information of each storage node and the resource scheduling request includes: Extracting the required storage performance information from the resource scheduling request, and screening out multiple candidate storage nodes from all the storage nodes in the storage system according to the required storage performance information; Based on the storage type in the resource scheduling request and the storage performance information of each candidate storage node, screening out the first target storage node from the multiple candidate storage nodes.
3. The method according to claim 2, wherein The screening out the first target storage node from the multiple candidate storage nodes based on the storage type in the resource scheduling request and the storage performance information of each candidate storage node includes: Obtaining a screening model corresponding to the storage type; Based on the storage performance information of each candidate storage node and the screening model, determining the first target storage node.
4. The method according to claim 3, characterized in that The determining the first target storage node based on the storage performance information of each candidate storage node and the screening model includes: Substituting the storage performance information of each candidate storage node into the screening model for evaluation to obtain the evaluation scores corresponding to each candidate storage node; Based on the evaluation scores corresponding to each candidate storage node, determining the first target storage node.
5. The method according to claim 4, wherein The first target storage node includes multiple first target storage nodes, and the method further includes: Sending the evaluation scores and the node selection request of each first target storage node to the cloud platform; the node selection request is used to instruct the cloud platform to determine the second target storage node according to the evaluation scores of each first target storage node and the load performance of each first target storage node; The performing virtual resource scheduling on the first target storage node includes: Performing virtual resource scheduling on the second target storage node.
6. The method according to claim 2, wherein The screening out multiple candidate storage nodes from all the storage nodes in the storage system according to the required storage performance information includes: Determining screening conditions according to the required storage performance information; the screening conditions include at least one of whether the storage node supports a preset protocol, whether the storage node reaches the maximum threshold of the exported volume, whether the number of input / output operations per second of the storage node reaches a threshold number, and whether the bandwidth of the storage node reaches a bandwidth threshold; Determining the storage nodes that meet the screening conditions among all the storage nodes in the storage system as the candidate storage nodes.
7. A resource scheduling device, characterized in that, The device includes: An obtaining module, configured to obtain the storage performance information of each storage node in the storage system upon receiving a resource scheduling request; A screening module, configured to screen out a first target storage node from all storage nodes in the storage system according to the storage performance information of each storage node and the resource scheduling request; A scheduling module, configured to perform virtual resource scheduling on the first target storage node.
8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Memory allocation method, memory configuration method, equipment, medium and program product
CN120560784A
Memory allocation method, memory allocation method, device, medium and program product
CN120560784B