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

sshfs client memory consumption #297

Closed
Ric57100 opened this issue Mar 12, 2024 · 1 comment
Closed

sshfs client memory consumption #297

Ric57100 opened this issue Mar 12, 2024 · 1 comment
Assignees

Comments

@Ric57100
Copy link

Hi,

I would like to know why sshfs client consumes more and more memory over time, until it causes an out of memory (The remote FS contains a lot of small files). As you can see in the screenshot, after less than a month, the process uses almost 1GB of memory (RSS field), or even more than a GB taking into account the virtual memory (VSZ field).

To prevent such a situation I have to unmount / mount remote FS.
image

Does anyone have an explanation?

@h4sh5
Copy link
Collaborator

h4sh5 commented Mar 17, 2024

It's because SSHFS caches file reads for improved performance. That probably means the more files you list / read, the more it stores in the cache in memory.

You should be able to disable that by using -o cache=no

(the option in help being -o cache=BOOL enable caching {yes,no} (default: yes))

@h4sh5 h4sh5 self-assigned this Mar 17, 2024
@h4sh5 h4sh5 closed this as completed Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants