Request processing method and system
By establishing a transmission path between the distributed file system and the graphics processor, and selecting the appropriate transmission protocol and allocating sub-path according to the data attributes, the data transmission efficiency problem in multi-task parallel scenarios is solved, and efficient and low-latency data transmission is achieved.
Patent Information
- Application Number
- CN202412000467.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-12-31
AI Technical Summary
In the data transmission process, especially in the graphics processor (GPU) environment, it is difficult to achieve efficient data transmission in multi-task parallel scenarios, and a unified transmission protocol cannot meet the low-latency requirements of high-reality tasks, affecting the transmission efficiency of big data segments.
Parallel data transmission is achieved by establishing a transmission path between the distributed file system and the graphics processor and dividing multiple sub-paths according to the target physical memory address. According to the properties of multiple data segments of the target data (such as data size, data type, and priority), the most appropriate transmission protocol is selected, and the data segments are allocated to different transmission subpaths based on the task load and priority.
Customized data transmission methods are realized, allowing data of different types and sizes to be transmitted using the most suitable protocol, avoiding the inefficiency and delay of the "one-size-fits-all" method and improving transmission efficiency.
Smart Images

Figure CN119739656A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data storage, and in particular to a request processing method and system. Background Art
[0002] With the widespread application of graphics processing units (GPUs) in high-performance computing, artificial intelligence training, and graphics rendering, the demand for real-time transmission and efficient processing of large-scale data is increasing.
[0003] However, in the data transmission process, when the load of the transmission path is too high, the relevant technology is likely to cause a transmission bottleneck, making it difficult to achieve efficient data transmission in multi-task parallel scenarios. In addition, the "one-size-fits-all" approach of using a unified transmission protocol for processing can neither provide sufficient low-latency guarantees for high-real-time tasks nor reduce the transmission efficiency of large data segments. Summary of the invention
[0004] The embodiments of the present disclosure provide a request processing method and system, aiming to solve the problems existing in the above-mentioned background technology.
[0005] In order to solve the above technical problems, the present disclosure is implemented as follows: In a first aspect, an embodiment of the present disclosure provides a request processing method, the method comprising: In response to the data operation request, determining a target physical memory address applied for in the graphics processor for target data to be accessed by the data operation request; Based on the target physical memory address, establishing a transmission path between the distributed file system and the graphics processor, wherein the transmission path includes at least one transmission sub-path; Dividing the target data into a plurality of data segments with different data attributes, wherein the data attributes at least include: data size, data type and priority; Selecting corresponding target transmission protocols for the multiple data segments according to the data sizes and data types of the multiple data segments of the target data, and allocating the multiple data segments to different transmission sub-paths based on the task load of each of the at least one transmission sub-path and the priorities of the multiple data segments; Determining a target location of the target data in the distributed file system according to the data operation request; Based on the target transmission protocols of the multiple data segments of the target data, the multiple data segments are transmitted in parallel from the target locations in the distributed file system to the target physical memory addresses of the graphics processor through the at least one transmission sub-path.
[0006] Optionally, establishing a transmission path between a distributed file system and the graphics processor based on the target physical memory address includes: Determine meta information of an RDMA data transmission request corresponding to the data operation request, wherein the meta information of the RDMA data transmission request at least includes a target DMA address corresponding to the target physical memory address; RDMA programming is performed based on the meta information of the RDMA data transmission request to generate a transmission path between the distributed file system and the graphics processor.
[0007] Optionally, the determining the meta information of the RDMA data transmission request corresponding to the data operation request includes: Generate a corresponding RDMA data transmission request according to the data operation request; Parsing the RDMA data transmission request through the distributed file system to determine a target DMA address corresponding to the graphics processor; The transmitting the multiple data segments in parallel from the target location in the distributed file system to the target physical memory address of the graphics processor through the at least one transmission sub-path includes: acquiring the multiple data segments of the target data from the target location in the distributed system; copying the multiple data segments of the target data to the target DMA address, and transmitting the multiple data segments of the target data in parallel to the target physical memory address of the graphics processor through the at least one transmission sub-path.
[0008] Optionally, after determining the target physical memory address applied for in the graphics processor for the target data to be accessed by the data operation request, the method further includes: Obtaining a first mapping relationship between a physical memory address and a virtual memory address; Based on the first mapping relationship, mapping the target physical memory address to a corresponding target virtual memory address; The determining of the meta information of the RDMA data transmission request corresponding to the data operation request includes: Obtain a second mapping relationship between the virtual memory address and the DMA address; Based on the second mapping relationship, mapping the target virtual memory address to a corresponding target DMA address; The target DMA address is determined as meta-information of the RDMA data transmission request.
[0009] Optionally, selecting corresponding target transmission protocols for the multiple data segments according to the data size and data type of each of the multiple data segments of the target data, and allocating the multiple data segments to different transmission sub-paths based on the task load of each of the at least one transmission sub-path and the priority of each of the multiple data segments, comprises: According to the data size and data type of each of the multiple data segments of the target data, the multiple data segments are divided into a first type of data segments and a second type of data segments, wherein the data size of the first type of data segments is less than a first preset threshold and the data type is real-time data, and the data size of the second type of data segments is greater than the first preset threshold and the data type is non-real-time data, the real-time data at least includes audio and video data or control data, and the non-real-time data at least includes file data and backup data; Determine the User Datagram Protocol as the target transmission protocol for the first type of data segments, and determine the Transmission Control Protocol as the target transmission protocol for the second type of data segments; According to the respective priorities of the multiple data segments, the multiple data segments are allocated to different transmission sub-paths, wherein the data segments with priorities higher than the second preset threshold are preferentially allocated to the transmission sub-paths with task loads lower than the third preset threshold, and the data segments with priorities lower than the second preset threshold are preferentially allocated to the transmission sub-paths with task loads higher than the third preset threshold.
[0010] Optionally, determining a target location of the target data in the distributed file system according to the data operation request includes: Parsing the data operation request to obtain request content of the data operation request; Determining a file handle of a file where the target data is located from the request content of the data operation request; According to the file handle, the distributed file system is traversed to determine the target data and the target position of the target data in the distributed file system.
[0011] Optionally, in response to the data operation request, determining a target physical memory address applied for in the graphics processor for target data to be accessed by the data operation request includes: Parsing the data operation request to obtain the request content of the data operation request; Determining a memory address requested in the graphics processor and a data length of the target data from the request content of the data operation request; According to the memory address applied for in the graphics processor and the data length of the target data, a corresponding target physical memory address in the graphics processor is determined.
[0012] Optionally, after transmitting the plurality of data segments from the target locations in the distributed file system to the target physical memory addresses of the graphics processor in parallel through the at least one transmission sub-path based on the respective target transmission protocols of the plurality of data segments of the target data, the method further includes: When it is detected that the multiple data segments of the target data are completely transmitted to the target physical memory address of the graphics processor, a response signal indicating that the request is executed successfully is returned; In response to the response signal, an execution status of the data operation request is updated.
[0013] In a second aspect, an embodiment of the present disclosure provides a request processing system, which is applied to execute the steps of a request processing method, including: a graphics processor file system driver, a file system client and a distributed file system; the file system client is deployed with a network card and a graphics processor, and the graphics processor is connected to the distributed file system through the network card; The graphics processor file system driver is used to determine, in response to a data operation request, a target physical memory address applied for in the graphics processor for target data to be accessed by the data operation request; The file system client is used to establish a transmission path between the distributed file system and the graphics processor based on the target physical memory address; determine the target location of the target data in the distributed file system according to the data operation request; The target data is transmitted from a target location in the distributed file system to a target physical memory address of the graphics processor via the transmission path.
[0014] Optionally, the file system client is used to determine the meta information of the RDMA data transmission request corresponding to the data operation request, the meta information of the RDMA data transmission request at least including the target DMA address corresponding to the target physical memory address; perform RDMA programming based on the meta information of the RDMA data transmission request to generate a transmission path between the distributed file system and the graphics processor; The distributed file system is used to generate a corresponding RDMA data transmission request according to the data operation request; the RDMA data transmission request is parsed by the distributed file system to determine a target DMA address corresponding to the graphics processor; The distributed file system is further used to obtain the target data from the target location in the distributed system; copy the target data to the target DMA address, and transmit the target data to the target physical memory address of the graphics processor through the transmission path.
[0015] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects: The disclosure establishes a transmission path between a distributed file system and a graphics processor, and divides multiple sub-paths according to the target physical memory address to achieve parallel data transmission, and selects the most appropriate transmission protocol for each data segment by analyzing the properties of multiple data segments of the target data (such as data size, data type and priority). The customized transmission method disclosed in the disclosure enables data of different types and sizes to be transmitted using the most appropriate protocol, avoiding the inefficiency and delay of the "one-size-fits-all" method and improving transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 This is a schematic diagram of the data transmission architecture from a traditional distributed file system to a graphics processor; Figure 2 It is a flowchart of a request processing method provided by an embodiment of the present disclosure; Figure 3 The present invention is a schematic diagram of a data transmission architecture of a request processing system provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0018] Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure. In the description of the embodiments of the present disclosure, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In the present disclosure, "at least one" means one or more, and "multiple" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0019] With the rapid development of artificial intelligence and deep learning applications, the size of data sets continues to expand, and traditional data transmission methods can no longer meet modern computing needs, especially in graphics processing unit (GPU) training tasks. In the traditional data transmission process for operation requests, data needs to be transferred from the distributed file system to the central processing unit (CPU), and then from the CPU to the GPU. Involving multiple data copies and processing steps, it leads to additional delays and performance losses, especially in large-scale AI training tasks, the time to load data significantly affects the training efficiency of the model.
[0020] Figure 1 This is a schematic diagram of the data transmission architecture from a traditional distributed file system to a graphics processor, such as Figure 1 As shown in the figure, below, we take the training of a large model of artificial intelligence generated content (AIGC) as an example to analyze and explain how typical checkpoint read and write operations are performed during the training process. First, the GPU application obtains the file handle by opening the checkpoint file and calls the system memory allocation function (such as malloc) to apply for system memory in order to cache data. Next, the GPU application needs to call the memory application function of the GPU platform to make room for data cache in the GPU memory. Subsequently, the application initiates a data read request, passing parameters such as the system memory address and data length. After the request is received by the virtual file system (VFS), it is passed down to the driver of the distributed file system, and the file system client then reads the required data from the service cluster through the network. After obtaining the data, the client returns it to the VFS layer, and finally copies the data back to the system memory requested by the GPU application. The GPU application then calls the memory copy function of the GPU platform to copy the data in the system memory to the GPU memory. It can be seen that the entire process involves multiple data copies and the participation of the CPU, resulting in significant delays and resource consumption, limiting the realization of efficient data transmission.
[0021] Based on the above problems, the present disclosure proposes an improved request processing method. Figure 2 is a flowchart of a request processing method provided by an embodiment of the present disclosure, such as Figure 2 As shown, the method includes: Step S101, in response to a data operation request, determining a target physical memory address applied for in a graphics processor for target data to be accessed by the data operation request; Step S102, establishing a transmission path between the distributed file system and the graphics processor based on the target physical memory address, wherein the transmission path includes at least one transmission sub-path; Step S103, dividing the target data into a plurality of data segments with different data attributes, wherein the data attributes at least include: data size, data type and priority; Step S104, selecting corresponding target transmission protocols for the multiple data segments according to the data sizes and data types of the multiple data segments of the target data, and allocating the multiple data segments to different transmission sub-paths based on the task load of each of the at least one transmission sub-path and the priorities of the multiple data segments; Step S105, determining a target location of the target data in the distributed file system according to the data operation request; Step S106: Based on the target transmission protocols of the multiple data segments of the target data, the multiple data segments are transmitted in parallel from the target locations in the distributed file system to the target physical memory addresses of the graphics processor through the at least one transmission sub-path.
[0022] Involving step S101, in the GPU application, a data operation request initiated from the model training or reasoning process is received. In the embodiment of the present disclosure, the GPU application is a program dedicated to performing computationally intensive tasks on the GPU. The data operation request may include the data type, size and specific operation (such as reading, writing, etc.) of the target data to be accessed. The target data is the object data that the data operation request needs to access or indicate the operation. The GPU application parses the data operation request to determine the specific characteristics of the target data, including the format (such as tensor, matrix), structure (such as multidimensional array) and any specific identifier (such as file handle) of the target data. According to the result of the request parsing, the GPU application calculates the target physical memory address of the target data in the graphics processor. The target physical memory address is the memory address pre-allocated in the graphics processor of the target data, and is the address of the memory requested by calling the corresponding memory allocation function. After the memory allocation is successful, a pointer to the allocated memory (that is, the target physical memory address) is returned.
[0023] Involving step S102, using the target physical memory address determined in step S101, directly identify the target location in the GPU memory as the end point of the data transmission. Specifically, the GPU application obtains the memory mapping information related to the target physical memory address by calling the corresponding driver interface, including the access rights, size and type of the memory, so as to ensure that the data can be correctly written to the specified memory area. Next, the remote direct memory access (RDMA) technology or other efficient data transmission protocols can be selected to establish a direct transmission path between the distributed file system. At this time, configure the network parameters to ensure that the data can be transmitted from the distributed file system to the GPU memory in a high-bandwidth, low-latency manner. In order to further improve the flexibility and efficiency of data transmission, this step divides the transmission path into at least one transmission sub-path, wherein each transmission sub-path can independently undertake the transmission task of part of the data. The transmission sub-path is divided based on the topological structure of the physical hardware (such as different network interfaces, multi-channel DMA channels of the GPU, etc.) or the task load distribution (such as selecting a low-occupancy channel according to the current load), which helps to balance the task distribution and avoid bottlenecks in a single path.
[0024] Involving step S103, the data in the distributed file system is stored in large blocks, and the GPU receives small blocks of data through a high-performance interface (such as PCIe or NVLink). Therefore, the direct transmission of large blocks of data may cause delays and waste of resources. The present disclosure proposes to split it into multiple data segments. Different data segments differ in data type, priority and data size. For example, texture data for real-time rendering tasks needs to be transmitted first, large model parameters need to be transmitted after segmentation compression, and small control data is very sensitive to delays and requires special processing. Data dependencies need to be considered when segmenting. For example, some parts of the model parameters need to be loaded at the same time and cannot be assigned to different paths for asynchronous transmission.
[0025] In this embodiment, the default size of the data block can be set according to the transmission capability of the hardware (such as the memory bandwidth of the GPU). For example, 256KB or 512KB is a block unit. If the data is small (such as control data), it can be directly processed as a single segment without segmentation. Classify the data by data type, such as image data, video stream, control signal, etc., and establish different segments respectively. Certain types of data may require special encapsulation (such as encoding or compression), and additional operations are required during segmentation. Assign higher priority segments to tasks with strong real-time performance (such as video streaming). Non-real-time tasks (such as batch transmission) can be divided into larger segments to optimize bandwidth utilization. After segmentation, each data segment is marked with corresponding attribute information, including data size, data type and priority. The multiple segments are stored as independent units for scheduling and transmission in subsequent steps.
[0026] In step S104, a suitable target transmission protocol is selected according to the data attributes of the segmented data segments, and the data segments are allocated to different transmission sub-paths based on the load of the transmission sub-path and the priority of the data segments. Each data segment is bound to its target transmission protocol and the allocated sub-path, and recorded in the task scheduling table to provide a basis for the actual transmission in the subsequent step (step S106). Specifically, step S104 includes sub-steps S1041-S1043: Step S1041, dividing the multiple data segments of the target data into a first category of data segments and a second category of data segments according to their respective data sizes and data types, wherein the data size of the first category of data segments is less than a first preset threshold and the data type is real-time data, and the data size of the second category of data segments is greater than the first preset threshold and the data type is non-real-time data, the real-time data at least includes audio and video data or control data, and the non-real-time data at least includes file data and backup data.
[0027] The first type of data segment is real-time data, the data size is less than the first preset threshold, and the data type is real-time data, such as audio and video data (content that requires real-time transmission guarantee) or control data (such as commands, events, etc.). The first type of data segment is sensitive to transmission delay and requires low latency and high real-time transmission. The second type of data segment is non-real-time data, and the data size is greater than the first preset threshold. The data type is non-real-time data, such as file data (such as documents, images, etc.) or backup data (such as database backup, archived data). The second type of data segment does not require strict real-time performance and requires high throughput and stability.
[0028] Step S1042: determine the User Datagram Protocol as the target transmission protocol for the first type of data segments, and determine the Transmission Control Protocol as the target transmission protocol for the second type of data segments.
[0029] According to the classification results, select appropriate transmission protocols for different types of data segments to ensure that the transmission requirements are met. For the first type of data segments, select the User Datagram Protocol (UDP) as the target transmission protocol. UDP has the characteristics of low overhead, low latency, and does not require connection establishment, which is suitable for data with high real-time requirements. Select the Transmission Control Protocol (TCP) as the target transmission protocol for the second type of data segments. TCP has the characteristics of high reliability, providing data packet retransmission and sequence guarantee, and is suitable for large data volume transmission, such as files or backup data. In other words, the UDP protocol is bound to the first type of data segments to ensure real-time performance, while the TCP protocol is bound to the second type of data segments to ensure reliability.
[0030] Step S1043, allocating the multiple data segments to different transmission sub-paths according to their respective priorities, wherein the data segments with priorities higher than the second preset threshold are preferentially allocated to the transmission sub-paths with task loads lower than the third preset threshold, and the data segments with priorities lower than the second preset threshold are preferentially allocated to the transmission sub-paths with task loads higher than the third preset threshold.
[0031] According to the priority of the data segment and the load of the transmission sub-path, the data segment is assigned to the appropriate transmission sub-path. The data segment with a priority higher than the second preset threshold (high priority) is assigned to the transmission sub-path with a task load lower than the third preset threshold. This is equivalent to providing faster transmission services for high-priority data segments to avoid delays or transmission interruptions due to excessive load. The data segment with a priority lower than the second preset threshold (low priority) is assigned to the transmission sub-path with a task load higher than the third preset threshold. This is equivalent to assigning data segments with lower non-real-time requirements to relatively crowded paths, optimizing the utilization of transmission resources and avoiding waste.
[0032] In step S105, similar to determining the target physical memory address, the data operation request is first parsed to extract key information related to the target data. Based on the parsed information, a query request is initiated to the distributed file system, and the distributed file system responds to the query request and locates the specific location where the target data is stored according to the internal index and / or meta information. Once the distributed file system successfully finds the target data, the location of the target data in the file system is returned as the target location of the target data in the distributed file system.
[0033] In step S106, before performing the actual transmission, the following parameters are confirmed for each data segment: target transmission protocol, Transmission subpath, target memory address and segment priority. A transmission session is established for each data segment through the corresponding transmission protocol and subpath. Specifically, for the first type of data segment, a connectionless transmission session is established according to its target transmission protocol (UDP). For the first type of data segment, a connectionless transmission session is established according to its target transmission protocol (UDP). Based on the target transmission protocols of the multiple data segments of the target data, the multiple data segments of the target data are transmitted in parallel from the target location of the distributed file system to the target physical memory address of the graphics processor through the corresponding transmission subpath. The transmission operations of multiple data segments are processed simultaneously through multi-threading or asynchronous I / O mechanism. Each thread / asynchronous task corresponds to a transmission subpath and is independently responsible for the transmission task of the data segment assigned to the subpath. After confirming the location and access rights of the target data, the GPU application constructs a data transmission request, which includes specific information of the target data, such as the size, format, target physical memory address and transmission protocol of the data, such as Remote Direct Memory Access (RDMA). The GPU application initiates data transmission through at least one transmission subpath of the established transmission path. If RDMA technology is used, the application will call the corresponding RDMA API and send a data transfer request to the distributed file system. At this time, RDMA uses the network interface card (NIC) to directly copy the data from the target location of the distributed file system to the target physical memory address of the GPU without the intervention of the CPU. During the transmission, the load of each subpath is dynamically monitored. When the load of a subpath exceeds the third preset threshold, the segment transmission speed is adjusted in time or some low-priority data is reallocated to other subpaths. At the same time, the GPU application monitors the transmission status to ensure that multiple data segments of the target data can be successfully transmitted to the target physical memory address, including checking the completion status of the transmission, error handling and retry mechanism. Once the data transmission is completed, the GPU application will receive confirmation feedback from the distributed file system, indicating that multiple data segments of the target data have been successfully transmitted to the target physical memory address. After the data is successfully transmitted and confirmed, the GPU application can immediately start processing the received target data, such as performing model training or inference operations. At this time, the GPU application uses the data in the target physical memory address to perform the corresponding computing tasks.
[0034] The disclosure establishes a transmission path between a distributed file system and a graphics processor, and divides multiple sub-paths according to the target physical memory address to achieve parallel data transmission, and selects the most appropriate transmission protocol for each data segment by analyzing the properties of multiple data segments of the target data (such as data size, data type and priority). The customized transmission method disclosed in the disclosure enables data of different types and sizes to be transmitted using the most appropriate protocol, avoiding the inefficiency and delay of the "one-size-fits-all" method and improving transmission efficiency.
[0035] In an optional implementation, the step of determining, in response to a data operation request, a target physical memory address requested in a graphics processor for target data to be accessed by the data operation request, includes: parsing the data operation request to obtain a request content of the data operation request; determining, from the request content of the data operation request, a memory address requested in the graphics processor and a data length of the target data; and determining, based on the memory address requested in the graphics processor and the data length of the target data, a corresponding target physical memory address in the graphics processor.
[0036] In one embodiment of the present disclosure, step S101 may include the following steps: when the GPU application receives a data operation request, the data operation request is parsed to extract the specific request content of the request, including but not limited to the data type, data size, operation type, and specific identifier. From the parsed request content, the memory address applied for by the target data in the GPU is identified. And the length of the target data, that is, the number of bytes of the target data, is determined. Based on the target memory address and the data length of the target data, the specific physical memory address of the target data in the GPU can be determined. In the memory management of the GPU, the physical memory address is an address pointing to the actual memory area, corresponding to the allocated memory area.
[0037] Suppose a GPU application needs to process a piece of image data, where each pixel of the image is represented by 4 bytes (RGBA format). At this time, it is hoped that a 1024x768 image will be loaded into the GPU for processing. The GPU application calls a memory allocation function (such as malloc or other GPU-specific memory allocation functions) to apply for memory to store the image data. Suppose the application applies for 1024 * 768 * 4 = 3,145,728 bytes of memory, and assume that the virtual memory address allocated by the GPU is 0x7F000000. When the GPU application needs to operate on this piece of image data, it issues a target data operation request, which includes the memory address applied for in the graphics processor (0x1A2B3C4D) and the data length of the target data (3,145,728 bytes). Since the data length is 3,145,728 bytes, we can calculate the target physical memory address range as follows: starting address 0x1A2B3C4D, ending address 0x1A2B3C4D + 3,145,728 - 1 = 0x1A2B3C4D + 0x2F (i.e. 0x1A2B3C4D to 0x1A2B3C4D + 0x2F).
[0038] Through the above steps, it is possible to accurately respond to data operation requests and determine the physical memory address of the target data in the graphics processor, thus providing necessary support for subsequent data transmission and processing.
[0039] In an optional implementation, establishing a transmission path between the distributed file system and the graphics processor based on the target physical memory address includes: determining meta-information of an RDMA data transmission request corresponding to the data operation request, the meta-information of the RDMA data transmission request including at least a target DMA address corresponding to the target physical memory address; and performing RDMA programming based on the meta-information of the RDMA data transmission request to generate a transmission path between the distributed file system and the graphics processor.
[0040] In one embodiment of the present disclosure, step S102 may include the following steps: determining the meta information of the RDMA data transmission request corresponding to the data operation request. The meta information of the RDMA data transmission request includes key information required for RDMA transmission, such as the target DMA address and the RDMA key, wherein the DMA (Direct Memory Access) address allows data to be directly transferred from the storage device of the distributed file system to the memory of the target device (such as the GPU), bypassing the CPU. In the RDMA request, the DMA address is an address pointing to the memory of the target device (GPU), which is the final destination of the data transmission. The target DMA address contained in the RDMA request indicates the exact location where the data should be written. The target DMA address refers to the specific location where the data will be written or read in the RDMA transmission. Therefore, the target DMA address is an address corresponding to the target physical memory address. After determining the meta information of the RDMA data transmission request, RDMA programming is performed. Establishing an RDMA connection between the distributed file system and the GPU, specifically, involves using an RDMA-related library (such as libibverbs) to initialize the RDMA device, allocate necessary resources and establish a connection. Register the target physical memory address and the corresponding DMA address in the RDMA device. In this way, the RDMA device can recognize these memory areas and allow remote access. Use the RDMA API (for example, ibv_post_send) to configure and submit RDMA data transfer requests. The RDMA engine performs data transfers based on the RDMA data transfer requests. The data will be transferred directly from the storage system to the GPU's physical memory without CPU intervention.
[0041] Through the above steps, the transmission path between the distributed file system and the GPU is finally established. Since RDMA allows data to be transferred directly between memories, it avoids multiple copies of data through the CPU and system memory, thus significantly reducing latency and CPU load.
[0042] In an optional implementation, determining the target location of the target data in the distributed file system based on the data operation request includes: parsing the data operation request to obtain the request content of the data operation request; determining the file handle of the file where the target data is located from the request content of the data operation request; and traversing the distributed file system based on the file handle to determine the target data and the target location of the target data in the distributed file system.
[0043] In one embodiment of the present disclosure, step S105 may include the following steps. First, the received data operation request is parsed. By parsing the request, the specific content of the request is extracted, including the file handle of the file where the target data to be accessed is located. The file handle is a reference used to uniquely identify a file, and is used to quickly locate and access the file. After obtaining the file handle, the validity of the file handle can be further verified to ensure that the file it points to does exist and is accessible. Once the file handle of the file where the target data is located is determined, the distributed file system is traversed to find the specific location of the target data. Interact with the distributed file system through the file handle to request metadata about the file where the target data is located. According to the structural information of the file, traverse each part of each file in the distributed file system (such as data blocks, pages, etc.) to determine the exact location of the target data. Optionally, the file content can be indexed and located to quickly find the required data.
[0044] During the traversal process, the target location of the target data in the distributed file system is finally determined, which is a specific address or offset pointing to the storage location of the target data on the storage medium.
[0045] By parsing data operation requests, obtaining file handles, and traversing the distributed file system, the target location of the target data in the distributed file system can be effectively determined, laying the foundation for subsequent data transmission and processing.
[0046] In an optional embodiment, after determining the target physical memory address applied for in the graphics processor for the target data required to be accessed by the data operation request, the method further includes: obtaining a first mapping relationship between the physical memory address and the virtual memory address; and mapping the target physical memory address to the corresponding target virtual memory address based on the first mapping relationship.
[0047] In modern computer architectures, especially in computing environments involving GPUs, memory management uses a virtual memory mechanism. Virtual memory allows each process (including GPU applications) to use a logically continuous address space, while the actual physical memory may be scattered. The present disclosure uses address mapping to convert physical memory addresses into virtual memory addresses. It should be understood that virtual memory addresses are addresses accessed when programs are running. Through virtual memory addresses, programs can think that they have a continuous memory space, even if the physical memory is fragmented, and even if the program can understand the specific storage location pointed to by the target physical memory address.
[0048] When processing a data operation request, the data operation request is parsed through the GPU file system driver to obtain the request content, including detailed information of the data to be accessed, and determine the target physical memory address applied for in the GPU by the target data to be accessed by the data operation request. The present disclosure pre-configures and maintains a first mapping relationship, which can exist in the form of a form, and the first mapping relationship records the relationship between the virtual memory address and the physical memory address of each process. By looking up the mapping table, the first mapping relationship between the physical memory address and the virtual memory address is obtained. Based on the first mapping relationship, the target physical memory address is converted into a target virtual memory address, which can be achieved through a simple search operation. The mapped target virtual memory address is used for subsequent data operation requests to ensure that the GPU application can correctly access the required data.
[0049] In an optional implementation, determining the metadata of the RDMA data transmission request corresponding to the data operation request includes: obtaining a second mapping relationship between a virtual memory address and a DMA address; based on the second mapping relationship, mapping the target virtual memory address to a corresponding target DMA address; and determining the target DMA address as the metadata of the RDMA data transmission request.
[0050] When processing a data operation request, a second mapping relationship between the virtual memory address and the DMA address is obtained. Similar to the first mapping relationship, the second mapping relationship can also be implemented by searching a mapping table. Based on the second mapping relationship between the virtual memory address and the DMA address, the target virtual memory address is converted into a target DMA address through a search operation. After completing the mapping from the virtual memory address to the DMA address, the target DMA address is determined as the meta information of the RDMA data transmission request.
[0051] It should be noted that the two-level mapping (first mapping relationship and second mapping relationship) adopted in the embodiment of the present disclosure is to achieve efficient memory management and data access. Although the target physical memory address, the target virtual memory address and the target DMA address actually point to the storage location of the target data in the GPU, the design of the two-level mapping is of great significance for the present disclosure to realize direct data transmission between the distributed file system and the GPU. First, the first mapping relationship (mapping the target physical memory address to the target virtual memory address) allows each process to logically have an independent and continuous memory space, which not only provides memory protection to prevent interference between different processes, but also enables flexible management of physical memory allocation and recovery. Through the virtual memory address, the program can think that it is using a continuous piece of memory, but in fact the physical memory may be scattered, thereby effectively enabling the program to understand the address pointing and solving the memory fragmentation problem. Secondly, the second mapping relationship (mapping the target virtual memory address to the target DMA address) is to optimize the data transmission process, especially when the distributed file system applies RDMA technology. The DMA address is designed for direct memory access, allowing external devices to interact directly with the memory without CPU intervention. By mapping virtual memory addresses to DMA addresses, efficient data transfer between GPU memory and external storage is ensured, which not only reduces the latency of data transfer but also improves bandwidth utilization, especially when processing large-scale data sets.
[0052] In an optional implementation, determining the metadata of the RDMA data transmission request corresponding to the data operation request includes: generating a corresponding RDMA data transmission request according to the data operation request; parsing the RDMA data transmission request through the distributed file system to determine the target DMA address corresponding to the graphics processor.
[0053] Taking the RDMA read request as an example, when the GPU needs to read data from the distributed file system (that is, the data operation request is a read request), a corresponding RDMA read request is generated, which includes the address of the source data, the address of the target data, and the data length. The RDMA data transmission request can clearly indicate the source and destination of the data, thereby laying the foundation for the subsequent transmission process. After receiving the RDMA data transmission request, the distributed file system parses it. Identify the request type, first identify that the request is an RDMA read request, which means that the GPU needs to read data from the storage system, that is, the distributed storage system needs to perform a unilateral write operation. Extract information such as the address of the source data, the address of the target data, and the data length from the RDMA request. As mentioned above, in the process of parsing the RDMA data transmission request, the pre-maintained mapping table is searched according to the address of the target data to obtain the second mapping relationship between the target virtual memory address and the target DMA address. Through the search operation, the target virtual memory address is converted into the target DMA address.
[0054] The transmitting the multiple data segments in parallel from the target location in the distributed file system to the target physical memory address of the graphics processor through the at least one transmission sub-path includes: acquiring the multiple data segments of the target data from the target location in the distributed system; copying the multiple data segments of the target data to the target DMA address, and transmitting the multiple data segments of the target data in parallel to the target physical memory address of the graphics processor through the at least one transmission sub-path.
[0055] In one embodiment of the present disclosure, step S106 may include the following steps: the distributed file system accesses the storage device through the network protocol, reads the required target data from the target location, and divides it into multiple data segments. Subsequently, these data segments are copied to the target DMA address, and the target DMA address has been mapped to a memory address that the GPU can directly access. In the previous step, the distributed file system has established a mapping relationship between the target virtual memory address and the target DMA address by parsing the RDMA request and looking up the mapping table. In this process, the distributed file system uses the DMA engine to complete the segmented copy of the target data. Thanks to the unilateral write operation capability of the RDMA (remote direct memory access) protocol, the distributed file system can directly and efficiently transfer multiple data segments of the target data from the target DMA address to the target physical memory address of the GPU without passing through the CPU. The entire data transmission process forms a direct and efficient data flow path, avoiding the intermediate steps in the traditional transmission method and greatly improving the transmission efficiency.
[0056] Through the RDMA protocol, the data in the target DMA address is directly written unilaterally to the target physical memory address of the GPU. This process is completely transparent to the GPU application, that is, the GPU application does not need to be aware of the data transmission process, and only needs to access the required data from the memory in a normal way. After the data transmission is completed, the GPU memory will fully save multiple data segments of the target data obtained from the distributed file system. These data segments can be directly used by the GPU application for subsequent computing tasks without the need for additional data processing steps.
[0057] In an optional embodiment, after transmitting the multiple data segments of the target data in parallel from the target location in the distributed file system to the target physical memory address of the graphics processor through the at least one transmission sub-path based on the respective target transmission protocols of the multiple data segments of the target data, the method further includes: returning a response signal indicating that the execution of the request is completed when it is checked that the multiple data segments of the target data are completely transmitted to the target physical memory address of the graphics processor; and updating the execution status of the data operation request in response to the response signal.
[0058] After confirming that multiple data segments of the target data are completely transferred to the target physical memory address of the graphics processor, a response signal is returned to the GPU application to indicate that the request execution is complete. The response signal can be a simple confirmation message that may include a status code (such as success or failure) and related description information. The response signal is sent back to the GPU application that initiated the data request to inform it that the data transfer has been successfully completed. After receiving the response signal, the GPU application updates the execution status of the data operation request to reflect the current operation result. For example, if the response signal indicates that the data transfer is successful, the application updates the status to "Complete"; if the signal indicates a failure, it may be updated to "Failed" and perform corresponding error handling.
[0059] Through the above steps, the integrity of data transmission can be effectively confirmed, and the execution status can be fed back to the GPU application in a timely manner. This not only improves the reliability of data transmission, but also ensures that subsequent operations are continued in the correct state, thereby improving the efficiency and stability of the overall system.
[0060] In an optional embodiment, the method further includes: implementing a data integrity check during the transmission process, including: generating a checksum of the target data before transmission, and recalculating the checksum of the data after transmission after the transmission is completed; if the checksum matches, confirming the integrity of the target data and updating the corresponding execution status; if it does not match, performing a retransmission operation.
[0061] Before the multiple data segments of the target data are transmitted from the distributed file system, the multiple data segments of the target data to be transmitted are first preprocessed to generate their checksums. Checksum is a simple and widely used data integrity check method that can quickly help detect errors in data transmission. Subsequently, through at least one transmission sub-path of the pre-established transmission path, the multiple data segments of the target data are transmitted from the target location in the distributed file system to the target physical memory address of the graphics processor. After the data is successfully transmitted to the target memory address of the graphics processor, the checksums of the received multiple data segments are recalculated to compare whether the data before and after the transmission are consistent, and the integrity of the data is verified.
[0062] If the checksum recalculated after the transmission is completed matches the checksum generated before the transmission, it is confirmed that the integrity of the target data transmission process has been guaranteed. At this time, the execution status of the data operation request is updated, and a successful response signal is returned to the upper-layer application to ensure the closed loop of the request link. If the checksum does not match, it means that data corruption or loss occurred during the transmission process. At this time, the retransmission mechanism is automatically triggered to try to transmit the data again, reducing calculation errors and subsequent processing problems caused by transmission errors, and improving the robustness of the request processing process.
[0063] The integrity check method provided by the present disclosure is an effective error detection and correction strategy by implementing checksum comparison during the transmission process. Users can be more confident when processing large-scale data and reduce the impact of potential errors. It is particularly suitable for data transmission scenarios that require high reliability, such as modern high-performance computing systems and complex data-intensive application fields.
[0064] Figure 3 This is a schematic diagram of a data transmission architecture of a request processing system provided according to an embodiment of the present disclosure. Figure 3 As shown, the steps applied to execute a request processing method include: a graphics processor file system driver, a file system client and a distributed file system; the file system client is deployed with a network card and a graphics processor, and the graphics processor is connected to the distributed file system through the network card; The graphics processor file system driver is used to determine, in response to a data operation request, a target physical memory address applied for in the graphics processor for target data to be accessed by the data operation request; The file system client is used to establish a transmission path between the distributed file system and the graphics processor based on the target physical memory address, wherein the transmission path includes at least one transmission sub-path; divide the target data into multiple data segments with different data attributes, wherein the data attributes at least include: data size, data type and priority; select corresponding target transmission protocols for the multiple data segments according to the data size and data type of each of the multiple data segments of the target data, and allocate the multiple data segments to different transmission sub-paths based on the task load of each of the at least one transmission sub-path and the priority of each of the multiple data segments; determine the target location of the target data in the distributed file system according to the data operation request; Based on the target transmission protocols of the multiple data segments of the target data, the multiple data segments are transmitted in parallel from the target locations in the distributed file system to the target physical memory addresses of the graphics processor through the at least one transmission sub-path.
[0065] See also Figure 3 The present disclosure configures a GPU file system driver (graphics processor file system driver) between the user state and the VFS layer of the computing node. The GPU file system driver is responsible for processing the file operation request of the GPU application and determining the physical address of the target data in the GPU memory, that is, the target physical memory address. The file system client, as an intermediary connecting the GPU and the distributed file system, is responsible for establishing a data transmission path and determining the location of the target data in the distributed file system. The network card is used for network communication, connecting the file system client and the distributed file system through a high-speed network layer to ensure that data can be transmitted between the two.
[0066] A request processing method provided in an embodiment of the present disclosure can be applied to checkpoint read and write operations based on AIGC large model training. The following takes checkpoint as the target data to be accessed by the data operation request and the data operation request as a read request as an example to illustrate the request processing process of the present disclosure. Figure 3 ,First, in response to the read request (data operation request) for the checkpoint file (target data), the GPU application calls the file system interface of the operating system, opens the checkpoint file through the standard file open operation, and returns the corresponding file handle as the identifier of the checkpoint file. Next, the GPU application calls the API of the GPU platform to register the file handle with the GPU platform, so that the GPU platform can recognize the relationship between the checkpoint file and the GPU computing, and provide necessary support for the subsequent GPU memory operations.
[0067] Furthermore, the GPU application requests the target physical memory address of the graphics processor to store the checkpoint file. After the GPU application successfully requests the target physical memory address, it initiates a data read request. The GPU application calls the GPU platform API and passes in the target physical memory address requested by the checkpoint file in the graphics processor and the length of the data to be read. After receiving the data read request from the GPU application, the GPU file system driver processes the target physical memory address. Since the VFS layer supports and understands virtual addresses, and the actual hardware memory has different mappings, the GPU file system driver will map the target physical memory address to the corresponding target virtual memory address. At this point, the GPU file system driver will initiate a read request to the VFS layer and pass the target virtual memory address of the GPU memory and other related information to the VFS.
[0068] After the VFS layer receives the read request from the GPU file system driver, it will pass the request and parameters down to the distributed file system driver. At this time, the VFS layer is responsible for forwarding the target virtual address of the GPU memory, data read length, etc. to the client of the distributed file system (file system client).
[0069] After the file system client receives the read request from the VFS layer, it first calls the GPU file system driver to obtain the DMA address corresponding to the target virtual memory address. The DMA address is used for direct memory access to ensure that data can be directly transferred to the GPU memory through a high-speed channel. Then, the file system client obtains the RDMA-related key (RDMA key) and other related information through the IB Verbs library. Through RDMA programming, an RDMA connection is established between the file system client and the distributed file system service, and an RDMA read request is initiated to transfer the target data from the distributed file system to the target physical memory.
[0070] After the distributed file system service receives the RDMA read request initiated by the file system client, it first parses the DMA address in the RDMA read request to determine where the data should be stored. Then, the distributed file system service writes the data unilaterally to the DMA address through the RDMA protocol. After the data transfer is completed, the distributed file system service sends a completion response to the file system client, indicating that the data has been successfully transferred to the GPU memory.
[0071] When the file system client receives the completion response from the distributed file system service, it notifies the GPU file system driver, indicating that the data has been successfully copied to the GPU memory. At this point, the file system client returns to the VFS layer, and the VFS layer returns to the GPU file system driver layer. The GPU file system driver layer completes the final stage of the data transfer process, ensuring that the GPU application can access the required data.
[0072] Finally, the GPU file system driver returns a message that the data reading is completed to the GPU application. At this point, the GPU application can start using the data loaded from the distributed file system to the GPU memory and continue the training process. At this point, the GPU application's read request has been completed.
[0073] In the checkpoint writing phase, the whole process is the opposite of the reading phase. The GPU application writes the data in the GPU memory to the checkpoint file, and after the coordinated operation of the GPU file system driver, VFS layer, file system client and distributed file system service, the data is finally saved back to the distributed storage system, which will not be described here.
[0074] It can be seen that under this architecture, the GPU application is responsible for specific training tasks and data processing. The GPU lib library provides GPU-related operation interfaces and functional support. The GPU file system driver is used to handle data interaction between the GPU and the file system. The VFS layer provides a unified file system interface and supports different types of file systems. The file system client is responsible for communicating with the distributed file system, including the network card, PCIe, and GPU. The distributed file system stores and manages the data required by the GPU. The present disclosure also makes corresponding extensions to the GPU lib library, file system client, and distributed file system. The main purpose of extending the GPU lib library is to provide GPU applications with richer functional interfaces to facilitate file reading and writing and GPU memory allocation. Specifically, the GPU lib library will provide a series of APIs that allow GPU applications to directly read and write files. These APIs will simplify the complexity of file operations, allowing developers to process data more conveniently without having to pay attention to the underlying implementation details. In addition to file operations, the library will also include APIs for GPU memory allocation. These APIs will allow GPU applications to dynamically apply for and release GPU memory as needed to ensure efficient use of memory. When the GPU application calls these APIs for file reading and writing or memory allocation, the library will initiate a request to the GPU file system driver module for processing. This mechanism ensures that the GPU application can efficiently interact with the file system to obtain the required data and memory resources.
[0075] The extension of the file system client is designed to enhance its interaction with the GPU file system driver module. The file system client will support interaction with the GPU file system driver module to achieve mapping conversion between GPU virtual addresses and GPU physical memory. This function ensures that the system can accurately locate the required memory address when data is transmitted, thereby improving the efficiency of data access. The file system client will support and apply RDMA (Remote Direct Memory Access) technology, allowing data to be transferred directly between memories without passing through the CPU, thereby reducing latency and CPU load. When initiating a read or write request, the file system client will control the data to include the GPU's DMA address information and send this information to the file system service for efficient data transmission.
[0076] The extension of the distributed file system service is mainly to support RDMA technology to achieve efficient data read and write request processing. The distributed file system service will be able to respond to data read and write requests from RDMA communications from file system clients. This means that when a client initiates a data transfer request, the file system service can quickly process and respond to these requests. Through unilateral RDMA write operations, the distributed file system service can directly copy data to the GPU's DMA address without going through the CPU transfer.
[0077] In an optional implementation, the file system client is used to determine the meta information of the RDMA data transmission request corresponding to the data operation request, the meta information of the RDMA data transmission request at least including the target DMA address corresponding to the target physical memory address; perform RDMA programming based on the meta information of the RDMA data transmission request to generate a transmission path between the distributed file system and the graphics processor; The distributed file system is used to generate a corresponding RDMA data transmission request according to the data operation request; the RDMA data transmission request is parsed by the distributed file system to determine a target DMA address corresponding to the graphics processor; The distributed file system is further used to obtain the target data from the target location in the distributed system; copy the target data to the target DMA address, and transmit the target data to the target physical memory address of the graphics processor through the transmission path.
[0078] In the present disclosure, the file system client is responsible for processing data operation requests and determining the meta information of the corresponding RDMA data transmission request. These meta information include at least the target DMA address corresponding to the target physical memory address. Through these meta information, the file system client performs RDMA programming to establish an efficient data transmission path between the distributed file system and the graphics processing unit (GPU). Specifically, when receiving a data operation request, the file system client first parses the request and generates a corresponding RDMA data transmission request, which includes the information of the target DMA address, to ensure that the data can be directly transferred to the physical memory of the GPU without the intervention of the CPU. Subsequently, the distributed file system confirms the target DMA address required by the GPU according to the RDMA data transmission request, and obtains the required data from the target location in the storage system. Once the data is successfully extracted, the distributed file system copies the data to the predetermined target DMA address. Through the previously established RDMA transmission path, the target data will be quickly transferred to the target physical memory address of the GPU. This process greatly reduces the delay of data transmission, improves the efficiency of data processing, enables the GPU to quickly access and process the required data, and thus improves the performance of the overall system, especially when performing computationally intensive tasks such as large-scale model training. Through the above-mentioned method, the present disclosure effectively optimizes the flow of data between the distributed file system and the GPU, reduces the burden on the CPU and improves the IO bandwidth.
[0079] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, devices, electronic devices, and storage media. Therefore, the embodiments of the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present disclosure may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0080] The embodiments of the present disclosure are described with reference to the flowcharts and / or block diagrams of the methods and systems according to the embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing terminal device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded into a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0081] Although the preferred embodiments of the present disclosure have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present disclosure.
[0082] Finally, it should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "include..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements. A request processing method and system provided by the present disclosure are described in detail above. The principles and implementation methods of the present disclosure are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and its core idea of the present disclosure; at the same time, for those of ordinary skill in the art, according to the idea of the present disclosure, there will be changes in the specific implementation method and scope of application. In summary, the content of this specification should not be understood as a limitation on the present disclosure.
Claims
1. A request processing method, characterized in that: The method comprises: In response to a data operation request, determining a target physical memory address applied for in a graphics processor for target data to be accessed by the data operation request; Based on the target physical memory address, establishing a transmission path between the distributed file system and the graphics processor, wherein the transmission path includes at least one transmission sub-path; Dividing the target data into a plurality of data segments with different data attributes, wherein the data attributes at least include: data size, data type and priority; Selecting corresponding target transmission protocols for the multiple data segments according to the data sizes and data types of the multiple data segments of the target data, and allocating the multiple data segments to different transmission sub-paths based on the task load of each of the at least one transmission sub-path and the priorities of the multiple data segments; Determining a target location of the target data in the distributed file system according to the data operation request; Based on the target transmission protocols of the multiple data segments of the target data, the multiple data segments are transmitted in parallel from the target locations in the distributed file system to the target physical memory addresses of the graphics processor through the at least one transmission sub-path.
2. The method according to claim 1, characterized in that The step of establishing a transmission path between the distributed file system and the graphics processor based on the target physical memory address includes: Determine meta information of an RDMA data transmission request corresponding to the data operation request, wherein the meta information of the RDMA data transmission request at least includes a target DMA address corresponding to the target physical memory address; RDMA programming is performed based on the meta information of the RDMA data transmission request to generate a transmission path between the distributed file system and the graphics processor.
3. The method according to claim 2, characterized in that The determining of the meta information of the RDMA data transmission request corresponding to the data operation request includes: Generate a corresponding RDMA data transmission request according to the data operation request; Parsing the RDMA data transmission request through the distributed file system to determine a target DMA address corresponding to the graphics processor; The transmitting, in parallel, the plurality of data segments from the target location in the distributed file system to the target physical memory address of the graphics processor through the at least one transmission sub-path includes: Acquire a plurality of data segments of the target data from a target location in the distributed system; The multiple data segments of the target data are copied to the target DMA address, and the multiple data segments of the target data are transmitted in parallel to the target physical memory address of the graphics processor through the at least one transmission sub-path.
4. The method according to claim 2, characterized in that: After determining the target physical memory address of the target data to be accessed by the data operation request in the graphics processor, the method further includes: Obtaining a first mapping relationship between a physical memory address and a virtual memory address; Based on the first mapping relationship, mapping the target physical memory address to a corresponding target virtual memory address; The determining of the meta information of the RDMA data transmission request corresponding to the data operation request includes: Obtain a second mapping relationship between the virtual memory address and the DMA address; Based on the second mapping relationship, mapping the target virtual memory address to a corresponding target DMA address; The target DMA address is determined as meta-information of the RDMA data transmission request.
5. The method according to claim 1, characterized in that: The selecting corresponding target transmission protocols for the multiple data segments according to the data sizes and data types of the multiple data segments of the target data, and allocating the multiple data segments to different transmission sub-paths based on the task load of each of the at least one transmission sub-path and the priorities of the multiple data segments, comprises: According to the data size and data type of each of the multiple data segments of the target data, the multiple data segments are divided into a first type of data segments and a second type of data segments, wherein the data size of the first type of data segments is less than a first preset threshold and the data type is real-time data, and the data size of the second type of data segments is greater than the first preset threshold and the data type is non-real-time data, the real-time data at least includes audio and video data or control data, and the non-real-time data at least includes file data and backup data; Determine the User Datagram Protocol as the target transmission protocol for the first type of data segments, and determine the Transmission Control Protocol as the target transmission protocol for the second type of data segments; According to the respective priorities of the multiple data segments, the multiple data segments are allocated to different transmission sub-paths, wherein the data segments with priorities higher than the second preset threshold are preferentially allocated to the transmission sub-paths with task loads lower than the third preset threshold, and the data segments with priorities lower than the second preset threshold are preferentially allocated to the transmission sub-paths with task loads higher than the third preset threshold.
6. The method according to claim 1, characterized in that Determining the target location of the target data in the distributed file system according to the data operation request includes: Parsing the data operation request to obtain request content of the data operation request; Determining a file handle of a file where the target data is located from the request content of the data operation request; According to the file handle, the distributed file system is traversed to determine the target data and the target position of the target data in the distributed file system.
7. The method according to claim 1, characterized in that The step of determining, in response to the data operation request, a target physical memory address applied for in the graphics processor for target data to be accessed by the data operation request comprises: Parsing the data operation request to obtain the request content of the data operation request; Determining a memory address requested in the graphics processor and a data length of the target data from the request content of the data operation request; According to the memory address applied for in the graphics processor and the data length of the target data, a corresponding target physical memory address in the graphics processor is determined.
8. The method according to claim 1, characterized in that After transmitting the plurality of data segments of the target data in parallel from the target locations in the distributed file system to the target physical memory addresses of the graphics processor through the at least one transmission sub-path based on the target transmission protocols of the plurality of data segments of the target data, the method further includes: When it is detected that the multiple data segments of the target data are completely transmitted to the target physical memory address of the graphics processor, a response signal indicating that the request is executed successfully is returned; In response to the response signal, an execution status of the data operation request is updated.
9. A request processing system, characterized in that: The steps applied to execute the request processing method according to any one of claims 1 to 8 include: a graphics processor file system driver, a file system client and a distributed file system; the file system client is deployed with a network card and a graphics processor, and the graphics processor is connected to the distributed file system through the network card; The graphics processor file system driver is used to determine, in response to a data operation request, a target physical memory address applied for in the graphics processor for target data to be accessed by the data operation request; The file system client is used to establish a transmission path between the distributed file system and the graphics processor based on the target physical memory address, wherein the transmission path includes at least one transmission sub-path; divide the target data into multiple data segments with different data attributes, wherein the data attributes at least include: data size, data type and priority; select corresponding target transmission protocols for the multiple data segments according to the data size and data type of each of the multiple data segments of the target data, and allocate the multiple data segments to different transmission sub-paths based on the task load of each of the at least one transmission sub-path and the priority of each of the multiple data segments; determine the target location of the target data in the distributed file system according to the data operation request; Based on the target transmission protocols of the multiple data segments of the target data, the multiple data segments are transmitted in parallel from the target locations in the distributed file system to the target physical memory addresses of the graphics processor through the at least one transmission sub-path.
10. The system according to claim 9, characterized in that The file system client is used to determine the meta information of the RDMA data transmission request corresponding to the data operation request, wherein the meta information of the RDMA data transmission request at least includes a target DMA address corresponding to the target physical memory address; Perform RDMA programming based on the metadata of the RDMA data transmission request to generate a transmission path between the distributed file system and the graphics processor; The distributed file system is used to generate a corresponding RDMA data transmission request according to the data operation request; the RDMA data transmission request is parsed by the distributed file system to determine a target DMA address corresponding to the graphics processor; The distributed file system is further used to obtain the target data from a target location in the distributed system; The target data is copied to the target DMA address, and the target data is transmitted to the target physical memory address of the graphics processor through the transmission path.
Citation Information
Patent Citations
Multi-path transport design
CN108476208A
Network video service method for multi-channel path processing
CN116916063A
Communication request processing method and device, electronic equipment and storage medium
CN117978877A
Computing system and data transmission method
CN118519951A
Communication protocol, and a method thereof for accelerating artificial intelligence processing tasks
US11570257B1
Cited By
Rendering node video stream low-delay synthesis output system
CN120935379A
Data transmission method and electronic equipment
CN120973705A