The invention relates to a
distributed file system recycle bin performance optimization method, which comprises the following steps: in the execution process of an unlink interface of a Linux
file system, sequentially completing recycle bin function starting judgment, file deletability
verification and recycle bin storage suitability judgment, and obtaining
metadata of a target deleted file parent
directory from a
server; when a
file system is created, a global unified root recycle bin
directory is synchronously generated, and when a file is deleted, a corresponding recycle bin subdirectory is created in a target MDS based on a parent
directory inode number; an atomic operation is executed through a Linux standard
rename interface, the file is moved to a corresponding recycle bin subdirectory, and the operation is limited to the interior of a single MDS; when the file is recovered, extracting an
inode number of a parent directory, and iteratively querying
metadata to restore an original complete path; and during batch
recovery, if the original catalogue does not exist or needs to be recovered to a new catalogue, directly and integrally moving the catalogue corresponding to the recycle bin, otherwise, executing
recovery operation one by one. The
file deletion and
recovery performance is remarkably improved, the resource overhead is reduced, and the
data consistency is guaranteed.