Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listing container contents is often slow #81

Closed
foodprocessor opened this issue Jan 5, 2024 · 1 comment · Fixed by #107
Closed

Listing container contents is often slow #81

foodprocessor opened this issue Jan 5, 2024 · 1 comment · Fixed by #107
Labels
bug Something isn't working

Comments

@foodprocessor
Copy link
Contributor

Problem

I have a relatively large number of files (about 2,000) in the root directory in my container. When I first mount the container, listing the root directory sometimes takes an excessive amount of time. At the moment it's 5s. But it's been over 20s at times.

Expected behavior

Listing 2,000 files should take much less time. I think 1s is ideal, 5s is reasonable, and 10s is not.

How to reproduce

List a directory with a few thousand files right after mounting:

cloudfuse mount ~/mycontainer --config-file=config.yaml
time ls ~/mycontainer
cloudfuse unmount --lazy ~/mycontainer

Logs

cloudfuse_list_2k.log

Deployment information

I'm on Ubuntu 22.04, running against a Seagate Lyve Cloud container, running cloudfuse v0.3.0.

Additional information

No response

@foodprocessor foodprocessor added the bug Something isn't working label Jan 5, 2024
@foodprocessor
Copy link
Contributor Author

It looks like the issue that came up in your log is just that the OS called Getattr on every single entry in the directory.
It seems this is because we use fuse2 and not fuse3 for our fuse connector, and fuse2 lacks a feature that prevents the OS from calling Getattr on all entries in each folder it lists.
The reason we're using fuse2 is that we use Cgofuse for our fuse layer, which doesn't support fuse3 yet.
It looks like the performance penalty is roughly 1s for every 500 entries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant