A distributed file system adapted for GPU cluster training, its creation method, electronic device, and storage medium
By building a distributed file system in a GPU cluster and optimizing IO operations using RDMA and non-blocking RPC communication, the problem that the storage system cannot adapt to GPU cluster training is solved, and efficient IO performance and simplified operation and maintenance processes are achieved.
Patent Information
- Application Number
- CN202411640610.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2044-11-15
AI Technical Summary
The existing storage system cannot effectively adapt to the data reading performance requirements during GPU cluster training, resulting in inefficient IO operation.
A distributed file system suitable for GPU cluster training is designed, including management modules, servers and clients. The distributed file system is built using preset local memory space, and IO operations are optimized through RDMA network communication and non-blocking RPC network communication mode.
It improves IO performance in GPU cluster training scenarios, simplifies operation and maintenance processes, saves costs, and achieves 6-10 times performance improvement.
Smart Images

Figure CN119597721B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a distributed file system adapted for GPU cluster training, a creation method thereof, an electronic device, and a storage medium. Background Art
[0002] When training large models on a graphics processing unit (GPU) cluster, file system usage primarily involves three types of input / output (IO) operations: dataset reading, checkpoint data writing, and checkpoint data reading. Current GPU cluster training typically uses external storage systems, such as general-purpose network file systems, parallel file systems, and object storage. Data read performance depends on the performance of the storage system and may not meet the data read performance requirements of GPU cluster training. Summary of the Invention
[0003] The present disclosure proposes a distributed file system and creation method, electronic equipment, and storage medium technical solutions adapted for GPU cluster training.
[0004] According to one aspect of the present disclosure, a distributed file system adapted for GPU cluster training is provided, comprising: a management module, a server, and a client; the management module is used to, after allocating a target GPU cluster for a target training task, create a server for a plurality of first computer nodes included in the target GPU cluster, and create a client for a plurality of second computer nodes included in the target GPU cluster, wherein each computer node included in the target GPU cluster is deployed with at least one hardware GPU; the server is used to construct a GPU cluster distributed file system adapted for the target training task by utilizing a preset local memory space deployed on the corresponding first computer node; the client is used to perform IO operations on the GPU cluster distributed file system during the process of executing the target training task by utilizing the target GPU cluster.
[0005] In a possible implementation, the preset local memory space deployed on each first computer node has the same memory size.
[0006] In a possible implementation, the GPU cluster distributed file system is used to store the data set required for the target training task and the checkpoint data during the training process.
[0007] In one possible implementation, the client includes: a system call interception module and a client communication module; the server includes: a server communication module; the system call interception module is used to intercept the target file system call in the second computer node where the client is located, and convert the target file system call into an IO request, wherein the target file system call is used to access the GPU cluster distributed file system; the client communication module is used to send the IO request to the server communication module.
[0008] In one possible implementation, the client communication module includes: a remote procedure call (RPC) client module; the server communication module includes: an RPC server module; the RPC client module is configured to send the IO request to the RPC server module using a non-blocking RPC network communication mode.
[0009] In one possible implementation, the client communication module includes: an IPC client module; the server communication module includes: an IPC server module; the IPC client module is used to send the IO request to the IPC server module when the first computing point where the server is located and the second computer node where the client is located are the same computer node.
[0010] In a possible implementation, the client includes: a file map; the file map is used to store access records of the client to the GPU cluster distributed file system.
[0011] In one possible implementation, the IO request includes: a metadata IO request; the client includes: a data segmentation module; the server includes: a metadata database; the data segmentation module is used to divide the target data that needs to be written to the GPU cluster distributed file system into blocks, determine multiple data blocks corresponding to the target data, and metadata information of each data block, wherein the metadata information corresponding to each data block is used to indicate the target server to which the data block needs to be written; the client communication module is used to send the metadata IO request to each server communication module, wherein the metadata IO request is used to request that the metadata information of each data block corresponding to the target data be written to each server; the metadata database in each server is used to respond to the metadata IO request and store the metadata information of each data block corresponding to the target data.
[0012] In one possible implementation, the IO request includes: a data IO request; the server includes: a persistence module; the communication client module is used to send data IO requests to multiple target server terminals, wherein the data IO request corresponding to each target server is used to request that a specified data block corresponding to the target data be written to the target server terminal; the persistence module in each target server is used to respond to the received data IO request and, based on the metadata IO request stored in the metadata database of the target server, store the specified data block to be written to the target server in the preset local memory space corresponding to the target server.
[0013] In a possible implementation, the persistence module in each target server needs to write each designated data block of the target server and store it in a chunk file in the preset local memory space corresponding to the target server.
[0014] In a possible implementation, the number of designated data blocks corresponding to the target data written into each target server is the same.
[0015] In one possible implementation, the data IO request corresponding to each target server includes client memory area information corresponding to the specified data block that needs to be written to the target server; the persistence module in each target server reads the specified data block from the memory space specified by the client memory area information through remote direct memory access (RDMA) based on the client memory area information included in the received data IO request.
[0016] In a possible implementation, the GPU cluster distributed file system is further configured to asynchronously send all or part of the checkpoint data to a PFS outside the target GPU cluster.
[0017] In a possible implementation, the management module is configured to delete the client and the server after the target training task is completed using the target GPU cluster.
[0018] According to one aspect of the present disclosure, a method for creating a distributed file system adapted for GPU cluster training is provided, comprising: after allocating a target GPU cluster for a target training task, creating a server for multiple first computer nodes included in the target GPU cluster, and creating a client for multiple second computer nodes included in the target GPU cluster, wherein each computer node included in the target GPU cluster is deployed with at least one hardware GPU; based on the server, utilizing preset local memory space deployed on the corresponding first computer node to construct a GPU cluster distributed file system adapted for the target training task; based on the client, performing IO operations on the GPU cluster distributed file system during the process of executing the target training task using the target GPU cluster.
[0019] According to one aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to call the instructions stored in the memory to execute the above method.
[0020] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above method is implemented.
[0021] In an embodiment of the present disclosure, a distributed file system adapted for GPU cluster training is designed, including: a management module, a server, and a client. After allocating a target GPU cluster for a target training task, the management module creates a server for multiple first computer nodes included in the target GPU cluster and creates a client for multiple second computer nodes included in the target GPU cluster according to the data reading and writing requirements of the target training task, so that the server can utilize the preset local memory space deployed on the corresponding first computer node to flexibly construct a GPU cluster distributed file system adapted for the target training task. Furthermore, in the process of executing the target training task using the target GPU cluster, the client can perform IO operations on the GPU cluster distributed file system to effectively meet the IO requirements in the GPU cluster training scenario.
[0022] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, rather than limiting the present disclosure. Other features and aspects of the present disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to explain the technical solutions of the present disclosure.
[0024] Figure 1 A block diagram of a distributed file system adapted for GPU cluster training according to an embodiment of the present disclosure is shown.
[0025] Figure 2 A schematic diagram illustrating interaction between a client and a server according to an embodiment of the present disclosure is shown.
[0026] Figure 3 A schematic diagram illustrating the transmission of metadata information and data between a client and a server according to an embodiment of the present disclosure is shown.
[0027] Figure 4 A schematic diagram illustrating a client writing a file to a GPU cluster distributed file system according to an embodiment of the present disclosure is shown.
[0028] Figure 5 A flowchart of a method for creating a distributed file system adapted for GPU cluster training according to an embodiment of the present disclosure is shown.
[0029] Figure 6 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0030] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
[0031] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0032] The term "and / or" herein simply describes an association relationship between associated objects, indicating that three relationships can exist. For example, "A and / or B" can represent the existence of three situations: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" herein refers to any combination of at least two of any one or more of a plurality of items. For example, "at least one of A, B, and C" can represent any one or more elements selected from the set consisting of A, B, and C.
[0033] In addition, numerous specific details are provided in the following detailed description to better illustrate the present disclosure. Those skilled in the art will appreciate that the present disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main points of the present disclosure.
[0034] When training large models using a graphics processing unit (GPU) cluster, the use of the file system primarily involves three types of input / output (IO) operations: reading datasets, writing checkpoint data, and reading checkpoint data.
[0035] Dataset Reading: At the beginning of each training iteration on a GPU cluster, the training framework (for example, PyTorch) uses a data loader to load the dataset. Dataset reading is characterized by a large amount of random I / O, primarily 4KB random reads. Tools can also be used to convert the dataset format in advance, so that random reads can be converted to sequential reads.
[0036] Checkpoint Data Writing: After a certain number of rounds of iterative training on a GPU cluster, the training framework needs to persist the output of the training process, namely the checkpoint data. Checkpoint data storage serves two main purposes: first, it can be directly output for fine-tuning the model and continuing training; second, in the event of a subsequent training failure, training can be continued based on the checkpoint data after failure recovery. Checkpoint data is typically large. For example, the checkpoint data corresponding to a 70B model is approximately 980GB in size. Therefore, checkpoint data is typically stored and read in a distributed manner using slices. Checkpoint data writing is characterized by a large number of sequential write operations, primarily 1M sequential writes.
[0037] Reading checkpoint data: When training large models on large-scale GPU clusters, software or hardware failures inevitably lead to training interruptions. Training needs to resume after the failure has resolved, requiring the previously saved checkpoint data to be read. Reading checkpoint data is characterized by a large number of sequential read operations, primarily 1MB reads.
[0038] Currently, the storage systems used for reading and writing datasets and checkpoint data for GPU cluster training can mainly be the following three options: 1. General-purpose network file systems or distributed file systems, such as NFS and CephFS, can ensure data reliability but require independent deployment and maintenance and have relatively poor performance. 2. Parallel file systems, such as lustrefs, gpfs, and beegfs, offer good performance but require independent deployment and maintenance. Physically, these storage systems are mainly divided into all-in-one storage devices (single storage device) and distributed storage servers (multiple storage servers). 3. Object storage offers good scalability but poor performance. Some scenarios can be accelerated by combining distributed caches, such as juicefs and alluxio, but this requires pre-download to the local file system of the GPU cluster, or the GPU cluster must provide a local client file system similar to S3FS to provide POSIX semantic access.
[0039] The storage system currently used for reading data sets and reading and writing checkpoint data for GPU cluster training is large and complex, and most of its functions are not required by the three core IO business scenarios in the GPU cluster training scenario. Therefore, the embodiments of the present disclosure provide a distributed file system adapted for GPU cluster training, which can adapt to the three core IO business scenarios in the GPU cluster training scenario, and has simple operation and maintenance, saving costs while improving performance. The following is a detailed description of the distributed file system adapted for GPU cluster training provided by the embodiments of the present disclosure.
[0040] Figure 1 FIG. 1 shows a block diagram of a distributed file system adapted for GPU cluster training according to an embodiment of the present disclosure. Figure 1 As shown, the system includes: a management module, a server and a client.
[0041] A management module is used to create a server for multiple first computer nodes included in the target GPU cluster and create a client for multiple second computer nodes included in the target GPU cluster after allocating a target GPU cluster for a target training task, wherein each computer node included in the target GPU cluster is deployed with at least one hardware GPU.
[0042] A GPU cluster is a computer cluster consisting of multiple computer nodes. Each node is equipped with not only at least one hardware GPU but also single-core CPUs, multi-core CPUs, or even multiple CPUs. GPU clusters leverage the computing power of hardware GPUs to perform extremely fast computations.
[0043] For the target training task, a target GPU cluster can be allocated for the target training task based on the Kubernetes platform according to the task requirements. The number of computer nodes included in the target GPU cluster depends on the task requirements of the target training task, which is not specifically limited in this disclosure.
[0044] After allocating a target GPU cluster for a target training task and before starting to execute the target training task, the management module may create a server for a plurality of first computer nodes included in the target GPU cluster according to actual IO requirements of the target training task.
[0045] The management module can reuse the operator mechanism for cluster management in the Kubernetes platform to create and distribute the server to multiple first computer nodes in the target GPU cluster.
[0046] The server is used to build a GPU cluster distributed file system adapted to the target training task by using the preset local memory space deployed on the corresponding first computer node.
[0047] Multiple servers can communicate through the Remote Direct Memory Access (RDMA) network, so that the preset local memory space deployed on multiple first computer nodes serves as the file system backend, and together build a GPU cluster distributed file system adapted to the target training task.
[0048] The number of first computer nodes can be determined based on the actual I / O requirements of the target training task and the size of the preset local memory space deployed on each first computer node, as long as the total size of the preset local memory space deployed on all first computer nodes, that is, the storage space size of the GPU cluster distributed file system constructed above, can meet the actual I / O requirements of the target training task. The first computer nodes can be all computer nodes in the target GPU cluster or only some computer nodes in the target GPU cluster, and this disclosure does not specifically limit this.
[0049] like Figure 1 As shown, only some computer nodes in the target GPU cluster serve as first computer nodes and are deployed with a server.
[0050] In a possible implementation, the memory size of the preset local memory space deployed on each first computer node is the same.
[0051] In order to ensure the balance of the GPU cluster distributed file system constructed above, the memory of the preset local memory space deployed on each first computer node can be set to the same size.
[0052] In one example, the preset local memory space deployed on the first computer node can be a local NVME (Non-Volatile Memory Express) disk space deployed on the first computer node, or a shared memory space deployed on the first computer node (for example, the shared memory / dev / shm in the Linux operating system), or other local memory space deployed on the first computer node. The embodiments of the present disclosure do not specifically limit this.
[0053] For example, a target GPU cluster is assigned to a target training task, and the target GPU cluster includes N computer nodes. Before the target training task is started, the management module creates a server for each computer node included in the target GPU cluster, that is, each computer node included in the target GPU cluster is used as a first computer node. The preset local memory space deployed on each first computer node is 15.36TB. At this time, the N servers can communicate via the RDMA network and jointly build a GPU cluster distributed file system adapted to the target training task with a storage space of 15.36TB×N.
[0054] The management module is further configured to create clients for multiple second computer nodes included in the target GPU cluster.
[0055] The number of second computer nodes can be determined based on the actual data reading requirements of each computer node in the target GPU cluster. During the execution of the target training task in the target GPU cluster, each computer node in the target GPU cluster executes a different training process. Based on the training process executed by each computer node, it can be determined whether the computer node has a data reading requirement. The management module can create clients only for multiple second computer nodes in the target GPU cluster that have data reading requirements, without creating clients for computer nodes in the target GPU cluster that do not have data reading requirements. The second computer nodes can be all computer nodes in the target GPU cluster, or only some computer nodes in the target GPU cluster, and the present disclosure does not make specific limitations on this.
[0056] like Figure 1 As shown, only some computer nodes in the target GPU cluster serve as second computer nodes and are deployed with a server.
[0057] In addition, some computer nodes in the target GPU cluster can be used as both the first computer node and the second computer node. That is, both the server and the client are deployed in these computer nodes.
[0058] like Figure 1 As shown, some of the computer nodes included in the target GPU cluster are deployed with both the server and the client.
[0059] The client is used to perform IO operations on the GPU cluster distributed file system while using the target GPU cluster to execute the target training task.
[0060] Integrate the client into the target training task entry so that the client can access the GPU cluster distributed file system built above that is adapted to the target training task. Then, when using the target GPU cluster to execute the target training task, the client can perform IO operations on the GPU cluster distributed file system.
[0061] In one possible implementation, a GPU cluster distributed file system is used to store the data set required for the target training task and the checkpoint data during the training process.
[0062] Since the GPU cluster distributed file system can store the data sets required for the target training task and the checkpoint data during the training process, the client can perform IO operations such as data set reading, checkpoint data writing, and checkpoint data reading on the GPU cluster distributed file system, adapting to the three core IO business scenarios in the GPU cluster training scenario.
[0063] In an embodiment of the present disclosure, a distributed file system adapted for GPU cluster training is designed, including: a management module, a server, and a client. After allocating a target GPU cluster for a target training task, the management module creates a server for multiple first computer nodes included in the target GPU cluster and creates a client for multiple second computer nodes included in the target GPU cluster according to the data reading and writing requirements of the target training task, so that the server can utilize the preset local memory space deployed on the corresponding first computer node to flexibly construct a GPU cluster distributed file system adapted for the target training task. Furthermore, in the process of executing the target training task using the target GPU cluster, the client can perform IO operations on the GPU cluster distributed file system to effectively meet the IO requirements in the GPU cluster training scenario.
[0064] In one possible implementation, the client includes: a system call interception module and a client communication module; the server includes: a server communication module; a system call interception module for intercepting a target file system call in a second computer node where the client is located, and converting the target file system call into an IO request, wherein the target file system call is used to access a GPU cluster distributed file system; and a client communication module for sending the IO request to the server communication module.
[0065] Figure 2 Schematic diagram of interaction between the client and the server according to an embodiment of the present disclosure is shown. Figure 2 As shown, each client includes a system call interception module.
[0066] When the second computer node where the client is located has a data reading requirement during the training process, it will initiate a target file system call to the GPU cluster distributed file system constructed above. The system call interception module included in the client can intercept the target file system call, and then, through random hashing, the target file system call can be converted into an IO request, and the client communication module can be used to send the IO request to the server communication module included in the server.
[0067] In one possible implementation, the client communication module includes: a remote procedure call (RPC) client module; the server communication module includes: an RPC server module; and an RPC client module for sending IO requests to the RPC server module using a non-blocking RPC network communication mode.
[0068] The client and server can communicate across computer nodes through a high-performance RPC network. In addition, to further improve performance, the client and server use a non-blocking RPC network communication mode for communication.
[0069] Non-blocking RPC network communication refers to the situation where, after the RPC client module initiates a remote call to the RPC server module, it immediately returns and continues executing subsequent code without waiting for the remote call to complete. When the remote call process is completed, the RPC client will obtain the remote call result through some means (such as callback function, event notification, etc.).
[0070] The RPC client module in the embodiment of the present disclosure can communicate with any RPC server module using a non-blocking RPC network communication mode.
[0071] like Figure 2 As shown, each client includes an RPC client module, and each server includes an RPC server module. Each RPC client module can communicate with each RPC server module based on a high-performance network (for example, an RPC network).
[0072] In one possible implementation, the client communication module includes: an IPC client module; the server communication module includes: an IPC server module; the IPC client module is used to send an IO request to the IPC server module when the first computing point where the server is located and the second computer node where the client is located are the same computer node.
[0073] When the client and the server are located on the same computer node, in order to improve performance, inter-process communication (IPC) can be used within the computer node to communicate.
[0074] like Figure 2 As shown, the client includes an IPC client module, and the server includes an IPC server module. For the client and server within the same computer node, internal communication within the computer node can be performed based on the IPC client module and the IPC server module.
[0075] In a possible implementation, the client includes: a file map; the file map is used to store access records of the client to the GPU cluster distributed file system.
[0076] The file graph in the client stores the client's access records to the GPU cluster distributed file system, for example, records which files in the GPU cluster distributed file system the client currently accesses.
[0077] In one example, the file map may store data in a map data structure.
[0078] In the embodiment of the present disclosure, the high-performance network is abstracted and divided into an RPC layer and a bull layer. Figure 3 Schematic diagram showing the transmission of metadata information and data between the client and the server according to an embodiment of the present disclosure. Figure 3 As shown in the figure, the client and the server use the RPC layer to transmit metadata information point-to-point, and the bulk layer to transmit actual data. The bulk layer can use RDMA to transmit actual data. The bulk layer uses RDMA to transmit data.
[0079] In one example, the underlying implementation of RPC transmission can be to call the OFED interface through the Fabric API, call the Verbs or TCP interface, and finally transmit data through a high-performance network card driver. The specific transmission process can refer to the RPC transmission process in related technologies, and this embodiment of the disclosure does not specifically limit this.
[0080] In one example, data transmission is performed based on the RPC layer, and a non-blocking RPC communication mode can be used to improve data transmission performance.
[0081] In one example, a thread pool may be pre-built, and then threads in the thread pool may be used to implement data transmission between the client and the server, thereby improving data transmission performance.
[0082] The following describes in detail the data transmission between the client and the server.
[0083] In one possible implementation, the IO request includes: a metadata IO request; the client includes: a data segmentation module; the server includes: a metadata database; the data segmentation module is used to divide the target data that needs to be written to the GPU cluster distributed file system into blocks, determine multiple data blocks corresponding to the target data, and metadata information of each data block, wherein the metadata information corresponding to each data block is used to indicate the target server to which the data block needs to be written; the client communication module is used to send the metadata IO request to each server communication module, wherein the metadata IO request is used to request that the metadata information of each data block corresponding to the target data be written to each server; the metadata database in each server is used to respond to the metadata IO request and store the metadata information of each data block corresponding to the target data.
[0084] In the disclosed embodiment, the GPU cluster distributed file system is a fully distributed system, that is, each client can communicate with each server in the GPU cluster distributed file system, so that each client can independently parse each server in the GPU cluster distributed file system without the need for a central data structure that can track metadata information or the location of data.
[0085] In order to achieve balanced data distribution for large files, before requesting to write the target data to the GPU cluster distributed file system for storage, the client can use the data segmentation module to split the target data into multiple data blocks of the same size and determine the metadata information of each data block. The metadata information corresponding to each data block is used to indicate the target server to which the data block needs to be written.
[0086] like Figure 2 As shown, each server includes a metadata database for storing metadata information.
[0087] In a possible implementation, the number of designated data blocks corresponding to the target data written to each target server is the same.
[0088] In order to achieve balanced data distribution for large files, the number of designated data blocks corresponding to the target data written to each target server is the same.
[0089] In one example, for any client, all data blocks corresponding to the target data may be evenly distributed and stored on all servers, or all data blocks corresponding to the target data may be evenly distributed and stored on some servers.
[0090] For example, a GPU cluster distributed file system has 10 servers. The client evenly distributes all data blocks corresponding to the target data across all servers, meaning that all 10 servers are the target client. Furthermore, the client can use the data segmentation module to segment the target data into 20 data blocks of equal size, subsequently storing two data blocks on each server.
[0091] For example, a GPU cluster distributed file system corresponds to 10 servers. The client evenly distributes and stores all data blocks corresponding to the target data on the eight servers. This means that eight of the ten servers are selected (e.g., randomly, based on configuration information, etc.) as target clients. Furthermore, the client can use the data segmentation module to segment the target data into eight data blocks of equal size, subsequently storing one data block on each server.
[0092] After determining the metadata information for each data block obtained by segmenting the target data, the client can generate a metadata IO request and, using the client communication module and the server communication module, send the metadata IO request to each server, requesting that the metadata information for each data block corresponding to the target data be written to each server. In other words, the metadata information for each data block corresponding to the target data is fully stored on each server in the GPU cluster distributed file system, making the GPU cluster distributed file system a fully distributed system.
[0093] Since the GPU cluster distributed file system provided by the embodiment of the present disclosure can only support three core IO business scenarios in the GPU cluster training scenario, the size of metadata information can be reduced, thereby achieving high-performance processing of metadata information in scenarios with hundreds or even thousands of computer nodes.
[0094] In one possible implementation, an IO request includes: a data IO request; a server includes: a persistence module; a communication client module, configured to send data IO requests to multiple target servers, wherein the data IO request corresponding to each target server is configured to request that a specified data block corresponding to the target data be written to the target server; and the persistence module in each target server is configured to respond to the received data IO request and, based on the metadata IO request stored in the metadata database of the target server, store the specified data block to be written to the target server in a preset local memory space corresponding to the target server.
[0095] After the metadata information of each data block corresponding to the target data is fully stored in each server in the GPU cluster distributed file system, the client generates a data IO request based on the metadata information of each data block corresponding to the target data, and uses the client communication module and the server communication module to send the data IO request to each target server, so that according to the metadata IO request stored in the metadata database of each target server, the specified data block that needs to be written to the target server is persistently stored in the preset local memory space corresponding to the target server using the persistence module.
[0096] Figure 4 A schematic diagram showing a client writing a file to a GPU cluster distributed file system according to an embodiment of the present disclosure is shown. Figure 4 As shown, when the training process in the computer node where the client resides needs to write a file to the GPU cluster distributed file system, it first writes the target data to the client's cache. Then, the data segmentation module is used to segment the target data into six data blocks of equal size: data block 0 to data block 5. Data blocks 0 and 5 are then packaged and sent to the preset local memory space on server 1 via thread 1. Data blocks 2 and 4 are packaged and sent to the preset local memory space on server 2 via thread 2. Data blocks 1 and 3 are packaged and sent to the preset local memory space on server 3 via thread 3.
[0097] In one possible implementation, the data IO request corresponding to each target server includes client memory area information corresponding to the specified data block to be written to the target server; the persistence module in each target server reads the specified data block from the memory space specified by the client memory area information through RDMA based on the client memory area information included in the received data IO request.
[0098] If supported by the underlying network structure protocol, the client can disclose the client memory area information corresponding to the specified data block that needs to be written to the target server to the target server through a data IO request, so that the target server can read the specified data block directly from the memory space specified by the client memory area information through RDMA, thereby improving data transmission performance.
[0099] In a possible implementation, the persistence module in each target server needs to write each specified data block of the target server and store it in a shard chunk file in a preset local memory space corresponding to the target server.
[0100] The persistence module in each target server will need to write each specified data block of the target server to a shard chunk file in the preset local memory space corresponding to the target server, and store it in its underlying node structure domain storage.
[0101] In a possible implementation, the GPU cluster distributed file system is further configured to asynchronously send all or part of the checkpoint data to a parallel file system (PFS) outside the target GPU cluster.
[0102] In actual use, the GPU cluster distributed file system can be used only for temporary data storage. During or after the execution of the target training task, all or part of the checkpoint data temporarily stored in the GPU cluster distributed file system can be asynchronously sent to a PFS outside the target GPU cluster (for example, GPFS, Lustre, etc.) so that these data will not be affected by the failure of the target GPU cluster.
[0103] In a possible implementation, the management module is configured to delete the client and the server after completing the target training task using the target GPU cluster.
[0104] After completing the target training task using the target GPU cluster, the management module can delete the client and server to release resources.
[0105] In one example, the management module can reuse the operator mechanism for cluster management in the Kubernetes platform to create and delete servers on computer nodes based on target training tasks.
[0106] In one example, the management module is also used to store the configuration information of each server and the monitoring information during the training process to ensure that the target training task is successfully executed based on the target GPU cluster.
[0107] In an embodiment of the present disclosure, a distributed file system adapted for GPU cluster training is designed, including: a management module, a server, and a client. After allocating a target GPU cluster for a target training task, the management module creates a server for multiple first computer nodes included in the target GPU cluster and creates a client for multiple second computer nodes included in the target GPU cluster according to the data reading and writing requirements of the target training task, so that the server can utilize the preset local memory space deployed on the corresponding first computer node to flexibly construct a GPU cluster distributed file system adapted for the target training task. Furthermore, in the process of executing the target training task using the target GPU cluster, the client can perform IO operations on the GPU cluster distributed file system to effectively meet the IO requirements in the GPU cluster training scenario.
[0108] Compared with the use of main memory or traditional parallel file systems such as localfs, the distributed file system adapted for GPU cluster training provided by the embodiment of the present disclosure can provide a unified storage space, as well as a larger capacity and linearly growing throughput. Moreover, the distributed file system adapted for GPU cluster training provided by the embodiment of the present disclosure can only adapt to file system calls in GPU cluster training scenarios, abandoning traditional file systems and other capabilities of traditional parallel file systems, simplifying the call chain, so that GPU cluster training can achieve more than 6-7 times the performance, while operation and maintenance are very simple. In addition, since the distributed file system adapted for GPU cluster training provided by the embodiment of the present disclosure can support shared memory on each computer node in the GPU cluster as a back-end storage medium, more than 10 times the performance can be achieved.
[0109] The distributed file system adapted for GPU cluster training provided by the embodiments of the present disclosure can flexibly create and integrate the deployment of a GPU cluster distributed file system that meets the task requirements as training tasks are started and deleted, making full use of the CPU, storage, PCIE bandwidth and network resources of the computing nodes in the GPU cluster, saving costs while improving performance.
[0110] Figure 5 A flow chart of a method for creating a distributed file system adapted for GPU cluster training according to an embodiment of the present disclosure is shown. Figure 5 As shown, the method includes:
[0111] In step S51, after allocating a target GPU cluster for a target training task, a server is created for a plurality of first computer nodes included in the target GPU cluster, and a client is created for a plurality of second computer nodes included in the target GPU cluster, wherein each computer node included in the target GPU cluster is deployed with at least one hardware GPU.
[0112] In step S52, based on the server, a GPU cluster distributed file system adapted to the target training task is constructed using the preset local memory space deployed on the corresponding first computer node.
[0113] In step S53, based on the client, in the process of executing the target training task using the target GPU cluster, an IO operation is performed on the GPU cluster distributed file system.
[0114] For the specific process of the client performing IO operations on the GPU cluster distributed file system, please refer to the above Figures 1 to 5 The relevant description of the illustrated embodiment is omitted here.
[0115] It is understood that the above-mentioned various method embodiments mentioned in this disclosure can be combined with each other to form combined embodiments without violating the principle logic. Due to space limitations, this disclosure will not go into details. It is understood by those skilled in the art that in the above-mentioned methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.
[0116] In addition, the present disclosure also provides electronic devices, computer-readable storage media, and programs, all of which can be used to implement any method provided by the present disclosure. The corresponding technical solutions and descriptions are referred to the corresponding records in the method section and will not be repeated here.
[0117] This method has a specific technical connection with the internal structure of the computer system, and can solve the technical problem of how to improve the hardware computing efficiency or execution effect (including reducing the amount of data storage, reducing the amount of data transmission, increasing the hardware processing speed, etc.), thereby obtaining the technical effect of improving the internal performance of the computer system in accordance with the laws of nature.
[0118] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0119] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.
[0120] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to call the instructions stored in the memory to execute the above method.
[0121] An embodiment of the present disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0122] The electronic device may be provided as a terminal, a server, or other forms of devices.
[0123] Figure 6 FIG. 1 is a block diagram of an electronic device according to an embodiment of the present disclosure. Figure 6 , the electronic device 1900 can be provided as a server or a terminal device. Figure 6 The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute the instructions to perform the above-described method.
[0124] The electronic device 1900 may further include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as a Microsoft Server operating system (Windows Server 2003). TM ), a graphical user interface operating system launched by Apple (Mac OS X TM ), a multi-user, multi-process computer operating system (Unix TM ), a free and open source Unix-like operating system (Linux TM ), an open-source Unix-like operating system (FreeBSD TM ) or similar.
[0125] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.
[0126] The present disclosure may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0127] Computer-readable storage media can be a tangible device that can hold and store the instructions used by the instruction execution device. Computer-readable storage media can be, for example, (but not limited to) an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. Computer-readable storage media used herein is not interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagated by waveguides or other transmission media (for example, light pulses by fiber optic cables), or electrical signals transmitted by wires.
[0128] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.
[0129] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., utilizing an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions. The electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0130] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0131] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0132] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0133] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the prescribed logical function. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the prescribed function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0134] The computer program product may be implemented in hardware, software, or a combination thereof. In one embodiment, the computer program product is implemented as a computer storage medium. In another embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0135] The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced with each other and will not be repeated herein for the sake of brevity.
[0136] Those skilled in the art will understand that in the above-mentioned method of the specific implementation method, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0137] If the technical solution of this application involves personal information, the product that applies the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing personal information. If the technical solution of this application involves sensitive personal information, the product that applies the technical solution of this application has obtained the individual's separate consent before processing sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, a clear and prominent sign is set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that they agree to the collection of their personal information; or on the personal information processing device, when the personal information processing rules are notified by obvious signs / information, the individual's authorization is obtained through pop-up information or by asking the individual to upload their personal information; among which, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
[0138] While various embodiments of the present disclosure have been described above, the above descriptions are illustrative, non-exhaustive, and not intended to be limiting of the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A distributed file system adapted for GPU cluster training, characterized by: include: Management modules, servers, and clients; The management module is configured to, after allocating a target GPU cluster for a target training task, create a server for a plurality of first computer nodes included in the target GPU cluster, and create a client for a plurality of second computer nodes included in the target GPU cluster, wherein each computer node included in the target GPU cluster is deployed with at least one hardware GPU; The server is configured to construct a GPU cluster distributed file system adapted to the target training task by utilizing the preset local memory space deployed on the corresponding first computer node; The client is used to perform input and output (IO) operations on the GPU cluster distributed file system during the process of executing the target training task using the target GPU cluster.
2. The system according to claim 1, wherein: The memory size of the preset local memory space deployed on each first computer node is the same.
3. The system according to claim 1, wherein: The GPU cluster distributed file system is used to store the data set required for the target training task and the checkpoint data during the training process.
4. The system according to claim 1, wherein: The client includes: a system call interception module and a client communication module; the server includes: a server communication module; The system call interception module is used to intercept a target file system call in the second computer node where the client is located, and convert the target file system call into an IO request, wherein the target file system call is used to access the GPU cluster distributed file system; The client communication module is used to send the IO request to the server communication module.
5. The system according to claim 4, characterized in that The client communication module includes: a remote procedure call RPC client module; the server communication module includes: an RPC server module; The RPC client module is used to send the IO request to the RPC server module using a non-blocking RPC network communication mode.
6. The system according to claim 4, characterized in that The client communication module includes: an IPC client module; the server communication module includes: an IPC server module; The IPC client module is configured to send the IO request to the IPC server module when the first computing node where the server is located and the second computing node where the client is located are the same computing node.
7. The system according to any one of claims 1 to 6, characterized in that The client includes: a file map; The file map is used to store the access records of the client to the GPU cluster distributed file system.
8. The system according to claim 4, wherein: The IO request includes: metadata IO request; the client includes: data segmentation module; the server includes: metadata database; The data segmentation module is used to divide the target data to be written into the GPU cluster distributed file system into blocks, determine multiple data blocks corresponding to the target data, and metadata information of each data block, wherein the metadata information corresponding to each data block is used to indicate the target server to which the data block needs to be written; The client communication module is used to send the metadata IO request to each server communication module, wherein the metadata IO request is used to request that metadata information of each data block corresponding to the target data be written to each server; The metadata database in each server is used to respond to the metadata IO request and store metadata information of each data block corresponding to the target data.
9. The system according to claim 8, characterized in that The IO request includes: data IO request; the server includes: persistence module; The client communication module is used to send data IO requests to multiple target servers, wherein the data IO request corresponding to each target server is used to request that a specified data block corresponding to the target data be written into the target server; The persistence module in each target server is used to respond to the received data IO request and store the specified data block that needs to be written to the target server in the preset local memory space corresponding to the target server according to the metadata IO request stored in the metadata database in the target server.
10. The system according to claim 9, characterized in that The persistence module in each target server will need to write each specified data block of the target server and store it in a shard chunk file in the preset local memory space corresponding to the target server.
11. The system according to any one of claims 8 to 10, characterized in that The number of designated data blocks corresponding to the target data written into each target server is the same.
12. The system according to claim 9 or 10, characterized in that The data IO request corresponding to each target server includes the client memory area information corresponding to the specified data block that needs to be written to the target server; The persistence module in each target server reads a specified data block from the memory space specified by the client memory area information through remote direct memory access (RDMA) based on the client memory area information included in the received data IO request.
13. The system according to claim 3, wherein: The GPU cluster distributed file system is further configured to asynchronously send all or part of the checkpoint data to a parallel file system PFS outside the target GPU cluster.
14. The system according to claim 1, wherein: The management module is used to delete the client and the server after completing the target training task using the target GPU cluster.
15. A method for creating a distributed file system adapted for GPU cluster training, characterized in that: include: After allocating a target GPU cluster for a target training task, creating a server for a plurality of first computer nodes included in the target GPU cluster, and creating a client for a plurality of second computer nodes included in the target GPU cluster, wherein each computer node included in the target GPU cluster is deployed with at least one hardware GPU; Based on the server, using the preset local memory space deployed on the corresponding first computer node, constructing a GPU cluster distributed file system adapted to the target training task; Based on the client, in the process of using the target GPU cluster to execute the target training task, an IO operation is performed on the GPU cluster distributed file system.
16. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method of claim 15.
17. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method of claim 15 is implemented.
Citation Information
Patent Citations
Big data storage and access system and method based on distributed file system
CN104320401A
Distributed file system for virtualized computing clusters
US20160203219A1