摘要 |
The present invention relates to a data processing method and a device 30 in a distributed file storage system, where the method includes: receiving, by a client agent 30, a data processing request of a user, where the data processing request carries a file identifier, an offset address, a file length, and other information of a target file; obtaining, by the client agent 30, redundancy information according to the file identifier carried in the data processing request, where the redundancy information includes a quantity of data strips, N, of the distributed file storage system and a quantity of parity strips, M, of the distributed file storage system; determining a quantity of valid strips, DSC, of the target file according to the offset address and the length information that are carried in the data processing request; determining a quantity of actual strips, N', of the target file according to the quantity of the valid strips, DSC, and the quantity of the parity strips, M; and determining corresponding strips according to the quantity of the actual strips, N', and processing the corresponding strips. A quantity of actual strips generated when striping is performed on the target file is dynamically adjusted according to a size of the file to be processed, which not only can ensure that an expected target file can be acquired in any case, but also can reduce a quantity of empty strips in a distributed file storage system 10, and therefore a large quantity of network read-write I/O operations and disk read-write I/O operations in a scenario of a small file can be reduced, thereby improving the performance of the distributed file storage system 10. |