Resource scheduling method, computer equipment, storage medium and program product
By receiving user scheduling requests in the entire cabinet system, establishing the resource calling relationship between the target host and the interface device, and using hot removal and hot addition technology, the problem of fixed resource allocation in conventional systems is solved, and dynamic equipment resources are realized. Scheduling and efficient utilization.
Patent Information
- Application Number
- CN202410845845.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-06-27
AI Technical Summary
In conventional whole-cabinet systems, the allocation relationship of general computing resources, heterogeneous acceleration resources, and storage resources is fixed, making it difficult to meet the dynamic scheduling needs of equipment resources within the system, resulting in low resource utilization efficiency.
By receiving the scheduling request input by the user, the resource calling relationship between the target host and the target interface device is established, and the interface device resources are dynamically adjusted using hot removal and hot addition technology to achieve flexible allocation and scheduling of resources.
It improves the utilization efficiency of equipment resources, realizes flexible allocation and rapid deployment of interface equipment resources, and improves the efficiency of dynamic allocation of equipment resources.
Smart Images

Figure CN118394533B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a resource scheduling method, computer equipment, storage medium and program product. Background Art
[0002] In recent years, in the Internet field, various differentiated computing scenarios have emerged one after another, such as artificial intelligence, machine learning, high-performance computing, etc. In order to meet these differentiated computing needs, server vendors often choose to split and decouple devices such as the central processing unit (CPU), graphics processing unit (GPU), non-volatile memory host controller interface specification (NVMe) hard disk, and integrate the resources of these devices through the whole cabinet, so as to achieve large-scale deployment and use of server products.
[0003] However, in conventional whole cabinet systems, the allocation relationship of device resources such as general computing resources (such as CPU resources), heterogeneous acceleration resources (such as GPU resources), and storage resources (such as NVMe hard disk resources) is generally fixed, which makes it difficult to meet the needs of dynamic scheduling of device resources within the system. Summary of the invention
[0004] In view of this, one or more embodiments of the present disclosure provide a resource scheduling method, a computer device, a storage medium, and a program product, which can realize dynamic allocation and adjustment of device resources and improve the utilization efficiency of device resources.
[0005] In a first aspect, the present disclosure provides a resource scheduling method, the method comprising: receiving a scheduling request input by a user, the scheduling request being used to indicate a target mapping relationship, the target mapping relationship representing a target host calling a resource of a target interface device; determining a physical location of the target interface device based on a current mapping relationship of the target interface device; hot removing the target interface device to disconnect the current mapping relationship of the target interface device; and hot adding the target interface device to the target host to establish the target mapping relationship between the target interface device and the target host.
[0006] In a second aspect, the present disclosure provides a resource scheduling device, which includes: a receiving module for receiving a scheduling request input by a user, the scheduling request is used to indicate a target mapping relationship, and the target mapping relationship represents the resources of a target interface device called by a target host; a determining module for determining a physical location of a target interface device based on a current mapping relationship of the target interface device; a removing module for hot removing the target interface device to disconnect the current mapping relationship of the target interface device; and an adding module for hot adding the target interface device to the target host to establish the target mapping relationship between the target interface device and the target host.
[0007] In a third aspect, the present disclosure provides a computer device, the electronic device comprising a memory and a processor, the memory being used to store a computer program, and the computer program, when executed by the processor, implements the above-mentioned resource scheduling method.
[0008] In a fourth aspect, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the above-mentioned resource scheduling method is implemented.
[0009] In a fifth aspect, the present disclosure provides a computer program product, including computer instructions, and the computer instructions are used to enable a computer to execute the above-mentioned resource scheduling method.
[0010] The technical solution provided by one or more embodiments of the present disclosure can establish a resource call relationship between a target host and a target interface device through a scheduling request, and can realize dynamic allocation and adjustment of interface device resources at the software level, thereby improving the utilization efficiency of device resources. In this process, by establishing a target mapping relationship, the resource allocation relationship that the user expects to achieve can be accurately transmitted. Through the current mapping relationship of the target device, the position of the target interface device can be quickly locked, which is conducive to improving the efficiency of device resource reallocation. In addition, based on the technical means of hot removal and hot addition, the redeployment of interface device resources can be quickly completed, further improving the efficiency of dynamic allocation of device resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The features and advantages of the embodiments of the present disclosure may be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present disclosure in any way. In the accompanying drawings:
[0012] Figure 1 A schematic diagram showing the steps of a resource scheduling method in one embodiment of the present disclosure is shown;
[0013] Figure 2 A schematic diagram of the system structure of a whole cabinet system in one embodiment of the present disclosure is shown;
[0014] Figure 3 A schematic diagram of the system architecture of another whole cabinet system in one embodiment of the present disclosure is shown;
[0015] Figure 4 A schematic diagram of a resource scheduling method in one embodiment of the present disclosure is shown;
[0016] Figure 5 A schematic diagram showing the steps of a templated resource scheduling method in one embodiment of the present disclosure is shown;
[0017] Figure 6 A schematic diagram showing a process flow of a panelized resource scheduling method in one embodiment of the present disclosure is shown;
[0018] Figure 7 A schematic diagram of functional modules of a resource scheduling device in one embodiment of the present disclosure is shown;
[0019] Figure 8 A schematic diagram of the hardware structure of a computer device in one embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0021] In the related technology, general computing resource devices (such as CPU resources), heterogeneous acceleration resource devices (such as GPU resources), storage resource devices (such as NVMe hard disk resources) and other devices can be integrated into a whole cabinet system in a modular form through device interfaces, thereby realizing large-scale deployment and use of server products. However, in conventional whole cabinet systems, the resource scheduling and allocation relationship between these devices is generally fixed, which makes it difficult to meet the needs of dynamic scheduling of device resources within the system.
[0022] In view of this, the resource scheduling method provided by one or more embodiments of the present disclosure can realize the dynamic allocation and adjustment of device resources and improve the utilization efficiency of device resources. Figure 1 , a resource scheduling method provided in one embodiment of the present disclosure may include the following steps.
[0023] S1: receiving a scheduling request input by a user, wherein the scheduling request is used to indicate a target mapping relationship, wherein the target mapping relationship represents a resource that a target host calls a target interface device.
[0024] In this embodiment, the target host may be a host device including computing resources, which may be responsible for executing program instructions, processing data, controlling other devices, etc. The target interface device may be a heterogeneous acceleration resource device, a storage resource device, etc., which may be controlled by the host device and may call resources by the host device. Under the control of the target host, the target interface device may work in coordination with the target host to jointly realize some computing system functions.
[0025] In this embodiment, the scheduling request input by the user can be received in a variety of ways, such as a touch screen, screen input, keyboard input, voice command, physical switch, etc. According to the user's input request, the target mapping relationship that the user expects to achieve can be determined. According to the target mapping relationship, a target host can be adjusted to use the resources of a new target interface device, and the resources of a target interface device can also be used by the new target host. In this way, flexible allocation and scheduling of interface device resources can be achieved.
[0026] In some implementations, the current use state of an interface device may be detected. By determining an indicator reflecting the current use state of the interface device (e.g., resource utilization of the interface device, average power consumption within a preset period, operating temperature, etc.), and comparing the result with a predetermined threshold, it may be determined that the interface device is in an idle, normal, high-load, etc. state. According to the different use states of the interface device, a prompt message may be sent to the user to guide the user to issue a scheduling request.
[0027] Optionally, after counting the usage status of different interface devices through preset formulas, analysis models, etc., optional scheduling request items can be generated for user selection to further improve resource scheduling efficiency.
[0028] In some implementations, the target interface device may include a heterogeneous acceleration device in the first resource pool and a storage device in the second resource pool. The target mapping relationship may be that the target host calls the resources of at least one heterogeneous acceleration device, or the target host calls the resources of at least one storage device. The target mapping relationship may also be that the target host calls the resources of at least one heterogeneous acceleration device while calling the resources of at least one storage device. The target mapping relationship may also be that the target host calls the resources of other interface devices (such as a network card, a sound card, etc.).
[0029] In actual application scenarios, the heterogeneous acceleration device may include at least one of a graphics processing unit, a digital signal processor, a field programmable gate array, an application-specific integrated circuit, etc. The storage device may include at least one of a non-volatile memory host controller interface specification hard disk, a hard disk drive, a solid-state drive, a memory, a mountain drive, a memory card, a storage tape, etc.
[0030] In some embodiments, the resource scheduling method can be applied to a switching device. The first number of candidate hosts and the second number of candidate interface devices can be indirectly connected through a switching device. A candidate physical path can be provided between any candidate host and any candidate interface device. These candidate physical paths can be used to configure a data link. The data link can be used to establish a mapping relationship. Optionally, the switching device can uniformly use a peripheral component interconnect express (PCIe) type port to connect the candidate host and the candidate interface device.
[0031] By connecting multiple hosts and multiple interface devices through switching devices and connecting the physical path between any host and any interface device, the hardware foundation of the resource scheduling method is guaranteed. A mapping relationship is established based on the configured data link, which ensures that the resource scheduling task can be quickly deployed at the software level.
[0032] In some embodiments, the switching device may include a third number of switching chips, and the switching chips are connected in pairs. Any switching chip may include a fourth number of switching chip ports. The switching chip port may be physically connected to the candidate host or the candidate interface device. The switching chip port may be a PCIe type port.
[0033] The switching device includes multiple switching chips, and each switching chip has multiple chip ports, which ensures that the switching device can connect to a large number of hosts and interface devices at the same time, improving the resource processing capacity of the entire cabinet.
[0034] See also Figure 2 In a practical application example, a whole cabinet system can support 8 hosts, 16 GPUs, and 64 NVMe hard disks. Among them, the 8 hosts are located in 8 host boxes, the 16 GPUs are located in a GPU box, and the 64 NVMe hard disks are distributed in 4 hard disk boxes, each of which has 16 NVMe hard disks. Through a switching device box, the 16 GPUs in the GPU box and the 64 NVMe hard disks in the 4 hard disk boxes can be connected at the same time.
[0035] There can be 8 switch chips inside the switch device box, and each switch chip can have 9 switch chip ports. The switch chips are connected to each other to ensure that a host connected to a switch chip can have a physical path with an interface device connected to another switch chip.
[0036] In order to facilitate software management and maintenance of the resource allocation relationship between the host and the interface devices in the entire system, the above hardware can be identified by numbering. For example, the box number of the host can be set to 0 to 7 according to the position of the host box in the cabinet. The box number of the GPU can be set according to the position of the GPU box in the entire cabinet. The device number of the GPU can be set to 0 to 15 according to the position of each GPU in a single GPU box. The box number of the NVMe hard disk can be set according to the position of the hard disk box in the entire cabinet. The device number of the NVMe hard disk can be set to 0 to 15 according to the position of each NVMe hard disk in a single hard disk box. The switch chip number can be set to 0 to 7 according to the position of the switch chip in the switch device box. The chip port number can be set to 0 to 8 according to the definition of each switch chip port inside a single switch chip.
[0037] S2: Determine the physical location of the target interface device according to the current mapping relationship of the target interface device.
[0038] In this embodiment, in order to realize the resource configuration of the target interface device, it is necessary to accurately determine the actual physical location of the resource so as to configure and manage the data link thereof. The physical location of the target interface device can be determined by querying the current mapping relationship of the target interface device. The physical location of the target interface device can be determined by the parameters recorded in the mapping relationship.
[0039] In some embodiments, the target interface device may be encapsulated in an interface device box, and to determine the physical location of the target interface device, the box identification and the device identification of the target interface device may be determined first. Then, based on the box identification, the target interface device box corresponding to the target interface device and the first physical location of the target interface device box may be determined. Through the device identification, the second physical location of the target interface device in the target interface device box may be further determined. Based on the first physical location and the second physical location, the specific physical location of the target interface device may be determined.
[0040] In some implementations, the target mapping relationship between the target host and the target interface device can be recorded to generate an allocation relationship table. The allocation relationship table can monitor the current scheduling status of the target interface device. The allocation relationship table can also quickly provide the location information of the target interface device when scheduling device resources next time. Optionally, some preset data formats can be used to record the target mapping relationship between the target host and the target interface device. For example, the json format can be used, which not only reduces the amount of data storage, but also is easy to read and edit.
[0041] In a practical application example, an allocation relationship table may be shown as follows:
[0042] {
[0043] "Host Box_ID": "0",
[0044] "Switch ID": "0",
[0045] "Switch_Port ID": "4",
[0046] "Device": [
[0047] {
[0048] "GPU Box_ID": "0",
[0049] "GPU ID": "3",
[0050] "Switch ID": "0",
[0051] "Switch_Port ID": "5",
[0052] },
[0053] {
[0054] "NVMe Box_ID": "1",
[0055] "NVMe ID": "5",
[0056] "Switch ID": "0",
[0057] "Switch_Port ID": "6",
[0058] } ]
[0060] }.
[0061] Among them, Host Box_ID can represent the box ID of the host. GPU Box_ID can represent the box ID of the GPU, and GPU ID can represent the device ID of the GPU. NVMe Box_ID can represent the box ID of the NVMe hard disk, and NVMe ID can represent the device ID of the NVMe hard disk. Switch ID can represent the device ID of the switch chip in the switch device box. Switch_Port ID can represent the chip port ID of the switch chip.
[0062] It can be seen that according to the allocation relationship table, it can be clearly understood which port of the switching device a host in a host box with a specified number is connected to, and which interface devices connected to the switching device ports have data link relationships with. At the same time, the name and location of the interface device connected to the host are recorded.
[0063] S3: hot-remove the target interface device to disconnect the current mapping relationship of the target interface device.
[0064] In this embodiment, the target interface device is hot-removed, and the interface device can be conveniently removed without affecting the operation of the host, thereby reducing maintenance time and cost and improving resource scheduling efficiency.
[0065] In this embodiment, hot removal of the target interface device may be to disconnect the current data link of the target interface device and maintain the current physical path of the target interface device. The disconnected data link realizes the recovery of device resources, and the maintained physical path ensures the reuse of device resources.
[0066] In some implementations, a reset instruction may be sent to the target interface device, and the reset target interface device may be hot-added to the target host. The reset operation may ensure the state consistency of the target interface device, and may ensure that the device is restored to the initial state, thereby avoiding problems with new connections caused by previous state or configuration problems. The reset operation may also clear potential errors, and may clear possible error states or abnormal data in the device, in preparation for reconnection. After resetting the device, it may ensure that the target interface device is in the best state for the next hot-add, thereby reducing the risk of connection failure.
[0067] S4: hot-adding the target interface device to the target host to establish the target mapping relationship between the target interface device and the target host.
[0068] In this embodiment, hot-adding a target interface device can conveniently add an interface device without affecting the operation of the host, reducing maintenance time and cost and improving resource scheduling efficiency. Establishing a target mapping relationship between a target interface device and a target host can ensure that the target host can call the resources of the target interface device, thereby realizing the recycling and optimal configuration of device resources.
[0069] In some implementations, the target interface device is hot added to the target host, and the target data link between the target host and the target interface device can be configured according to the target physical path in the candidate physical paths. The target physical path can be formed by connecting the target host and the target interface device by a switching device.
[0070] See also Figure 3 In a practical application example, in a whole cabinet system, the host and the interface device can be interconnected in a pool through a high-performance switching device. The host can be located in a host box, and multiple host boxes can form a general computing resource pool. The interface devices can be located in their respective interface device boxes, and multiple interface device boxes can form an interface device resource pool with input / output (IO) interfaces. The switching device can connect and manage the devices in the general computing resource pool and the interface device resource pool. The switching device can be a switching device box, which can include a pooling management engine, a dedicated physical channel, and a dedicated software interface for interacting with the user.
[0071] The pooling management engine in the switching device can centrally manage and control the devices in all resource pools through programmable interactive interfaces, such as Universal Asynchronous Receiver / Transmitter (UART). Through the UART interface, the pooling management engine can dynamically configure the data link properties of the IO ports of different devices. In different application scenarios, the pooling management engine can be compatible with a variety of hosts and interface devices.
[0072] The pooled management engine in the switching device can also provide an application programming interface (API) for the entire cabinet management platform, such as a representational state transfer (REST) style API, to ensure that the entire cabinet management platform centrally schedules and manages the resources of the resource pool.
[0073] See also Figure 4In an actual application example, users can use the application programming interface provided by the pooling management engine to perform operations such as on-demand allocation, dynamic scaling, and resource release for computing resources, interface device resources, etc. The specific design is as follows: users can call different numbers of interface device resources to match computing nodes according to load requirements. When some interface device resources are temporarily unloaded, users can release the resources back to the entire interface device resource pool for use by other computing nodes, thereby achieving efficient circulation and full utilization of interface device resources. Assuming that an interface device is dynamically adjusted from one host to another, the specific dynamic resource switching process can be as follows.
[0074] 1. The user initiates a resource dynamic adjustment request based on the load of the interface device resources (such as heterogeneous acceleration resources) on host A to adjust the interface device B that has no resource load;
[0075] 2. The pooling management engine obtains the switch chip identifier, switch chip port identifier, device box identifier, and device identifier of the interface device B according to the mapping relationship between the host A and the interface device B provided by the whole cabinet management platform;
[0076] 3. The pooling management engine confirms the physical location of interface device B;
[0077] 4. The pooling management engine sends a UART command to the switch chip to hot-remove interface device B;
[0078] 5. The whole cabinet management platform sends a reset signal to interface device B;
[0079] 6. Interface device B completes the reset and can send reset feedback information to the pooling management engine;
[0080] 7. The pooling management engine sends a UART command to the switch chip to hot-add interface device B to another host C.
[0081] It should be noted that the user can obtain the load status of the interface device resources on host A by monitoring each host through the whole cabinet management platform, or each host can actively report according to preset rules (such as some trigger conditions for low-load devices).
[0082] See also Figure 5 , a resource scheduling method provided in an embodiment of the present disclosure may also include the following steps.
[0083] S21: In response to a selection instruction input by a user, a preset scheduling template is read.
[0084] S22: According to at least one set of expected mapping relationships included in the scheduling template, configure the host and the interface device involved in the scheduling template to implement the expected mapping relationship, where the expected mapping relationship represents the expected host calling the resources of the expected interface device.
[0085] In this embodiment, the specific method and content of realizing the desired mapping relationship can refer to the above steps S1 to S4, which will not be repeated here.
[0086] It should be noted that in order to meet the rapid switching of interface device resources in various application scenarios, that is, the flexible and dynamic scheduling of interface device resources in different application scenarios, the present disclosure also defines scheduling templates corresponding to multiple typical application scenarios. In each template, some expected mapping relationships between the host and the interface device are pre-set, and these expected mapping relationships may be some optimized mapping relationships for the scenario. The determination of these expected mapping relationships can be predetermined based on historical data and can be generated through model training. Based on the scheduling templates for typical application scenarios, resource scheduling can be performed quickly and automatically, which can improve the scheduling efficiency of device resources.
[0087] In a practical application example, the content of a scheduling template can be as follows:
[0088] {
[0089] "Host Box_ID": "0",
[0090] "Switch ID": "0",
[0091] "Switch_Port ID": "4",
[0092] "Device": [
[0093] {
[0094] "GPU Box_ID": "0",
[0095] "GPU ID": "3",
[0096] "Switch ID": "0",
[0097] "Switch_Port ID": "5",
[0098] },
[0099] ………N devices ]
[0101] }
[0102] …
[0103] {
[0104] "Host Box_ID": "8",
[0105] "Switch ID": "8",
[0106] "Switch_Port ID": "4",
[0107] "Device": [
[0108] {
[0109] "GPUB Box_ID": "0",
[0110] "GPU ID": "13",
[0111] "Switch ID": "0",
[0112] "Switch_Port ID": "15",
[0113] },
[0114] ………N devices ]
[0116] }.
[0117] In the scheduling template, mapping relationships between multiple hosts and interface devices can be determined. When the scheduling template is successfully applied, each host can use the resources of the corresponding interface device according to the respective mapping relationships.
[0118] In some implementations, a template switching request input by a user may be received. According to the template switching request, the mapping relationship between the candidate host and the candidate interface device may be changed from the first expected mapping relationship in the first template to the second expected mapping relationship in the second template.
[0119] Specifically, the first expected mapping relationship and the second expected mapping relationship can be compared to determine the distinguished hosts and the distinguished interface devices. According to the second expected mapping relationship, the mapping relationship corresponding to the distinguished hosts and the mapping relationship corresponding to the distinguished interface devices are configured. In this process, the mapping relationships of some hosts and some interface devices that exist in common in the first expected mapping relationship and the second expected mapping relationship can be retained to avoid repeated scheduling.
[0120] Since different scheduling templates are defined, the scheduling and configuration of device resources can be automatically achieved by receiving template switching requests input by users through touch, screen input, keyboard input, voice commands, physical switches, etc., without the need for users to repeatedly add multiple scheduling requests, thereby improving resource scheduling efficiency.
[0121] See also Figure 6 In a practical application example, based on the actual load of the device resources, the user can initiate a request to switch the scheduling template according to the prompt information of the whole cabinet management platform. The pooling management engine can respond to the template switching request to achieve rapid deployment of multiple device resources in the interface device resource pool. The specific process can be as follows:
[0122] 1. The user initiates a templated resource dynamic scheduling request based on the load;
[0123] 2. The whole cabinet management platform compares the current mapping relationship between multiple hosts and interface devices with the expected mapping relationship in the template configuration file, confirms the switch chip identifier, switch chip port identifier, device box identifier and device identifier of the first interface device to be released, and sends a first application programming interface instruction to the pooling management engine;
[0124] 3. The pooling management engine sends a UART command to the switch chip to hot-remove the first interface device;
[0125] 4. The whole cabinet management platform queries the current device mapping relationship and sends a reset signal to the corresponding first interface device;
[0126] 5. The whole cabinet management platform compares the current mapping relationship between multiple hosts and interface devices with the expected mapping relationship in the template configuration file, confirms the switch chip identifier, switch chip port identifier, device box identifier and device identifier of the second interface device to be hot-added, and sends a second application programming interface instruction to the pooling management engine;
[0127] 6. The pooling management engine sends a UART command to the switch chip to hot-add the second interface device;
[0128] 7. The whole cabinet management platform updates and records the current mapping relationship between multiple hosts and interface devices, and completes the dynamic scheduling of templated resources.
[0129] It should be noted that, in the process of performing templated resource dynamic scheduling, the premise for hot removal of an interface device is that the business related to the interface device has ended, so as to avoid system failure or business accident.
[0130] The technical solution provided by one or more embodiments of the present disclosure can establish a resource call relationship between a target host and a target interface device through a scheduling request, and can realize dynamic allocation and adjustment of interface device resources at the software level, thereby improving the utilization efficiency of device resources. In this process, by establishing a target mapping relationship, the resource allocation relationship that the user expects to achieve can be accurately transmitted. Through the current mapping relationship of the target device, the position of the target interface device can be quickly locked, which is conducive to improving the efficiency of device resource reallocation. In addition, based on the technical means of hot removal and hot addition, the redeployment of interface device resources can be quickly completed, further improving the efficiency of dynamic allocation of device resources.
[0131] The technical solution provided by one or more embodiments of the present disclosure provides multiple scheduling templates for users to use for typical application scenarios, which can quickly realize the dynamic scheduling of equipment resources. At the same time, it can support online dynamic switching of different resource scheduling templates, and realize the rapid deployment of multiple devices in the equipment resource pool without affecting all services in the entire cabinet system.
[0132] The present disclosure also provides a resource scheduling device, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0133] See also Figure 7 , a resource scheduling device provided by an embodiment of the present disclosure includes:
[0134] The receiving module 100 is used to receive a scheduling request input by a user, wherein the scheduling request is used to indicate a target mapping relationship, wherein the target mapping relationship represents a resource that a target host calls a target interface device;
[0135] A determination module 200, configured to determine a physical location of the target interface device according to a current mapping relationship of the target interface device;
[0136] A removal module 300, configured to hot-remove the target interface device to disconnect the current mapping relationship of the target interface device;
[0137] The adding module 400 is used to hot-add the target interface device to the target host to establish the target mapping relationship between the target interface device and the target host.
[0138] In one embodiment, the method is applied to a switching device, a first number of candidate hosts and a second number of candidate interface devices are indirectly connected through the switching device, a candidate physical path is provided between any of the candidate hosts and any of the candidate interface devices, the candidate physical path is used to configure a data link, and the data link is used to establish a mapping relationship.
[0139] In one embodiment, the switching device includes a third number of switching chips, the switching chips are connected in pairs, and any of the switching chips includes a fourth number of switching chip ports, and the switching chip ports are used to physically connect the candidate host or the candidate interface device.
[0140] In one embodiment, the adding module 400 is specifically used to configure the target data link between the target host and the target interface device according to the target physical path in the candidate physical path, and the target physical path is formed by the switching device connecting the target host and the target interface device.
[0141] In one embodiment, the removal module 300 is specifically used to disconnect the current data link of the target interface device and maintain the current physical path of the target interface device; send a reset instruction to the target interface device; and hot-add the reset target interface device to the target host.
[0142] In one embodiment, the target interface device includes a heterogeneous acceleration device in a first resource pool and a storage device in a second resource pool, and the target mapping relationship includes: the target host calls a resource of at least one of the heterogeneous acceleration devices, and / or the target host calls a resource of at least one of the storage devices.
[0143] In one embodiment, the heterogeneous acceleration device includes a graphics processing unit, and the storage device includes a non-volatile memory host controller interface specification hard disk.
[0144] In one embodiment, the target interface device is encapsulated in an interface device box, and the determination module 200 is specifically used to determine the box identification and the device identification of the target interface device; based on the box identification, determine the target interface device box corresponding to the target interface device, and the first physical position of the target interface device box; based on the device identification, determine the second physical position of the target interface device in the target interface device box; and determine the physical position of the target interface device according to the first physical position and the second physical position.
[0145] In one embodiment, the apparatus further includes a recording module 500 for recording the target mapping relationship between the target host and the target interface device in a preset data format to generate an allocation relationship table, wherein the preset data format includes a json format.
[0146] In one embodiment, the device also includes a template selection module 600, which is used to read a preset scheduling template in response to a selection instruction input by a user; configure the host and interface device involved in the scheduling template according to at least one set of expected mapping relationships contained in the scheduling template to achieve the expected mapping relationship, and the expected mapping relationship represents the expected host calling the resources of the expected interface device.
[0147] In one embodiment, the device also includes a template selection module 600, which is also used to receive a template switching request input by a user; according to the template switching request, the mapping relationship between the candidate host and the candidate interface device is changed from the first expected mapping relationship in the first template to the second expected mapping relationship in the second template.
[0148] In one embodiment, the device also includes a template selection module 600, which is specifically used to compare the first expected mapping relationship and the second expected mapping relationship to determine the distinguishing host and the distinguishing interface device; according to the second expected mapping relationship, configure the mapping relationship corresponding to the distinguishing host and the mapping relationship corresponding to the distinguishing interface device.
[0149] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0150] The resource scheduling device in this embodiment is presented in the form of a functional unit, where the module refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0151] The present disclosure also provides a computer device having the above Figure 7 The resource scheduling device shown.
[0152] See also Figure 8 , Figure 8 is a schematic diagram of a computer device provided by one embodiment of the present disclosure, such as Figure 8As shown, the computer device comprises: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other, and can be installed on a common mainboard or installed in other ways as required. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operation (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.
[0153] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0154] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0155] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0156] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0157] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.
[0158] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device may be a touch screen.
[0159] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0160] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0161] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the device, computer equipment, storage medium and program product, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0162] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
[0163] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A resource scheduling method, characterized in that: The method comprises: Receiving a scheduling request input by a user, wherein the scheduling request is used to indicate a target mapping relationship, wherein the target mapping relationship represents a resource that a target host calls a target interface device; Determining the physical location of the target interface device according to the current mapping relationship of the target interface device; Hot-removing the target interface device to disconnect the current mapping relationship of the target interface device; Hot-adding the target interface device to the target host to establish the target mapping relationship between the target interface device and the target host; In response to a selection instruction input by a user, a preset scheduling template is read; According to at least one set of expected mapping relationships included in the scheduling template, the host and the interface device involved in the scheduling template are configured to implement the expected mapping relationship, wherein the expected mapping relationship represents the expected host calling the resources of the expected interface device.
2. The method according to claim 1, characterized in that The method is applied to a switching device, a first number of candidate hosts and a second number of candidate interface devices are indirectly connected through the switching device, a candidate physical path is provided between any of the candidate hosts and any of the candidate interface devices, the candidate physical path is used to configure a data link, and the data link is used to establish a mapping relationship.
3. The method according to claim 2, characterized in that The switching device includes a third number of switching chips, the switching chips are connected in pairs, any of the switching chips includes a fourth number of switching chip ports, and the switching chip ports are used to physically connect to the candidate host or the candidate interface device.
4. The method according to claim 2 or 3, characterized in that: The hot-adding of the target interface device to the target host comprises: A target data link between the target host and the target interface device is configured according to a target physical path among the candidate physical paths, wherein the target physical path is formed by the switching device connecting the target host and the target interface device.
5. The method according to claim 2 or 3, characterized in that: The hot removal of the target interface device comprises: Disconnecting the current data link of the target interface device and maintaining the current physical path of the target interface device; Sending a reset instruction to the target interface device; The reset-completed target interface device is hot-added to the target host.
6. The method according to claim 1, characterized in that The target interface device includes a heterogeneous acceleration device in the first resource pool and a storage device in the second resource pool, and the target mapping relationship includes: The target host calls resources of at least one of the heterogeneous acceleration devices, and / or the target host calls resources of at least one of the storage devices.
7. The method according to claim 6, characterized in that The heterogeneous acceleration device includes a graphics processing unit, and the storage device includes a non-volatile memory host controller interface specification hard disk.
8. The method according to claim 1, characterized in that The target interface device is enclosed in an interface device box, and determining the physical location of the target interface device includes: Determine the box identification and device identification of the target interface device; Based on the box identifier, determining a target interface device box corresponding to the target interface device and a first physical location of the target interface device box; determining a second physical location of the target interface device in the target interface device box based on the device identification; The physical location of the target interface device is determined according to the first physical location and the second physical location.
9. The method according to claim 1, characterized in that: The method further comprises: A preset data format is used to record the target mapping relationship between the target host and the target interface device to generate an allocation relationship table, and the preset data format includes a json format.
10. The method according to claim 1, characterized in that The method further comprises: Receive a template switching request input by a user; According to the template switching request, the mapping relationship between the candidate host and the candidate interface device is changed from the first expected mapping relationship in the first template to the second expected mapping relationship in the second template.
11. The method according to claim 10, characterized in that The step of changing the mapping relationship between the candidate host and the candidate interface device from the first expected mapping relationship in the first template to the second expected mapping relationship in the second template includes: Comparing the first expected mapping relationship with the second expected mapping relationship to determine a distinguishing host and a distinguishing interface device; According to the second expected mapping relationship, the mapping relationship corresponding to the different hosts and the mapping relationship corresponding to the different interface devices are configured.
12. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the resource scheduling method according to any one of claims 1 to 11 by executing the computer instructions.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the resource scheduling method according to any one of claims 1 to 11.
14. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the resource scheduling method according to any one of claims 1 to 11.
