trapexit / mergerfs

a featureful union filesystem
http://spawn.link
Other
4.21k stars 170 forks source link

Using the joint file system, when there are too many files in the folder, it is very time-consuming to execute the ls command #1211

Closed gocpplua closed 1 year ago

gocpplua commented 1 year ago

For general questions and support please use GitHub Discussions or Discord.

  1. Create the union folder using the following command:
    sudo mergerfs -o defaults,security_capability=false,xattr=noattr,xattr=nosys,cache.files=off,dropcacheonclose=true,category.create=mfs,minfreespace=1024M,func.getattr=mfs /data/nfs:/data/local/ /data/mermge
  2. Copy more than 6000 images to /data/mermge
  3. Execute the following command
    $ time ls
    real    1m0.949s
    user    0m0.124s
    sys 0m0.324s

The command takes over 1 minute to return, whereas it takes less than 1 second without the union filesystem

trapexit commented 1 year ago

Please provide all the details as requested in the ticket template.