Storage2.exists-check-workers: 1

Do I understand correctly that this parameter is created for accelerated file search in all directories on the disk? I want to set it equal to 1. What negative consequences are possible? Default is 5.

The number of exists-check-workers is used by the segment-verifier tool for how many workers to use to check if satellite pieces exist. I don’t think it should affect the disk negatively if you lower the number of exists-check-workers, since the exist endpoint only performs stat on each file (it just helps to complete the request faster).

Stat for many files is exactly what kills performance during the file walker process. Frankly, I wonder why does it even perform stat(). Just being listed in the directory should be enough, and that’s way faster.

1 Like

It need to get size. The list would use stat() under the hood I think.

The result of the stat() call is ignored: storj/endpoint.go at 41bfbbe772219259c90491fb818927eb39cd78fd · storj/storj · GitHub. The endpoint does not actually use size, or anything else that the stat() call returns.

1 Like

My apologies for not understanding your suggestion, so let me ask perhaps some dumb question.

Are you suggesting listing all the files of a directory tree and then finding the file in that list?

I have the access syscall with the F_OK flag in mind here.

1 Like

I suggest you to open a Github issue and mention it.
Let’s see if we can explore that possibility and if it’s an enhancement, perhaps we could fit it in the roadmap.

Thank you for your contribution, we really appreciate it.

2 Likes